2023-10-09 15:42:51 +00:00
|
|
|
{{- $page := .page }}
|
2024-04-03 21:30:51 +00:00
|
|
|
{{- $location := .location }}
|
|
|
|
{{- if eq $location "footer" }}
|
|
|
|
{{- with $page }}
|
2024-07-04 06:23:54 +00:00
|
|
|
{{- $assetBusting := partialCached "assetbusting.hugo" . }}
|
|
|
|
<script src="{{"js/d3/d3-color.min.js" | relURL}}{{ $assetBusting }}" defer></script>
|
|
|
|
<script src="{{"js/d3/d3-dispatch.min.js" | relURL}}{{ $assetBusting }}" defer></script>
|
|
|
|
<script src="{{"js/d3/d3-drag.min.js" | relURL}}{{ $assetBusting }}" defer></script>
|
|
|
|
<script src="{{"js/d3/d3-ease.min.js" | relURL}}{{ $assetBusting }}" defer></script>
|
|
|
|
<script src="{{"js/d3/d3-interpolate.min.js" | relURL}}{{ $assetBusting }}" defer></script>
|
|
|
|
<script src="{{"js/d3/d3-selection.min.js" | relURL}}{{ $assetBusting }}" defer></script>
|
|
|
|
<script src="{{"js/d3/d3-timer.min.js" | relURL}}{{ $assetBusting }}" defer></script>
|
|
|
|
<script src="{{"js/d3/d3-transition.min.js" | relURL}}{{ $assetBusting }}" defer></script>
|
|
|
|
<script src="{{"js/d3/d3-zoom.min.js" | relURL}}{{ $assetBusting }}" defer></script>
|
|
|
|
<script src="{{"js/js-yaml.min.js" | relURL}}{{ $assetBusting }}" defer></script>
|
2024-04-03 21:30:51 +00:00
|
|
|
{{- if and (isset .Params "custommermaidurl") .Params.customMermaidURL }}
|
2023-10-09 15:42:51 +00:00
|
|
|
<script src="{{ .Params.customMermaidURL }}" defer></script>
|
2024-04-03 21:30:51 +00:00
|
|
|
{{- else if and (isset .Site.Params "custommermaidurl") .Site.Params.customMermaidURL }}
|
2023-10-09 15:42:51 +00:00
|
|
|
<script src="{{ .Site.Params.customMermaidURL }}" defer></script>
|
2024-04-03 21:30:51 +00:00
|
|
|
{{- else }}
|
2024-07-04 06:23:54 +00:00
|
|
|
<script src="{{"js/mermaid.min.js" | relURL}}{{ $assetBusting }}" defer></script>
|
2024-04-03 21:30:51 +00:00
|
|
|
{{- end }}
|
|
|
|
{{- $init := "{}" }}
|
|
|
|
{{- if isset .Params "mermaidinitialize" }}
|
|
|
|
{{- $init = .Params.mermaidInitialize }}
|
|
|
|
{{- else if isset .Site.Params "mermaidinitialize" }}
|
|
|
|
{{- $init = .Site.Params.mermaidInitialize }}
|
|
|
|
{{- end }}
|
2023-10-09 15:42:51 +00:00
|
|
|
<script>
|
2023-10-26 09:27:53 +00:00
|
|
|
window.themeUseMermaid = JSON.parse({{ $init }});
|
2023-10-09 15:42:51 +00:00
|
|
|
</script>
|
2024-04-03 21:30:51 +00:00
|
|
|
{{- end }}
|
2023-10-09 15:42:51 +00:00
|
|
|
{{- end }}
|