Generate mermaid diagrams using org mode
- related
- Doom Emacs
- link
- ob-mermaid
Install package by adding line below to your .doom.d/packages.el
(package! ob-mermaid)
Install mermaid.cli locally.
cd /to/your/org-roam-path
yarn add @mermaid-js/mermaid-cli
Specify mmdc executable path
(setq ob-mermaid-cli-path "/your-installating-path/node_modules/.bin/mmdc")
Open org-mode
buffer and create a org-babel
source block:
please note that you need to specify the :file
header arguments, see this issue
Exporting the org-mode
document or invoking the the org-babel-execute-src-block
function to generate the diagram.