{{ $dateFormat := default "Mon Jan 2, 2006" (index .Site.Params "date_format") }}

Title of a longer featured blog post

Multiple lines of text that form the lede, informing new readers quickly and efficiently about what’s most interesting in this post’s contents.

Continue reading...

{{ range first 2 (where .Site.RegularPages "Section" "in" .Site.Params.mainSections) | shuffle }}
World

{{ .Title }}

{{ if not .PublishDate.IsZero }}{{ end }}

{{ substr .Description 0 110 }}

Continue reading
{{ range first 1 (.Resources.ByType "image") }} {{/* get a local variable for the image because we will change context below */}} {{ $image := . }} {{/* set orientation to 1 just in case it doesnt exist in Exif */}} {{ $orientation := 1 }} {{ with .Exif }} {{ $orientation = .Tags.Orientation }} {{ if eq $orientation 8 }} {{/* Rotate image before cropping because Hugo's "Smart" cropping crops differently if we do it at the same time as .Fill with a rotation) and use 2x dimensions to keep the thumbnail crisp */}} {{ $RotatedImage := $image.Resize "480x600 r90" }} {{ else }} {{ end }} {{ end }} {{ end }}
{{ end }}
{{- /* vim: set ts=2 sw=2 et: */}}