@beoe/rehype-mermaid
v0.4.2
Published
rehype mermaid plugin
Downloads
1,235
Readme
@beoe/rehype-mermaid
Rehype plugin to generate Mermaid diagrams in place of code fences. This:
```mermaid
flowchart LR
start --> stop
```will be converted to
<figure class="beoe mermaid">
<svg>...</svg>
</figure>which can look like this:
flowchart LR
start --> stopUsage
import rehypeMermaid from "@beoe/rehype-mermaid";
const html = await unified()
.use(remarkParse)
.use(remarkRehype)
.use(rehypeMermaid)
.use(rehypeStringify)
.process(`markdown`);Online documentation provides more details.
