028a463214
* Added support for ```mermaid * Fixed issue when no shortcode mermaid is present * Change block render to match shortcode * Remove mermaid logic from base --------- Co-authored-by: CharlesPhilippeLabbe <c.p@o-possum.com> Co-authored-by: Alex Shpak <alex-shpak@users.noreply.github.com>
13 lines
345 B
HTML
13 lines
345 B
HTML
{{ if not (.Page.Store.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.Store.Set "mermaid" true }}
|
|
{{ end }}
|
|
|
|
<pre class="mermaid">
|
|
{{- .Inner -}}
|
|
</pre>
|