{{- $noindex := .Params.noindex | default false -}} {{ if and (hugo.IsProduction) (not $noindex) -}} {{ else -}} {{ end -}} {{ partialCached "favicons.html" . -}} {{- if .IsHome -}} {{ .Site.Title -}} {{ else -}} {{ with .Title }}{{ . }} – {{ end -}} {{ .Site.Title -}} {{ end -}} {{- with .Params.canonical -}} {{- else -}} {{- end -}} {{- partial "opengraph.html" . -}} {{- partial "schema.html" . -}} {{- partial "twitter_cards.html" . -}} {{- $mainCss := resources.Get "css/compiled/main.css" -}} {{- $customCss := resources.Get "css/custom.css" -}} {{- $variablesCss := resources.Get "css/variables.css" | resources.ExecuteAsTemplate "css/variables.css" . -}} {{- /* Production build */ -}} {{- if hugo.IsProduction }} {{- $styles := slice $variablesCss $mainCss $customCss | resources.Concat "css/compiled/main.css" | minify | fingerprint }} {{- /* Theme development mode (non-production + theme environment) */ -}} {{- else if eq hugo.Environment "theme" }} {{- $devStyles := resources.Get "css/styles.css" | postCSS (dict "inlineImports" true) }} {{- /* User local development */ -}} {{- else }} {{- $styles := resources.Get "css/compiled/main.css" -}} {{- end }} {{- if and hugo.IsProduction .Site.Config.Services.GoogleAnalytics.ID }} {{ partial "google-analytics.html" . -}} {{- end }} {{ $noop := .WordCount -}} {{- $engine := site.Params.math.engine | default "katex" -}} {{ if and (.Page.Store.Get "hasMath") (eq $engine "katex") -}} {{ partialCached "scripts/katex.html" . -}} {{ else if and (.Page.Store.Get "hasMath") (eq $engine "mathjax") -}} {{ partialCached "scripts/mathjax.html" . -}} {{ end -}} {{ partial "utils/page-width-override.html" . }} {{ partial "custom/head-end.html" . -}}