#204, Add mermaid config customization, upgrade mermaidjs
This commit is contained in:
parent
796468766f
commit
8f64ee74aa
3 changed files with 16 additions and 12 deletions
6
assets/mermaid.json
Normal file
6
assets/mermaid.json
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"flowchart": {
|
||||
"useMaxWidth":true
|
||||
},
|
||||
"theme": "default"
|
||||
}
|
|
@ -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
14
static/mermaid.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue