{{- hugo.Generator -}} {{ if .Params.redirectUrl }} {{ end }} {{- if .Site.Params.googleSiteVerify }} {{- end -}} {{ $contentRatio := or site.Params.contentratio 0.6 -}} {{ $languageDirection := or site.Language.LanguageDirection "ltr" -}} {{ $vars := dict "text_direction" $languageDirection "content_ratio" (printf "%f%%" (mul $contentRatio 100)) "sidebar_ratio" (printf "%f%%" (mul (sub 1.0 $contentRatio) 100)) "content_ratio_wide" (printf "%f%%" (mul 0.8 (mul $contentRatio 100))) "sidebar_ratio_wide" (printf "%f%%" (mul 0.8 (mul (sub 1.0 $contentRatio) 100))) -}} {{ $options := dict "transpiler" "dartsass" "vars" $vars "targetPath" (printf "css/anatole%s.css" (cond (eq site.Language.LanguageDirection "") "" (printf ".%s" site.Language.LanguageDirection))) -}} {{ with resources.Get "scss/main.scss" -}} {{ if hugo.IsProduction -}} {{ with . | toCSS $options | minify | fingerprint }} {{ end -}} {{ else -}} {{ with . | toCSS $options }} {{ end -}} {{ end -}} {{ end -}} {{ $markupHighlightStyle := resources.Get "css/markupHighlight.css" | resources.Minify | resources.Fingerprint }} {{ range .Site.Params.customCss }} {{ $minstyles := resources.Get . }} {{ $styles := $minstyles | resources.Minify | resources.Fingerprint }} {{ end }} {{ $style := resources.Get "fontawesome/css/fontawesome.min.css" | resources.Fingerprint }} {{ $style := resources.Get "fontawesome/css/solid.min.css" | resources.Fingerprint }} {{ $style := resources.Get "fontawesome/css/regular.min.css" | resources.Fingerprint }} {{ $style := resources.Get "fontawesome/css/brands.min.css" | resources.Fingerprint }} {{ if .Params.redirectUrl }} {{ $style := resources.Get "css/spinner.css" | resources.Minify | resources.Fingerprint }} {{- end -}} {{ if .Site.Params.googleFonts }} {{ $baseUrl := "https://fonts.googleapis.com/css2?family=" }} {{ $fontParam := delimit .Site.Params.googleFonts "&family=" }} {{ $url := printf "%s" "&display=swap" | printf "%s%s" $fontParam | printf "%s%s" $baseUrl | printf "%s" }} {{- end -}} {{- with .Site.Params.license -}} {{- end -}} {{ with .OutputFormats.Get "rss" -}} {{ printf `` .Rel .MediaType.Type .RelPermalink $.Site.Title | safeHTML }} {{ end -}} {{ $anatoleHeader := resources.Get "js/anatole-header.js" }} {{ $secureHeaderJS := $anatoleHeader | resources.Minify | resources.Fingerprint }} {{ if not .Site.Params.disableThemeSwitcher }} {{ $anatoleThemeSwitcher := resources.Get "js/anatole-theme-switcher.js" }} {{ $secureThemeSwitcherJS := $anatoleThemeSwitcher | resources.Minify | resources.Fingerprint }} {{ end }} {{- $js := "" -}} {{- range .Site.Params.customJs -}} {{- if or (in . "http://") (in . "https://") -}} {{- else -}} {{- $customJS := resources.Get . -}} {{- if $customJS -}} {{- if eq $js "" -}} {{- $js = $customJS -}} {{- else -}} {{- $js = slice $js $customJS | resources.Concat "js/custom.js" -}} {{- end -}} {{- end -}} {{- end -}} {{- end -}} {{- if ne $js "" -}} {{- $secureJS := $js | resources.Minify | resources.Fingerprint -}} {{- end -}} {{ if and hugo.IsProduction .Site.Params.plausibleAnalytics .Site.Params.plausibleAnalytics.domain }} {{- partial "analytics/plausible" . -}} {{ end }} {{ if and hugo.IsProduction .Site.Params.umami.serverURL .Site.Params.umami.id }} {{- partial "analytics/umami" . -}} {{ end }} {{ if and hugo.IsProduction .Site.Params.Matomo.instance .Site.Params.Matomo.siteId }} {{- partial "analytics/matomo" . -}} {{ end }} {{ if and hugo.IsProduction .Site.Params.meta.pixelId }} {{- partial "analytics/meta.html" . -}} {{ end }} {{ template "_internal/twitter_cards.html" . }} {{ template "_internal/opengraph.html" . }} {{ partial "schema.html" . }} {{ $noop := .WordCount }} {{ if .Page.Store.Get "hasMath" }} {{ $katex_css_url := printf "https://cdn.jsdelivr.net/npm/katex@latest/dist/katex%s.css" (cond hugo.IsProduction ".min" "") -}} {{ with try (resources.GetRemote $katex_css_url) -}} {{ with .Err -}} {{ errorf "Could not retrieve KaTeX css file from CDN. Reason: %s." . -}} {{ else with.Value -}} {{ with resources.Copy (printf "css/katex%s.css" (cond hugo.IsProduction ".min" "")) . }} {{ $secureCSS := . | resources.Fingerprint "sha512" -}} {{ end -}} {{ end -}} {{ end -}} {{ end }}