{{ define "main" }}
{{ $pages := where site.RegularPages "Section" "ne" "" }} {{- /* exclude non-section pages, e.g. /content/about.md */ -}}
{{ $homePagerSize := or site.Params.homePagerSize 10 }}
{{ $paginator := .Paginate $pages $homePagerSize }}
  {{ .Content }}
  {{ range $paginator.Pages }}
    <h2 class="home-post-title"><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
    {{ partial "main/dates.html" . }}
    {{ with .Summary }}
    {{- /*
    Create deterministic summary output for styling.
    See https://github.com/gohugoio/hugo/issues/8910
    */ -}}
    <p class="summary">{{ . | plainify | htmlUnescape | chomp | truncate 150 }}</p>
    {{- end }}
  {{ end }}
  <nav class="paginator">
  {{- partial "pagination.html" . }} {{/* embedded template */}}
  </nav>
{{ end }}
