Using Mermaid
Using Mermaid in Hugo.
graph TD;
A-->B;
A-->C;
B-->D;
C-->D;
Created by the following code embedded in {{< mermaid >}}
:
graph TD;
A-->B;
A-->C;
B-->D;
C-->D;
You need a shortcode located at layouts/shortcodes
and named mermaid.html
.
$ cat layouts/shortcodes/mermaid.html
<script async src="https://unpkg.com/mermaid@8.2.3/dist/mermaid.min.js"></script>
<div class="mermaid">
{{ .Inner }}
</div>