{{ if .IsHome -}} {{ .Scratch.Set "title" .Site.Title }} {{- else if .Params.heading -}} {{ .Scratch.Set "title" .Params.heading }} {{- else -}} {{ .Scratch.Set "title" (printf "%s | %s" .Title .Site.Title) }} {{- end }} {{ range .Site.Menus.main -}} {{ $.Page.Scratch.Set .Identifier . }} {{- end }} {{ .Scratch.Get "title" }} {{ if .Description -}} {{- else if .Site.Params.description -}} {{- else if .Summary -}} {{- end }} {{ if (default site.Params.author site.Params.author.name) -}} {{- end }} {{ with .Site.Params.Social -}} {{ $twitter := index (where . "type" "==" "twitter") 0 }} {{ with $twitter }} {{- end }} {{ end -}} {{ with .Site.Params.opengraphImage -}} {{ with resources.Get . -}} {{ $img := .Fill "1280x640 Lanczos Center" }} {{ $img = slice $img | resources.Concat (printf "opengraph%s" (path.Ext .)) }} {{- else -}} {{- end }} {{- end }} {{ with .Site.Params.favicon -}} {{ with (resources.Get .) -}} {{ $img := slice (.Fill "192x192 png Lanczos Center") | resources.Concat "favicon.png" }} {{- else -}} {{- end }} {{- end }} {{ if .Description -}} {{- else if .Site.Params.description -}} {{- else if .Summary -}} {{- end }} {{ with .Site.Params.themeColor }} {{ end }} {{ with .OutputFormats.Get "RSS" -}} {{- end }} {{ if .Site.Params.Feat.useStructuredData -}} {{ $s := (resources.Get "person.json" | resources.ExecuteAsTemplate "person.json" .).Content }} {{/* Validate what we have rendered so that we don't render something that is not readable by a robot */}} {{ $_ := unmarshal $s }} {{- end }} {{ partial "lazyimg-setup" . }} {{ if .Site.Params.Feat.googleTagManager }} {{ end }} {{ if .Site.GoogleAnalytics }} {{ template "_internal/google_analytics_async.html" . }} {{ end }} {{ partial "head-extended.html" . }}