aboutsummaryrefslogtreecommitdiff
path: root/layouts/shortcodes/mermaid.html
blob: 66eb4a68f5c4c8930b1e999bb4e229c658ce2753 (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">
  {{ .Inner }}
</p>