{"id":50955037,"url":"https://github.com/unasuke/middleman-commonmarker","last_synced_at":"2026-06-18T05:32:33.748Z","repository":{"id":360657452,"uuid":"1251196503","full_name":"unasuke/middleman-commonmarker","owner":"unasuke","description":null,"archived":false,"fork":false,"pushed_at":"2026-05-27T10:53:31.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-27T11:19:40.161Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/unasuke.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"unasuke","custom":"https://www.buymeacoffee.com/unasuke"}},"created_at":"2026-05-27T10:39:13.000Z","updated_at":"2026-05-27T10:55:12.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/unasuke/middleman-commonmarker","commit_stats":null,"previous_names":["unasuke/middleman-commonmarker"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/unasuke/middleman-commonmarker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unasuke%2Fmiddleman-commonmarker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unasuke%2Fmiddleman-commonmarker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unasuke%2Fmiddleman-commonmarker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unasuke%2Fmiddleman-commonmarker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unasuke","download_url":"https://codeload.github.com/unasuke/middleman-commonmarker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unasuke%2Fmiddleman-commonmarker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34478105,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-18T02:00:06.871Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2026-06-18T05:32:31.892Z","updated_at":"2026-06-18T05:32:33.742Z","avatar_url":"https://github.com/unasuke.png","language":"Ruby","funding_links":["https://github.com/sponsors/unasuke","https://www.buymeacoffee.com/unasuke"],"categories":[],"sub_categories":[],"readme":"# Middleman::Commonmarker\n\nA [Middleman](https://middlemanapp.com/) extension that renders Markdown with [commonmarker](https://github.com/gjtorikian/commonmarker) (the Rust/comrak based CommonMark renderer).\n\nIt walks the parsed AST and rewrites image and link nodes through Middleman's `image_tag` and `url_for` helpers, so you get sitemap-aware links and `automatic_image_sizes` support — on par with the Redcarpet engine.\n\n## Installation\n\nAdd the gem to your Middleman project's `Gemfile`:\n\n```ruby\ngem \"middleman-commonmarker\"\n```\n\nThen run `bundle install`.\n\n## Usage\n\nActivate the extension in `config.rb`:\n\n```ruby\nactivate :commonmarker\n```\n\nThat's it — Markdown files (`.markdown`, `.md`, `.mkd`, …) are now rendered with commonmarker.\n\n\u003e **Important:** Enable the engine with `activate :commonmarker`, **not** with\n\u003e `set :markdown_engine, :commonmarker`. On a released middleman-core the latter\n\u003e makes the generic markdown branch look for `Tilt::CommonmarkerTemplate` and\n\u003e raise a `NameError`. Always use `activate :commonmarker`.\n\n### Options\n\nPass commonmarker options either through `set :markdown` (the usual Markdown engine convention) or through the extension's `options:` hash:\n\n```ruby\n# via set :markdown\nactivate :commonmarker\nset :markdown, table: true, strikethrough: true, smartypants: true\n\n# via activate\nactivate :commonmarker, options: { table: true, strikethrough: true }\n```\n\nNote that flat keys on `activate` (e.g. `activate :commonmarker, table: true`) are **not** supported — Middleman validates extension options against declared names, so commonmarker options must be nested under `options:`. Options given to `activate` take precedence over `set :markdown` on conflicting keys.\n\nThese flat options are mapped onto commonmarker's `parse` / `render` / `extension` option groups (and `smartypants` maps to `parse.smart`).\n\n### Raw HTML is enabled during rendering\n\nTo emit the `\u003cimg\u003e` HTML produced by `image_tag`, the renderer forces commonmarker's `unsafe: true` during transformation.\nAs a result, raw HTML in your Markdown is passed through (consistent with Redcarpet's default, where `filter_html` is opt-in).\n\n## Scope\n\nThis extension covers helper integration (`image_tag` / `url_for`), `automatic_image_sizes`, and commonmarker's native parse/render/extension options (`table`, `strikethrough`, `autolink`, `smartypants`, `tasklist`, …).\nRedcarpet-specific options such as `no_images`, `no_links`, `link_attributes`, and `filter_html` are out of scope.\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then run\n`bundle exec rake` to run StandardRB, the minitest unit tests, and the cucumber\nfeatures. You can also run `bin/console` for an interactive prompt.\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/unasuke/middleman-commonmarker. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/unasuke/middleman-commonmarker/blob/main/CODE_OF_CONDUCT.md).\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n## Code of Conduct\n\nEveryone interacting in the Middleman::Commonmarker project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/unasuke/middleman-commonmarker/blob/main/CODE_OF_CONDUCT.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funasuke%2Fmiddleman-commonmarker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funasuke%2Fmiddleman-commonmarker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funasuke%2Fmiddleman-commonmarker/lists"}