{{ if .Site.Params.mermaid.enable -}} {{ end -}} {{ if .Site.Params.markmap.enable -}} {{ end -}} {{ if .Site.Params.plantuml.enable -}} {{ end -}} {{ if .Site.Params.katex.enable -}} {{ if .Site.Params.katex.mhchem.enable -}} {{ end -}} {{ end -}} {{ $jsBs := resources.Get "vendor/bootstrap/dist/js/bootstrap.bundle.js" -}} {{ $jsBase := resources.Get "js/base.js" -}} {{ $jsAnchor := resources.Get "js/anchor.js" -}} {{ $jsSearch := resources.Get "js/search.js" | resources.ExecuteAsTemplate "js/search.js" .Site.Home -}} {{ $jsMermaid := resources.Get "js/mermaid.js" | resources.ExecuteAsTemplate "js/mermaid.js" . -}} {{ $jsMarkmap := resources.Get "js/markmap.js" | resources.ExecuteAsTemplate "js/markmap.js" . -}} {{ $jsPlantuml := resources.Get "js/plantuml.js" | resources.ExecuteAsTemplate "js/plantuml.js" . -}} {{ $jsDrawio := resources.Get "js/drawio.js" | resources.ExecuteAsTemplate "js/drawio.js" . -}} {{ if .Site.Params.offlineSearch -}} {{ $jsSearch = resources.Get "js/offline-search.js" -}} {{ end -}} {{ $js := (slice $jsBs $jsBase $jsAnchor $jsSearch $jsMermaid $jsPlantuml $jsMarkmap $jsDrawio) | resources.Concat "js/main.js" -}} {{ if hugo.IsProduction -}} {{ $js := $js | minify | fingerprint -}} {{ else -}} {{ end -}} {{ if .Site.Params.prism_syntax_highlighting -}} {{ else if false -}} {{ $c2cJS := resources.Get "js/click-to-copy.js" -}} {{ if hugo.IsProduction -}} {{ $c2cJS = $c2cJS | minify | fingerprint -}} {{ end -}} {{ end -}} {{ partial "hooks/body-end.html" . -}}