{{ if $.Scratch.Get "paginator" -}} {{ $paginator := .Paginate (where .Site.RegularPages.ByDate.Reverse "Section" "posts" ) -}} {{ else -}} {{ end -}} {{ with .Site.Params.title -}} {{ end -}} {{ $iso8601 := "2006-01-02T15:04:05-07:00" -}} {{ if .IsPage -}} {{ if not .PublishDate.IsZero -}} {{ else if not .Date.IsZero -}} {{ end -}} {{ if not .Lastmod.IsZero -}} {{ end -}} {{ else -}} {{ if not .Date.IsZero -}} {{ end -}} {{ end -}} {{ $images := $.Resources.ByType "image" -}} {{ $feature := $images.GetMatch "*feature*" -}} {{ $feature_param := $.Params.feature_image }} {{ $feature_frontmatter := $images.GetMatch $feature_param }} {{ if $feature_frontmatter -}} {{ with $.Params.feature_image_alt }} {{ end }} {{ else if $feature -}} {{ with $.Params.feature_image_alt }} {{ end }} {{ else if $.Params.images }} {{ else if $.Site.Params.images }} {{ end }} {{ with .Params.audio -}} {{ end -}} {{ with .Params.videos -}} {{ range . -}} {{ end -}} {{ end -}} {{- /* If it is part of a series, link to related articles */}} {{- $permalink := .Permalink }} {{- $siteSeries := .Site.Taxonomies.series }} {{/* Only add property if taxonomy is enabled */}} {{ if $siteSeries }} {{ with .Params.series }}{{- range $name := . }} {{- $series := index $siteSeries ($name | urlize) }} {{- range $page := first 6 $series.Pages }} {{- if ne $page.Permalink $permalink }}{{ end }} {{- end }} {{ end }}{{ end }} {{ end }}