pietroppeter / nimibook

A port of mdbook to nim(ib)
https://pietroppeter.github.io/nimibook/
MIT License
75 stars 8 forks source link

Support mermaid diagrams #88

Open PhilippMDoerner opened 7 months ago

PhilippMDoerner commented 7 months ago

I use mermaid diagrams sometimes, mostly because github markdown natively has support for them.

Recent usage example: https://github.com/PhilippMDoerner/ThreadButler

Nimibook does not render such blocks (since they're not markdown). Recent example: https://philippmdoerner.github.io/ThreadButler/bookCompiled/index.html

I would like for nimibook to also be able to render mermaid-blocks such as this into corresponding diagrams.

Guides for how to do so are defined here: https://mermaid.js.org/config/usage.html?id=usage

Would that be a possible addition?

HugoGranstrom commented 7 months ago

There is this example: https://nimib-land.github.io/nblog/drafts/mermaid_diagram.html

We plan on adding it to nimibex when we get started with it, but we haven't done that yet. Hopefully you can use this in the meantime.