ffaea4a4c8
"mindmap" style is not rendered correctly with "--minify" because spaces are removed from final HTML
12 lines
400 B
HTML
12 lines
400 B
HTML
{{ if not (.Page.Scratch.Get "mermaid") }}
|
|
<!-- Include mermaid only first time -->
|
|
<script src="{{ "mermaid.min.js" | relURL }}"></script>
|
|
{{ with resources.Get "mermaid.json" }}
|
|
<script>mermaid.initialize({{ .Content | safeJS }})</script>
|
|
{{ end }}
|
|
{{ .Page.Scratch.Set "mermaid" true }}
|
|
{{ end }}
|
|
|
|
<pre class="mermaid{{ with .Get "class" }} {{ . }}{{ end }}">
|
|
{{- .Inner | safeHTML -}}
|
|
</pre>
|