{{ $origin := cond (eq .Site.Params.assets.self_host true) "basic" "cors" }} {{ $data := index .Site.Data.origin $origin }} {{- $jsOpts := dict "target" "es2015" "minify" (eq hugo.Environment "production") -}} {{- $themeOpts := merge $jsOpts (dict "global" "Theme") -}} {{- $theme := resources.Get "js/modules/theme.js" | js.Build $themeOpts -}} {{ template "_internal/opengraph.html" . }} {{ template "_internal/twitter_cards.html" . }} {{ template "_internal/schema.html" . }} {{ if ne .Kind "home" }} {{ .Title | safeHTML }} | {{ end }} {{ site.Title }} {{ partialCached "favicons.html" . }} {{ if not site.Params.assets.self_host }} {{ range site.Data.origin.cors.resource_hints }} {{ $url := .url }} {{ range .links }} {{ end }} {{ end }} {{ end }} {{ if not hugo.IsProduction }} {{ end }} {{ $opts := dict "transpiler" "dartsass" "targetPath" "css/main.css" "enableSourceMap" true }} {{ $sass := resources.Get "scss/main.bundle.scss" }} {{ $style := $sass | toCSS $opts | minify | fingerprint }} {{ if .Params.toc | default site.Params.toc }} {{ end }} {{ if or (eq .Type "post") (eq .Type "page") (eq .Kind "home") }} {{ end }} {{ if or (eq .Type "page") (eq .Type "post") }} {{ end }} {{ partial "js-selector.html" . }} {{ if hugo.IsProduction }} {{ if site.Params.pwa.enabled }} {{ end }} {{ range $platform, $config := site.Params.analytics }} {{ if and $config.id (ne $config.id "") }} {{ partial (printf "analytics/%s.html" $platform) . }} {{ end }} {{ end }} {{ end }} {{ partial "metadata-hook.html" . }}