{{- if not hugo.IsProduction }} {{- end }} {{ block "favicon" . }}{{ partialCached (printf "%s/%s" ($.Scratch.Get "pathName") "head/favicon.html") . }}{{ end }} {{ if eq .Site.Params.docs.darkMode true -}} {{ $darkModeInit := resources.Get (printf "/%s/%s" ($.Scratch.Get "pathName") "js/darkmode-init.js") | js.Build | minify -}} {{ end -}} {{ if or (not (isset .Site.Params.flexsearch "enabled")) (eq .Site.Params.flexsearch.enabled true) -}} {{ if and (.Site.Params.docsearch.appID) (.Site.Params.docsearch.apiKey) -}} {{ else }} {{ $flexSearch := resources.Get (printf "/%s/%s" ($.Scratch.Get "pathName") "js/flexsearch.bundle.js") }} {{- if not .Site.IsServer }} {{ $flexSearch := $flexSearch | minify | fingerprint "sha384" }} {{ else }} {{ end }} {{ end }} {{ end }} {{- partialCached "google-fonts" . }} {{- $options := dict "enableSourceMap" true }} {{- if hugo.IsProduction}} {{- $options := dict "enableSourceMap" false "outputStyle" "compressed" }} {{- end }} {{- $style := resources.Get (printf "/%s/%s" ($.Scratch.Get "pathName") "scss/style.scss") }} {{- $style = $style | resources.ExecuteAsTemplate (printf "/%s/%s" ($.Scratch.Get "pathName") "scss/style.scss") . | resources.ToCSS $options }} {{- if hugo.IsProduction }} {{- $style = $style | minify | fingerprint "sha384" }} {{- end -}} {{- if not .Site.IsServer }} {{ if and (.Site.Params.plausible.scriptURL | default "https://plausible.io") (.Site.Params.plausible.dataDomain) -}} {{- partialCached (printf "%s/%s" ($.Scratch.Get "pathName") "head/plausible") . }} {{- end -}} {{- end -}} {{- if not .Site.IsServer }} {{- if .Site.GoogleAnalytics }} {{- template "_internal/google_analytics.html" . -}} {{- end -}} {{- end -}}