#204, Add mermaid config customization, upgrade mermaidjs

This commit is contained in:
Alex Shpak 2020-08-16 18:57:38 +02:00
parent 796468766f
commit 8f64ee74aa
3 changed files with 16 additions and 12 deletions

6
assets/mermaid.json Normal file
View file

@ -0,0 +1,6 @@
{
"flowchart": {
"useMaxWidth":true
},
"theme": "default"
}

View file

@ -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 }}

14
static/mermaid.min.js vendored

File diff suppressed because one or more lines are too long