Back to Falco

{{

layouts/partials/head.html

latest1.3 KB
Original Source

{{ hugo.Generator }} {{ range .AlternativeOutputFormats -}}{{ end -}} {{ if .Params.keywords }}{{ end }} {{ $outputFormat := partial "outputformat.html" . -}} {{ if and hugo.IsProduction (ne $outputFormat "print") -}}{{ else -}}{{ end -}} {{ if .Params.canonicalUrl }}{{ else if .Params.canonical_url }}{{ else }}{{ end }}{{ partialCached "favicons.html" . }}

{{- if .IsHome -}} {{ .Site.Title -}} {{ else -}} {{ with .Title }}{{ . }} | {{ end -}} {{ .Site.Title -}} {{ end -}}{{ $desc := .Page.Description | default (.Page.Content | safeHTML | truncate 150) -}}{{ template "_internal/opengraph.html" . -}} {{ template "_internal/schema.html" . -}} {{ template "_internal/twitter_cards.html" . -}} {{ partialCached "head-css.html" . "asdf" -}} {{/* TODO: Remove when GA4 is introduced */}} {{ partial "cookie_consent.html" }} {{ if .Site.Params.offlineSearch -}} {{ end -}} {{ if .Site.Params.prism_syntax_highlighting -}}{{ end -}}{{ partial "hooks/head-end.html" . -}} {{/* To comply with GDPR, cookie consent scripts places in head-end must execute before Google Analytics is enabled */ -}} {{ if hugo.IsProduction -}} {{ $gaID := .Site.Config.Services.GoogleAnalytics.ID -}} {{ if $gaID -}} {{ template "_internal/google_analytics.html" . -}} {{ end -}} {{ end -}}