mermaid: always load javascript to avoid break if code fences are used #142

This commit is contained in:
Sören Weber 2021-11-08 16:53:08 +01:00
parent da99510f6e
commit ede20225b4
No known key found for this signature in database
GPG key ID: 07D17FF580AE7589

View file

@ -25,7 +25,6 @@
<script src="{{"js/jquery.svg.pan.zoom.js" | relURL}}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}"></script>
<script src="{{"js/featherlight.min.js" | relURL}}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}"></script>
<script src="{{"js/modernizr.custom-3.6.0.js" | relURL}}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}"></script>
{{- if .HasShortcode "mermaid" }}
{{- if (or (and (ne .Params.disableMermaid nil) (not .Params.disableMermaid)) (not .Site.Params.disableMermaid)) }}
{{- if isset .Params "custommermaidurl" }}
<script src="{{ .Params.customMermaidURL }}"></script>
@ -46,7 +45,6 @@
mermaid.mermaidAPI.initialize( Object.assign( { "securityLevel": "antiscript" }, JSON.parse({{ $.Scratch.Get "mermaidInitialize" }}), { startOnLoad: false } ) );
}
</script>
{{- end }}
{{- end }}
<script src="{{"js/relearn.js" | relURL}}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}"></script>
{{- partial "custom-footer.html" . }}