diff options
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/shortcodes/mermaid.html | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/layouts/shortcodes/mermaid.html b/layouts/shortcodes/mermaid.html index 9a9436f..ff90335 100644 --- a/layouts/shortcodes/mermaid.html +++ b/layouts/shortcodes/mermaid.html @@ -1,11 +1,9 @@ {{ if not (.Page.Scratch.Get "mermaid") }} <!-- Include mermaid only first time --> <script src="{{ "mermaid.min.js" | relURL }}"></script> -<script> -mermaid.initialize({ - flowchart: { useMaxWidth:true } -}); -</script> +{{ with resources.Get "mermaid.json" }} + <script>mermaid.initialize({{ .Content | safeJS }})</script> +{{ end }} {{ .Page.Scratch.Set "mermaid" true }} {{ end }} |