{{/* NOTE: we disable Docsy's default versions of these libraries, because they are very old. */ -}} {{ $needKaTeX := false -}} {{ $needmhchem := false -}} {{ $needmermaid := false -}} {{ if .Site.Params.markmap.enable -}} {{ end -}} {{ if .Site.Params.plantuml.enable -}} {{ end -}} {{ if $needKaTeX -}} {{/* load stylesheet and scripts for KaTeX support */ -}} {{/* The loading of KaTeX is deferred to speed up page rendering */ -}} {{ if $needmhchem -}} {{/* To add support for displaying chemical equations and physical units, load the mhchem extension: */ -}} {{ end -}} {{/* To automatically render math in text elements, include the auto-render extension: */ -}} {{ 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 -}} {{ $jsArray := slice $jsBs $jsBase $jsAnchor $jsSearch $jsPlantuml $jsMarkmap $jsDrawio -}} {{ if $needmermaid -}} {{ $jsArray = $jsArray | append $jsMermaid -}} {{ end -}} {{ $js := $jsArray | 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" . -}}