{"id":14110974,"url":"https://github.com/sjwall/mdx-mermaid","last_synced_at":"2025-05-15T13:02:34.233Z","repository":{"id":37699022,"uuid":"392419845","full_name":"sjwall/mdx-mermaid","owner":"sjwall","description":"Plug and play Mermaid in MDX","archived":false,"fork":false,"pushed_at":"2024-12-06T13:33:49.000Z","size":6621,"stargazers_count":173,"open_issues_count":9,"forks_count":29,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-14T20:58:30.472Z","etag":null,"topics":["docusaurus2","mdx","mermaid"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/sjwall.png","metadata":{"files":{"readme":"readme.md","changelog":"changelog.md","contributing":null,"funding":".github/FUNDING.yml","license":"license","code_of_conduct":null,"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},"funding":{"github":"sjwall"}},"created_at":"2021-08-03T18:41:29.000Z","updated_at":"2025-04-07T15:52:11.000Z","dependencies_parsed_at":"2024-06-18T13:47:45.462Z","dependency_job_id":"579f486f-1c53-4a38-be61-f6d1d95c9852","html_url":"https://github.com/sjwall/mdx-mermaid","commit_stats":{"total_commits":154,"total_committers":11,"mean_commits":14.0,"dds":0.3701298701298701,"last_synced_commit":"a7b91c147f7affa0aba465fc3e0e5fdf73ad4950"},"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjwall%2Fmdx-mermaid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjwall%2Fmdx-mermaid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjwall%2Fmdx-mermaid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjwall%2Fmdx-mermaid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sjwall","download_url":"https://codeload.github.com/sjwall/mdx-mermaid/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254346616,"owners_count":22055808,"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":["docusaurus2","mdx","mermaid"],"created_at":"2024-08-14T10:03:05.213Z","updated_at":"2025-05-15T13:02:34.146Z","avatar_url":"https://github.com/sjwall.png","language":"TypeScript","funding_links":["https://github.com/sponsors/sjwall"],"categories":["TypeScript"],"sub_categories":[],"readme":"# mdx-mermaid\n\nPlug and play Mermaid in MDX\n\n[![npm version](https://badge.fury.io/js/mdx-mermaid.svg)][npm]\n[![GitHub license](https://img.shields.io/github/license/sjwall/mdx-mermaid)][license]\n[![build](https://github.com/sjwall/mdx-mermaid/actions/workflows/build.yml/badge.svg)](https://github.com/sjwall/mdx-mermaid/actions/workflows/build.yml)\n[![codecov](https://codecov.io/gh/sjwall/mdx-mermaid/branch/main/graph/badge.svg?token=OBSGK4GGX8)](https://codecov.io/gh/sjwall/mdx-mermaid)\n[![Maintainability](https://api.codeclimate.com/v1/badges/9d89c7483bb1a906ecdf/maintainability)](https://codeclimate.com/github/sjwall/mdx-mermaid/maintainability)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat)][pr]\n\nUse [Mermaid][mermaid] in `.md`, `.mdx`, `.jsx` and `.tsx` files with ease.\n\nBased off the answer [here][inspire] by unknown.\n\nMore documentation available [here][documentation]\n\nUse version `^1.3.0` for `@mdxjs/mdx` `v1`.\n\nUse version `^2.0.0` for `@mdxjs/mdx` `v2`.\n\n\u003e **Warning**:\n\u003e [`rehype-mermaidjs`](https://github.com/remcohaszing/rehype-mermaidjs) and\n\u003e [`remark-mermaidjs`](https://github.com/remcohaszing/remark-mermaidjs)\n\u003e may better suit your use case.\n\n## Quick start\n\nInstall `mdx-mermaid` and `mermaid`\n\n`mermaid` is a peer dependency so you can specify the version to use\n\n```bash\nyarn add mdx-mermaid mermaid\n```\n\nConfigure the plugin:\n\n```js\nimport mdxMermaid from 'mdx-mermaid'\nimport {Mermaid} from 'mdx-mermaid/lib/Mermaid'\n\n{\n  remarkPlugins: [[mdxMermaid.default, {output: 'svg'}]],\n  components: {mermaid: Mermaid, Mermaid}\n}\n```\n\nUse code blocks in `.md` or `.mdx` files:\n\n````md\n```mermaid\ngraph TD;\n    A--\u003eB;\n    A--\u003eC;\n    B--\u003eD;\n    C--\u003eD;\n```\n````\n\nUse the component in `.mdx`, `.jsx` or `.tsx` files:\n\n```jsx\nimport { Mermaid } from 'mdx-mermaid/Mermaid';\n\n\u003cMermaid chart={`graph TD;\n    A--\u003eB;\n    A--\u003eC;\n    B--\u003eD;\n    C--\u003eD;\n`} /\u003e\n```\n\nThere are more examples [here][examples]\n\n## License\n\n[MIT][license] © [Samuel Wall][author]\n\n\u003c!-- Definitions --\u003e\n\n[license]: https://github.com/sjwall/mdx-mermaid/blob/main/license\n\n[author]: https://samuelwall.co.uk\n\n[npm]: https://www.npmjs.com/package/mdx-mermaid\n\n[mermaid]: http://mermaid-js.github.io/mermaid/\n\n[inspire]: https://github.com/facebook/docusaurus/issues/1258#issuecomment-594393744\n\n[pr]: http://makeapullrequest.com\n\n[examples]: https://sjwall.github.io/mdx-mermaid/docs/examples/\n\n[documentation]: https://sjwall.github.io/mdx-mermaid/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsjwall%2Fmdx-mermaid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsjwall%2Fmdx-mermaid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsjwall%2Fmdx-mermaid/lists"}