{"id":15016563,"url":"https://github.com/nickcolley/eleventy-plugin-unified","last_synced_at":"2025-04-12T10:12:34.118Z","repository":{"id":62231773,"uuid":"558617702","full_name":"NickColley/eleventy-plugin-unified","owner":"NickColley","description":"Use the unified ecosystem in Eleventy with remark and rehype.","archived":false,"fork":false,"pushed_at":"2022-11-18T16:02:37.000Z","size":947,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-12T10:12:26.059Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NickColley.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-10-27T23:20:44.000Z","updated_at":"2023-07-04T14:57:20.000Z","dependencies_parsed_at":"2022-10-28T21:45:15.194Z","dependency_job_id":null,"html_url":"https://github.com/NickColley/eleventy-plugin-unified","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NickColley%2Feleventy-plugin-unified","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NickColley%2Feleventy-plugin-unified/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NickColley%2Feleventy-plugin-unified/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NickColley%2Feleventy-plugin-unified/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NickColley","download_url":"https://codeload.github.com/NickColley/eleventy-plugin-unified/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248550634,"owners_count":21122934,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":"2024-09-24T19:49:04.942Z","updated_at":"2025-04-12T10:12:34.097Z","avatar_url":"https://github.com/NickColley.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Eleventy Plugin Unified\n\n[![past latest npm version](https://img.shields.io/npm/v/eleventy-plugin-unified.svg)](https://www.npmjs.com/package/eleventy-plugin-unified)\n\nUse the [unified](https://unifiedjs.com/) ecosystem in Eleventy.\n\nYou can render, transform and lint:\n\n- markdown with the [remark](https://github.com/remarkjs/remark) ecosystem.\n- html with the [rehype](https://github.com/rehypejs/rehype) ecosystem.\n- text with the [retext](https://github.com/retextjs/retext) ecosystem.\n\n## Install\n\n```bash\nnpm install eleventy-plugin-unified remark-slug\n```\n\n```javascript\n// .eleventy.config.cjs\nconst EleventyUnifiedPlugin = require(\"eleventy-plugin-unified\");\n\nmodule.exports = function (eleventyConfig) {\n  eleventyConfig.addPlugin(EleventyUnifiedPlugin, [\"remark-slug\"]);\n};\n```\n\nThen with a markdown file with:\n\n```markdown\n# Hello, world\n```\n\nIt will render like this:\n\n```html\n\u003ch1 id=\"hello-world\"\u003eHello, world\u003c/h1\u003e\n```\n\n## Plugin options\n\n| Option              | Description                    | Default          |\n| ------------------- | ------------------------------ | ---------------- |\n| markdownTransforms  | [remark plugins]               | `[]`             |\n| htmlTransforms      | [rehype plugins]               | `[]`             |\n| textTransforms      | [retext plugins]               | `[]`             |\n| transformsDirectory | directory with your transforms | `\".\"`            |\n| textParser          | retext parser                  | [retext-english] |\n| reporter            | [vfile reporter]               | [vfile-reporter] |\n\n[remark plugins]: https://unifiedjs.com/explore/keyword/remark\n[rehype plugins]: https://unifiedjs.com/explore/keyword/rehype\n[retext plugins]: https://unifiedjs.com/explore/keyword/retext\n[retext-english]: https://www.npmjs.com/package/retext-english\n[vfile-reporter]: https://github.com/vfile/vfile-reporter\n[vfile reporter]: https://github.com/vfile/vfile#reporters\n\n---\n\n## Documentation\n\n### [Configure options for transforms](#configure-options-for-transforms-1)\n\n### [Adding your own transforms](#adding-your-own-transforms-1)\n\n### [Using page context and eleventy data](./docs/eleventy.md)\n\n- [Logging the available data](./docs/eleventy.md#logging-the-available-data)\n- [Re-using eleventy filters](./docs/eleventy.md#re-using-eleventy-filters)\n\n### [Transforming markdown with remark](./docs/markdown.md)\n\n- [Wrapping a table with a responsive container](./docs/markdown.md#wrapping-a-table-with-a-responsive-container)\n- [Style links that match the current page](./docs/markdown.md#style-links-that-match-the-current-page)\n\n### [Transforming html with rehype](./docs/html.md)\n\n### [Reporting and linting with retext](./docs/text.md)\n\n- [Configuring the reporter](./docs/text.md#configuring-the-reporter)\n- [Turning off default reporter](./docs/text.md#turning-off-default-reporter)\n- [Configuring text parser language](./docs/text.md#configuring-text-parser-language)\n\n### Configure options for transforms\n\n```javascript\n// .eleventy.js\neleventyConfig.addPlugin(EleventyUnifiedPlugin, {\n  htmlTransforms: [[\"rehype-format\", { indent: \"\\t\" }]],\n});\n```\n\n### Adding your own transforms\n\n```javascript\n// .eleventy.js\neleventyConfig.addPlugin(EleventyUnifiedPlugin, [\n  \"./plugins/responsive-tables.js\",\n]);\n```\n\nor\n\n```javascript\n// .eleventy.js\neleventyConfig.addPlugin(EleventyUnifiedPlugin, {\n  transformsDirectory: \"./plugins\",\n  markdownTransforms: [\"responsive-tables.js\"],\n});\n```\n\n---\n\n## With thanks to\n\n- [Titus for the Unified ecosystem](https://twitter.com/wooorm)\n- [florianeckerstorfer/eleventy-plugin-remark](https://github.com/florianeckerstorfer/eleventy-plugin-remark)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnickcolley%2Feleventy-plugin-unified","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnickcolley%2Feleventy-plugin-unified","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnickcolley%2Feleventy-plugin-unified/lists"}