{"id":48879359,"url":"https://github.com/pasunboneleve/markdown-mermaid","last_synced_at":"2026-04-16T02:04:41.127Z","repository":{"id":327659470,"uuid":"1110256734","full_name":"pasunboneleve/markdown-mermaid","owner":"pasunboneleve","description":"Render Mermaid diagrams from Markdown inside Emacs using mmdc — instant preview, no wrappers.","archived":false,"fork":false,"pushed_at":"2026-03-20T05:17:58.000Z","size":32,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-27T05:41:18.082Z","etag":null,"topics":["cli-integration","composable-tools","dev-workflow","developer-tools","diagram","docs-as-code","emacs","emacs-lisp","inline-preview","literate-programming","local-first","markdown","markdown-tools","mermaid","mermaidjs","minimalism","productivity","visualization"],"latest_commit_sha":null,"homepage":"","language":"Emacs Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pasunboneleve.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,"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}},"created_at":"2025-12-04T23:46:52.000Z","updated_at":"2026-03-20T05:18:02.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/pasunboneleve/markdown-mermaid","commit_stats":null,"previous_names":["pasunboneleve/markdown-mermaid"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pasunboneleve/markdown-mermaid","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pasunboneleve%2Fmarkdown-mermaid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pasunboneleve%2Fmarkdown-mermaid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pasunboneleve%2Fmarkdown-mermaid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pasunboneleve%2Fmarkdown-mermaid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pasunboneleve","download_url":"https://codeload.github.com/pasunboneleve/markdown-mermaid/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pasunboneleve%2Fmarkdown-mermaid/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31867716,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"online","status_checked_at":"2026-04-16T02:00:06.042Z","response_time":69,"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":["cli-integration","composable-tools","dev-workflow","developer-tools","diagram","docs-as-code","emacs","emacs-lisp","inline-preview","literate-programming","local-first","markdown","markdown-tools","mermaid","mermaidjs","minimalism","productivity","visualization"],"created_at":"2026-04-16T02:04:24.350Z","updated_at":"2026-04-16T02:04:41.116Z","avatar_url":"https://github.com/pasunboneleve.png","language":"Emacs Lisp","readme":"[![CI](https://github.com/pasunboneleve/markdown-mermaid/actions/workflows/test.yml/badge.svg)](https://github.com/pasunboneleve/markdown-mermaid/actions/workflows/test.yml)\n[![melpazoid](https://github.com/pasunboneleve/markdown-mermaid/actions/workflows/melpazoid.yml/badge.svg)](https://github.com/pasunboneleve/markdown-mermaid/actions/workflows/melpazoid.yml)\n\n# markdown-mermaid.el\n\nRun Mermaid diagrams from Markdown inside Emacs using the `mmdc` CLI.\n\nPlace your cursor inside a ```mermaid``` block, trigger a command, and\nget an instant preview — no wrappers, no servers, no reimplementation.\n\nThis package shells out to the official Mermaid CLI (`mmdc`) to render\ndiagrams, then displays the result in a separate Emacs buffer.\n\nIt also automatically adapts diagram colors to your current Emacs\ntheme.\n\n## Why\n\nMost Mermaid integrations either embed a renderer or add unnecessary\nlayers.  This package stays minimal: use the existing CLI, integrate\nit tightly into your editing workflow, and keep the feedback loop\nfast.\n\n## Prerequisites\n\nThis package requires the Mermaid Command Line Interface. You must\nhave Node.js installed.\n\n```bash\nnpm install -g @mermaid-js/mermaid-cli\n```\n\nVerify the installation by running:\n\n```bash\nmmdc --version\n```\n\n## Installation\n\n### Using `package-install` (MELPA)\n\n```elisp\n(package-install 'markdown-mermaid)\n```\n\n### Using [elpaca](https://github.com/progfolio/elpaca/blob/master/doc/manual.org#use-package-integration) (recommended)\n\n```elisp\n(use-package markdown-mermaid\n  :ensure (markdown-mermaid :type git :host github :repo \"pasunboneleve/markdown-mermaid\")\n  :bind (:map markdown-mode-map\n              (\"C-c m\" . markdown-mermaid-preview)))\n```\n\n### Using Emacs 29+ (`package-vc`)\n\n```elisp\n(use-package markdown-mermaid\n  :vc (:url \"https://github.com/pasunboneleve/markdown-mermaid\" :rev :newest)\n  :bind (:map markdown-mode-map\n              (\"C-c m\" . markdown-mermaid-preview)))\n```\n\n### Using older Emacs (\u003c 29)\n\n1. Clone this repository:\n\n```bash\ngit clone https://github.com/pasunboneleve/markdown-mermaid.git ~/.emacs.d/site-lisp/markdown-mermaid\n```\n\n2. Add to your `init.el`:\n\n```elisp\n(add-to-list 'load-path \"~/.emacs.d/site-lisp/markdown-mermaid\")\n(require 'markdown-mermaid)\n```\n\n## Usage\n\nThink of this as: **run `mmdc` at point**.\n\n1. Open a Markdown file (`.md`).\n\n2. Create a Mermaid code block:\n\n```mermaid\ngraph TD;\n    A[Start] --\u003e B{Is it working?};\n    B -- Yes --\u003e C[Great!];\n    B -- No --\u003e D[Check Logs];\n```\n\n3. Place your cursor anywhere inside the code block.\n\n4. Run:\n\n* `M-x markdown-mermaid-preview`\n* or your keybinding (e.g. `C-c m`)\n\nA new buffer opens with the rendered diagram.\n\n## Configuration\n\nCustomize via:\n\n```\nM-x customize-group RET markdown-mermaid\n```\n\n### Variables\n\n| Variable | Default | Description |\n| :---------------------------- | :------------------------- | :------------------------------------------------------------------------ |\n| `markdown-mermaid-mmdc-path` | `(executable-find \"mmdc\")` | Path to the Mermaid CLI executable. Set manually if Emacs cannot find it. |\n| `markdown-mermaid-temp-files` | `nil` | Internal: tracks temporary files for cleanup.  |\n\n## Theming\n\nThe diagram automatically adapts to your current Emacs theme:\n\n* **Background** → `default` background\n* **Text** → `default` foreground\n* **Borders** → `font-lock-type-face`\n* **Lines / arrows** → `font-lock-constant-face`\n\n## Troubleshooting\n\n### Mermaid CLI not found\n\n* Ensure you installed it:\n\n```bash\nnpm install -g @mermaid-js/mermaid-cli\n```\n\n* If using `nvm`, Emacs may not inherit your PATH. Set it manually:\n\n```elisp\n(setq markdown-mermaid-mmdc-path \"/home/user/.nvm/versions/node/v14/bin/mmdc\")\n```\n\n### Compilation failed\n\nCheck the `*mermaid-error*` buffer for CLI output and syntax errors.\n\n## Development\n\nRun tests locally:\n\n```bash\nmake test\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpasunboneleve%2Fmarkdown-mermaid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpasunboneleve%2Fmarkdown-mermaid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpasunboneleve%2Fmarkdown-mermaid/lists"}