{{ $algorithm := .Site.Params.fingerprintAlgorithm | default "sha256" }}
{{/* Mermaid */}}
{{ if .Page.HasShortcode "mermaid" }}
  {{ $mermaidLib := resources.Get "lib/mermaid/mermaid.min.js" }}
  {{ $mermaidConfig := resources.Get "js/mermaid.js" }}
  {{ $mermaidConfig := $mermaidConfig | resources.Minify }}
  {{ $mermaidJS := slice $mermaidLib $mermaidConfig | resources.Concat "js/mermaid.bundle.js" | resources.Fingerprint $algorithm }}
  <script
    defer
    type="text/javascript"
    src="{{ $mermaidJS