Mermaid Plugin renders Markdown ```mermaid code fences inside RefMD documents. The server keeps the original HTML placeholder, while the client-side hydrator upgrades it to an interactive SVG using Mermaid’s ESM runtime.
- Server-side placeholders for
mermaid
code fences - Client hydrator that loads Mermaid from CDN or a custom runtime
- Optional runtime override via the Markdown feature flag
mermaid:runtime=<url>
- Download the packaged archive from
https://github.com/refmdio/mermaid-plugin/releases/download/<tag>/mermaid-plugin.zip
- In RefMD open Plugins → Install from URL and paste the link.
- Render any ```mermaid block to see server-rendered SVG that hydrates on load.
cargo build --release --target wasm32-wasip1 --manifest-path backend/Cargo.toml
cp backend/target/wasm32-wasip1/release/mermaid_plugin_backend.wasm backend/plugin.wasm
zip -r mermaid-plugin.zip plugin.json assets backend/plugin.wasm
Install the resulting mermaid-plugin.zip
through RefMD’s plugin manager.
mermaid-plugin/
├─ backend/plugin.wasm
├─ assets/mermaid-hydrate.js
└─ plugin.json
The manifest declares a single renderer for kind mermaid
, a WASM backend entry point render
, and a hydrator module exported from assets/mermaid-hydrate.js
.