mirror of
https://github.com/alex-shpak/hugo-book.git
synced 2024-11-21 19:09:29 +00:00
#204, Add mermaid config customization, upgrade mermaidjs
This commit is contained in:
parent
796468766f
commit
8f64ee74aa
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 New Issue
Block a user