{{- if .IsPage -}} {{- $iso8601 := "2006-01-02T15:04:05-07:00" -}} {{ with .PublishDate }}{{ end}} {{ with .Lastmod }}{{ end}} {{- with $.Params.images -}} {{- range first 6 . -}}{{ end -}} {{- else -}} {{- $images := $.Resources.ByType "image" -}} {{- $featured := $images.GetMatch "*feature*" -}} {{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}} {{- with $featured -}} {{- else -}} {{- with $.Site.Params.images -}}{{ end -}} {{- end -}} {{- end -}} {{- end -}}