{{ define "main" }}
<div class="posts-list">
    {{ $paginator := .Paginate (where .Pages "Params.hidden" "ne" true) }}
    {{ range sort .Paginator.Pages }}
    <article class="book-posts mx-auto">
        <h2>
            <a href="{{ .RelPermalink }}">{{ .Title }}</a>
        </h2>
        <h5>
            <strong>{{ .Date.Format "January 2, 2006" }}</strong>
        </h5>
        <p>
            {{- .Summary -}}
            {{ if .Truncated }}
            <a href="{{ .RelPermalink }}">...</a>
            {{ end }}
        </p>
    </article>
    {{ end }}
    {{ template "_internal/pagination.html" . }}
</div>
{{ end }}
