{{ if hugo.IsProduction -}} {{ else -}} {{ end -}} {{ partialCached "favicons.html" . -}} {{- if .IsHome -}} {{ .Site.Title -}} {{ else -}} {{ with .Title }}{{ . }} –{{ end -}} {{ .Site.Title -}} {{ end -}} {{- with .Params.canonical -}} {{- else -}} {{- end -}} {{- partial "opengraph.html" . -}} {{- template "_internal/schema.html" . -}} {{- template "_internal/twitter_cards.html" . -}} {{- partial "head-config-css.html" . -}} {{- if and (not hugo.IsProduction) (eq hugo.Environment "theme") }} {{- $styles := resources.Get "css/styles.css" }} {{- $styles = $styles | postCSS (dict "inlineImports" true) }} {{- else }} {{- $styles := resources.Get "css/compiled/main.css" -}} {{- if hugo.IsProduction }} {{- $styles = $styles | minify | fingerprint }} {{- else }} {{- end }} {{- end }} {{- $custom := resources.Get "css/custom.css" }} {{- if hugo.IsProduction -}} {{- $custom = $custom | minify | fingerprint }} {{- else }} {{- end }} {{- if and (eq hugo.Environment "production") .Site.Config.Services.GoogleAnalytics.ID }} {{ partial "google-analytics.html" . }} {{- end }} {{ $noop := .WordCount -}} {{ if .Page.Store.Get "hasMath" -}} {{ $katexCssUrl := printf "https://cdn.jsdelivr.net/npm/katex@latest/dist/katex%s.css" (cond hugo.IsProduction ".min" "") -}} {{ with try (resources.GetRemote $katexCssUrl) -}} {{ with .Err -}} {{ errorf "Could not retrieve KaTeX css file from %s. Reason: %s." $katexCssUrl . -}} {{ else with.Value -}} {{ with resources.Copy (printf "css/katex%s.css" (cond hugo.IsProduction ".min" "")) . -}} {{ end -}} {{ end -}} {{ end -}} {{ end -}} {{ partial "custom/head-end.html" . -}}