aboutsummaryrefslogtreecommitdiff
path: root/layouts/shortcodes/mermaid.html
blob: f569bc450d368fbcab22a980c7fcf894dd6ed429 (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{{ with .Get "class" }} {{ . }}{{ end }}">
  {{ .Inner }}
</p>