aboutsummaryrefslogtreecommitdiff
path: root/layouts/shortcodes/mermaid.html
blob: 0d4ff86e8bafda6a3a8b1d1844995697640cfd45 (plain)
1
2
3
4
5
6
7
8
9
{{ if not (.Page.Scratch.Get "mermaid") }}
<!-- Include mermaid only first time -->
<script src="{{ "mermaid.min.js" | relURL }}"></script>
{{ .Page.Scratch.Set "mermaid" true }}
{{ end }}

<p class="mermaid flex align-center">
  {{ .Inner }}
</p>