{{ .Scratch.Set "title" .Site.Title }} {{ .Scratch.Set "publisherIcon" .Site.Params.favicon }} {{ if .Site.Params.publisherIcon }} {{ .Scratch.Set "publisherIcon" .Site.Params.publisher_icon }} {{ end }} {{ if eq .Kind "home" }} {{ .Scratch.Set "title" $.Site.Params.brand }} {{ .Scratch.Set "description" .Site.Params.Description }} {{ else }} {{ .Scratch.Set "description" .Description }} {{ end }} {{ if .IsSection }} {{ .Scratch.Set "title" ($.Site.Params.brand) }} {{ .Scratch.Add "title" " - " }} {{ .Scratch.Add "title" .LinkTitle }} {{ end }} {{ if .IsPage }} {{ .Scratch.Set "title" ($.Site.Params.brand) }} {{ .Scratch.Add "title" " - " }} {{ .Scratch.Add "title" .LinkTitle }} {{ end }} {{ "" | safeHTML }} {{ $image_path := .Params.image | default .Site.Params.og_image -}} {{ with $image_path }} {{ $image_path_local := printf "assets/%s" $image_path -}} {{ $image_ext := trim (path.Ext $image_path | lower) "." -}} {{ if fileExists $image_path_local -}} {{ $image_path:= resources.Get $image_path}} {{/* If not SVG, read image aspect ratio and define Twitter Card and Open Graph width and height */ -}} {{ if ne $image_ext "svg" -}} {{ with (imageConfig $image_path_local) -}} {{ if (and (gt .Width 144) (gt .Height 144)) -}} {{ end -}} {{ end -}} {{ end -}} {{ end -}} {{ end -}}