{{- $title := .Title | default .Site.Title -}} {{- $desc := .Description | default .Summary | default .Site.Params.description | plainify | truncate 200 -}} {{/* Resolve image: page resource cover.* > .Params.image > site default */}} {{- $image := "" -}} {{- with .Resources.GetMatch "cover.*" -}} {{- $img := .Resize "1200x webp q90" -}} {{- $image = $img.Permalink -}} {{- else -}} {{- with $.Params.image -}} {{- $image = . -}} {{- else -}} {{- $image = $.Site.Params.images.default | default "/images/og-default.png" -}} {{- end -}} {{- end -}} {{- if and $image (not (strings.HasPrefix $image "http")) -}} {{- $image = $image | absURL -}} {{- end -}} {{- if $image }} {{- end }} {{/* Audio-specific OpenGraph tags */}} {{- if and (eq .Section "tracks") .Params.audio }} {{- if .Params.duration }} {{- end }} {{- if .Params.artist }} {{- end }} {{- end }}