2019-05-23 16:30:26 +02:00
|
|
|
{{ if not (.Page.Scratch.Get "mermaid") }}
|
|
|
|
<!-- Include mermaid only first time -->
|
2019-05-23 17:48:30 +02:00
|
|
|
<script src="{{ "mermaid.min.js" | relURL }}"></script>
|
2020-08-16 18:57:38 +02:00
|
|
|
{{ with resources.Get "mermaid.json" }}
|
|
|
|
<script>mermaid.initialize({{ .Content | safeJS }})</script>
|
|
|
|
{{ end }}
|
2019-05-23 16:30:26 +02:00
|
|
|
{{ .Page.Scratch.Set "mermaid" true }}
|
|
|
|
{{ end }}
|
|
|
|
|
2024-04-28 18:11:49 +02:00
|
|
|
<pre class="mermaid{{ with .Get "class" }} {{ . }}{{ end }}">
|
|
|
|
{{- .Inner | safeHTML -}}
|
|
|
|
</pre>
|