Enable Mermaid.js
This commit is contained in:
@ -90,6 +90,8 @@
|
||||
mermaid.init(undefined, '.language-mermaid');
|
||||
})
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
{{- end }}
|
||||
|
||||
@ -142,16 +144,3 @@
|
||||
});
|
||||
</script>
|
||||
{{- end }}
|
||||
|
||||
{{- if (and (eq .Kind "page") (ne .Layout "archives") (ne .Layout "search")) }}
|
||||
<script>
|
||||
if (localStorage.getItem("pref-theme") == 'dark') {
|
||||
theme = 'dark'
|
||||
} else {
|
||||
theme = ''
|
||||
}
|
||||
mermaidTextContents = Array.from(document.getElementsByClassName("language-mermaid")).map(value => value.innerHTML)
|
||||
mermaid.initialize({ theme: theme, startOnLoad: true });
|
||||
mermaid.init(undefined, '.language-mermaid');
|
||||
</script>
|
||||
{{- end}}
|
||||
|
Reference in New Issue
Block a user