{{ define "main" }}
{{ .Content }} {{- /* The homepage should show only pages from the given sections (with `$.Site.Params.mainSections`). Otherwise, we take the pages of a section. */ -}} {{ $pages := .Pages }} {{ if .IsHome }} {{ $pages = where $.Site.RegularPages "Type" "in" $.Site.Params.mainSections }} {{ end }} {{ range (.Paginate $pages).Pages }}

{{ .Title }}

{{- if and .GitInfo (ne (.PublishDate.Format "2006-01-02") (.Lastmod.Format "2006-01-02")) }} {{- end }} {{- /* The authors are appended with 'et al' if there's more than one author in the map. */ -}} {{ with .Params.author }} {{ $author := index (first 1 .) 0 }} {{ $author.name }}{{ if ge (len .) 2 }}, et al.{{ end }} {{ end }}
{{ end }} {{ partial "pagination.html" (dict "Paginator" .Paginator "activeNumberOfPages" 2) }} {{ end }}