{{ if or (eq site.BaseURL "/") (eq site.BaseURL "http://localhost:1313/") }} {{ else }} {{ end }} {{ $title := site.Title }} {{ if .Params.meta_title }} {{ $title = .Params.meta_title }} {{ else if .Params.title }} {{ $title = .Params.title }} {{ end }} {{ $description := .Summary }} {{ if .Params.meta_description }} {{ $description = .Params.meta_description }} {{ else if .Params.description }} {{ $description = .Params.description }} {{ else if site.Params.metadata.description }} {{ $description = site.Params.metadata.description }} {{ end }} {{ $imagePath := site.Params.metadata.image }} {{ if .Params.meta_image }} {{ $imagePath = .Params.meta_image }} {{ else if .Params.images }} {{ range first 1 .Params.images }} {{ $imagePath = . }} {{ end }} {{ else if .Params.image }} {{ $imagePath = .Params.image }} {{ end }} {{ $title }} {{ if .Param "noindex" }} {{ end }} {{ with .Params.canonical }} {{ end }} {{ if .IsTranslated }} {{ range .AllTranslations }} {{ end }} {{ end }} {{ if .Params.keywords }} {{ else if site.Params.metadata.keywords }} {{ end }} {{ with site.Params.metadata.author }} {{ end }} {{ if or (hasPrefix $imagePath "http") (fileExists (add `static/` (string $imagePath))) }} {{ else }} {{ $contentImage:= .Resources.GetMatch (printf "*%s*" $imagePath) }} {{ $assetImage:= fileExists (add `assets/` (string $imagePath)) }} {{ if or $contentImage $assetImage }} {{ if $contentImage }} {{ .Scratch.Set "image-exists" $contentImage }} {{ else if $assetImage }} {{ .Scratch.Set "image-exists" (resources.Get $imagePath) }} {{ end }} {{ $image:= .Scratch.Get "image-exists" }} {{ $imageExt:= path.Ext $image }} {{ if ne $imageExt `.svg` }} {{ $imageWidth := $image.Width }} {{ $imageHeight := $image.Height }} {{ if (and (gt $imageWidth 144) (gt $imageHeight 144)) }} {{ end }} {{ end }} {{ end }} {{ end }} {{ with site.Params.metadata.twitter }} {{ end }} {{ with site.Params.metadata.author }} {{ end }}