You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be a great feature to enable native support of mermaid.js diagram blocks.
This would enable users to write diagrams as code and keep them inside the markdown files.
It is simple enough to include the mermaid.js dependency and include a raw div with mermaid syntax, but we may need some more tweaking to enable parsing of code blocks.
// Raw div block - these can be picked up by default by mermaid.js just by including the dependency.
<div class="mermaid">
graph LR
A --- B
B-->C[fa:fa-ban forbidden]
B-->D(fa:fa-spinner);
</div>
// Code block - these are not picked up by mermaid.js, since they are rendered as <pre><code> blocks.
```mermaid
graph TD;
A-->B;
A-->C;
B-->D;
C-->D;
```
By default the markdown renderer just renders a mermaid block as a standard code block.
It would be a great feature to enable native support of mermaid.js diagram blocks.
This would enable users to write diagrams as code and keep them inside the markdown files.
It is simple enough to include the mermaid.js dependency and include a raw div with mermaid syntax, but we may need some more tweaking to enable parsing of code blocks.
By default the markdown renderer just renders a mermaid block as a standard code block.
I dont know if mermaid rendering can be enabled without changing the core zola rendering engine, but it seems like it was achieved by Docsy (a hugo docuementation theme) without changing the core hugo markdown engine, and using jquery instead:
https://github.com/google/docsy/blob/d4b214c8e5c7fabf9e83b58a9df2281be242d5b4/assets/js/mermaid.js
The text was updated successfully, but these errors were encountered: