{{ define "main" }} {{ .Title }} {{ .Description }} {{ if .Site.Params.show_post_dates | default true }} {{- with .Date }}{{ . | time.Format ":date_medium" }}{{ end }} {{ end }} {{ partial "tags.html" . }} {{- if or .Params.image .Params.featured }} {{- $maxHeight := 600 -}} {{ $rasters := slice "jpeg" "png" }} {{- $img := "#" -}} {{- if .Params.image -}} {{/* se è stata definita un'immagine featured */}} {{- $img = .Page.Resources.GetMatch .Params.image -}} {{- end -}} {{- if .Params.featured -}} {{/* se è stata definita un'immagine featured */}} {{- $img = .Page.Resources.GetMatch .Params.featured -}} {{- end -}} {{- if in $rasters $img.MediaType.SubType -}} {{- if gt $img.Height $maxHeight -}} {{- $img = $img.Resize (printf "x%d webp q50" $maxHeight) -}} {{- end -}} {{ else }} {{ end }} {{ end }} {{- .Content }} {{ end }}
{{ .Description }}