{{- if hugo.IsProduction | or (eq site.Params.env "production") | and (ne .Params.offTheRecord true) }} {{- else }} {{- end }} {{- /* Title */}} {{ if .IsHome }}{{ else }}{{ if .Title }}{{ .Title }} | {{ end }}{{ end }}{{ site.Title }} {{- /* Meta */}} {{- if .IsHome }} {{ with site.Params.keywords -}}{{ end }} {{- else }} {{- end }} {{- if site.Params.analytics.googlesiteVerificationTag }} {{- end }} {{- if site.Params.analytics.yandexsiteVerificationTag }} {{- end }} {{- if site.Params.analytics.bingsiteVerificationTag }} {{- end }} {{- /* Styles */}} {{- $theme_vars := (resources.Get "css/core/theme-vars.css") }} {{- $reset := (resources.Get "css/core/reset.css") }} {{- $media := (resources.Get "css/core/zmedia.css") }} {{- $common := (resources.Match "css/common/*.css") | resources.Concat "assets/css/common.css" }} {{- /* include `an-old-hope` if hljs is on */}} {{- $isHLJSdisabled := (site.Params.assets.disableHLJS | default false) }} {{- $hljs := (cond ($isHLJSdisabled) (" " | resources.FromString "assets/css/hljs-blank.css") (resources.Get "css/hljs/an-old-hope.min.css")) }} {{- /* order is important */}} {{- $core := (slice $theme_vars $reset $common $hljs $media) | resources.Concat "assets/css/core.css" }} {{- $extended := (resources.Match "css/extended/*.css") | resources.Concat "assets/css/extended.css" }} {{- /* bundle all required css */}} {{- /* Add extended css after theme style */ -}} {{- $stylesheet := (slice $core $extended) | resources.Concat "assets/css/stylesheet.css" | minify }} {{- if not site.Params.assets.disableFingerprinting }} {{- $stylesheet := $stylesheet | fingerprint }} {{- else }} {{- end }} {{- /* Search */}} {{- if (eq .Layout `search`) -}} {{- $fastsearch := resources.Get "js/fastsearch.js" | js.Build (dict "params" (dict "fuseOpts" site.Params.fuseOpts)) }} {{- $fusejs := resources.Get "js/fuse.basic.min.js" }} {{- if not site.Params.assets.disableFingerprinting }} {{- $search := (slice $fusejs $fastsearch ) | resources.Concat "assets/js/search.js" | minify | fingerprint }} {{- else }} {{- $search := (slice $fusejs $fastsearch ) | resources.Concat "assets/js/search.js" | minify }} {{- end }} {{- end -}} {{- /* Highlight.js */}} {{- $isHLJSdisabled := (site.Params.assets.disableHLJS | default .Params.disableHLJS ) }} {{- if (and (eq .Kind "page") (ne .Layout "archives") (ne .Layout "search") (not $isHLJSdisabled)) }} {{- if not site.Params.assets.disableFingerprinting }} {{- $highlight := slice (resources.Get "js/highlight.min.js") | resources.Concat "assets/js/highlight.js" | minify | fingerprint }} {{- else }} {{- $highlight := slice (resources.Get "js/highlight.min.js") | resources.Concat "assets/js/highlight.js" | minify }} {{- end }} {{- end }} {{- /* Favicons */}} {{- /* RSS */}} {{ range .AlternativeOutputFormats -}} {{ end -}} {{- range .AllTranslations -}} {{ end -}} {{- partial "extend_head.html" . -}} {{- /* Misc */}} {{- if hugo.IsProduction | or (eq site.Params.env "production") }} {{- template "_internal/google_analytics.html" . }} {{- template "partials/templates/opengraph.html" . }} {{- template "partials/templates/twitter_cards.html" . }} {{- template "partials/templates/schema_json.html" . }} {{- end -}}