{{- $title := "" -}} {{- if .IsHome -}} {{- $title = .Site.Title -}} {{- else -}} {{- if .Params.heading -}} {{- $title = .Params.heading -}} {{- else -}} {{- $title = print .Site.Title " | " .Title -}} {{- end -}} {{- end -}} {{ with .Site.Params.description }}{{ end }} {{ with .Site.Params.keywords }}{{ end }} {{ $title }} {{- partialCached "head/css.html" . }} {{- $image := "" -}} {{- $imagesrc := (.Page.Params.headerimage.src | default .Site.Params.avatar) -}} {{- if eq .Page.BundleType "leaf" }} {{- with .Page.Resources.GetMatch $imagesrc }} {{- $image = . -}} {{- end }} {{- else }} {{- with resources.GetMatch (printf "**/%s" $imagesrc) }} {{- $image = . -}} {{- end }} {{- end }} {{- if $image }} {{- $image = $image.Fill "1200x630 jpg" -}} {{- end }} {{- with $image }} {{- end }}