diff options
author | Alex Shpak <alex-shpak@users.noreply.github.com> | 2020-08-16 18:57:38 +0200 |
---|---|---|
committer | Alex Shpak <alex-shpak@users.noreply.github.com> | 2020-08-16 18:57:43 +0200 |
commit | 8f64ee74aa1dbefa452c824830956abc405a7787 (patch) | |
tree | a272ecce132c25ba7c23382bf402c27bd7e23556 /layouts | |
parent | 796468766fa2bcf81b0262317e7d146949fb0de3 (diff) |
#204, Add mermaid config customization, upgrade mermaidjs
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 }} |