aboutsummaryrefslogtreecommitdiff
path: root/layouts/shortcodes/mermaid.html
diff options
context:
space:
mode:
authorAlex Shpak <alex-shpak@users.noreply.github.com>2020-03-30 17:59:14 +0200
committerAlex Shpak <alex-shpak@users.noreply.github.com>2020-03-30 17:59:29 +0200
commit831e570f16d8abc29fe34c50a8ec0bec4406475c (patch)
tree60749d7f9f54dc6eb31f745c615338ca76dfa8d3 /layouts/shortcodes/mermaid.html
parent3011d3351d5e69942fbe2cb93095dd5ce2e63e98 (diff)
Fix mermaid scaling for flowchart
Diffstat (limited to 'layouts/shortcodes/mermaid.html')
-rw-r--r--layouts/shortcodes/mermaid.html5
1 files changed, 5 insertions, 0 deletions
diff --git a/layouts/shortcodes/mermaid.html b/layouts/shortcodes/mermaid.html
index 1f3f18f..9a9436f 100644
--- a/layouts/shortcodes/mermaid.html
+++ b/layouts/shortcodes/mermaid.html
@@ -1,6 +1,11 @@
{{ 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>
{{ .Page.Scratch.Set "mermaid" true }}
{{ end }}