{"id":26120879,"url":"https://github.com/pyrmont/commonmarker-pluggable","last_synced_at":"2026-04-29T23:33:06.888Z","repository":{"id":62556061,"uuid":"167514317","full_name":"pyrmont/commonmarker-pluggable","owner":"pyrmont","description":"A plugin that adds support for plugins to CommonMarker","archived":false,"fork":false,"pushed_at":"2021-05-22T11:23:36.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-02-20T05:16:09.901Z","etag":null,"topics":["commonmark","commonmarker","jekyll","jekyll-plugin","markdown","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pyrmont.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-01-25T08:39:54.000Z","updated_at":"2021-05-22T11:23:38.000Z","dependencies_parsed_at":"2022-11-03T05:45:37.429Z","dependency_job_id":null,"html_url":"https://github.com/pyrmont/commonmarker-pluggable","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/pyrmont/commonmarker-pluggable","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyrmont%2Fcommonmarker-pluggable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyrmont%2Fcommonmarker-pluggable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyrmont%2Fcommonmarker-pluggable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyrmont%2Fcommonmarker-pluggable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pyrmont","download_url":"https://codeload.github.com/pyrmont/commonmarker-pluggable/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyrmont%2Fcommonmarker-pluggable/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32448399,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T22:27:22.272Z","status":"ssl_error","status_checked_at":"2026-04-29T22:10:49.234Z","response_time":110,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["commonmark","commonmarker","jekyll","jekyll-plugin","markdown","ruby"],"created_at":"2025-03-10T13:53:02.511Z","updated_at":"2026-04-29T23:33:06.872Z","avatar_url":"https://github.com/pyrmont.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Gem Version][badge-img]][badge-link]\n\n[badge-img]: https://badge.fury.io/rb/commonmarker-pluggable.svg\n[badge-link]: https://badge.fury.io/rb/commonmarker-pluggable\n\n# commonmarker-pluggable\n\ncommonmarker-pluggable adds support for plugins to CommonMarker.\n\nThe `cmark` reference parser used by CommonMarker supports extensions to the\nCommonMark specification but these are written in C. The commonmarker-pluggable\nplugin allows users to extend CommonMarker's parsing capabilities with plugins\nwritten in Ruby.\n\n## Installation\n\nThe commonmarker-pluggable plugin requires the commonmarker plugin to\nbe installed and configured ([instructions here][cmp]). The only additional\nstep is to add commonmarker-pluggable to your `Gemfile` like so:\n\n[cmp]: https://github.com/gjtorikian/commonmarker\n\n```ruby\ngem 'commonmarker'\ngem 'commonmarker-pluggable'\n```\n\n## Writing Plugins\n\nOnce commonmarker-pluggable is installed, you can add plugins that manipulate\nthe Markdown document parsed by `cmark`.\n\nPlugins are automatically detected by commonmark-pluggable if they are within\nthe `Commonmarker::Plugin` namespace as demonstrated below. Please note that the\nplugin itself must be of type `Module`.\n\nA plugin must implement the `self.call()` module method. This method takes one\nargument: `doc`. This is a `CommonMarker::Node` object representing the\ntop-most node of a parsed Markdown document.\n\nAn example plugin is set out below:\n\n```ruby\nmodule CommonMarker\n  module Plugin\n    module Example\n      def self.call(doc)\n        doc.walk do |node|\n          node.delete if node.string_content == 'To be deleted'\n        end\n      end\n    end\n  end\nend\n```\n\n## Using with Jekyll\n\ncommonmarker-pluggable was originally written for use with Jekyll. If you want\nto write a plugin that is both a CommonMarker plugin _and_ a Jekyll plugin, you\nneed to ensure that commonmarker-pluggable is installed as a Jekyll plugin.\nThere are [other ways][jk-pl] to do this, but the easiest method is to include\ncommonmarker-pluggable in the `:jekyll_plugins` group in your Gemfile:\n\n[jk-pl]: https://jekyllrb.com/docs/plugins/installation/\n\n```ruby\ngroup :jekyll_plugins do\n  gem 'commonmarker-pluggable'\n  gem 'jekyll-commonmark'\n  ...\nend\n```\n\n## Bugs\n\nFound a bug? I'd love to know about it. The best way is to report them in the\n[Issues section][gh-i] on GitHub.\n\n[gh-i]: https://github.com/pyrmont/commonmarker-pluggable/issues\n\n## Contributing\n\nIf you're interested in contributing to commonmarker-pluggable, feel free to\nfork and submit a pull request.\n\n## Versioning\n\nThe commonmarker-pluggable plugin uses [Semantic Versioning 2.0.0][sv2].\n\n[sv2]: http://semver.org/\n\n## Licence\n\nThe commonmarker-pluggable plugin is released into the public domain. See\n[LICENSE.md][lc] for more details.\n\n[lc]: https://github.com/pyrmont/commonmarker-pluggable/blob/master/LICENSE.md\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyrmont%2Fcommonmarker-pluggable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpyrmont%2Fcommonmarker-pluggable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyrmont%2Fcommonmarker-pluggable/lists"}