{{- /* head-seo.html — , meta description, canonical, Open Graph, Twitter, RSS alternate, and JSON-LD (delegated to schema-jsonld.html). All values fall back sensibly to brand data. */ -}} {{- $brand := .Site.Data.brand -}} {{- $title := "" -}} {{- if .IsHome -}} {{- $title = .Params.title | default (printf "%s | %s" $brand.name $brand.tagline) -}} {{- else -}} {{- $title = printf "%s | %s" (.Params.title | default .Title) $brand.name -}} {{- end -}} {{- $desc := "" -}} {{- with .Params.description -}} {{- $desc = . -}} {{- else -}} {{- $desc = .Summary | default .Site.Params.defaultDescription -}} {{- end -}} {{- $desc = $desc | plainify | chomp | truncate 160 -}} {{- /* Per-page OG image override (.Params.image) with fallback to the site default. */ -}} {{- $ogImage := (.Params.image | default .Site.Params.ogImage) | absURL -}} <title>{{ $title }} {{- /* Open Graph */ -}} {{- /* Twitter */ -}} {{- /* hreflang alternates for the multilingual build. No-op on single-language sites (.IsTranslated is false), so it is safe to keep permanently. URL scheme: defaultContentLanguageInSubdir = false (English at root). */ -}} {{- if .IsTranslated -}} {{- range .AllTranslations -}} {{- end -}} {{- /* x-default must point at the site's DEFAULT content language (English at root), independent of the page currently being rendered. site.Languages is ordered by weight, so index 0 is the default language. */ -}} {{- $defaultLang := (index site.Languages 0).Lang -}} {{- range .AllTranslations -}} {{- if eq .Language.Lang $defaultLang -}} {{- end -}} {{- end -}} {{- range .Translations -}} {{- end -}} {{- end }} {{ with .OutputFormats.Get "RSS" -}} {{- end }} {{ partial "schema-jsonld.html" . }}