{{ define "main" }}
<div class="container">
    <main class="post-index">
        {{ $pagesToShow := where .Pages "Section" "journal" }}
        {{ $posts := $pagesToShow.ByDate.Reverse }}
        {{ range $posts }}
        <article class="post-item {{- if .Params.hidden }} !hidden {{- end -}}">
            <h4 class="post-item-title">
                <a href="{{ .RelPermalink }}">{{ .Title }}</a>
            </h4>
            {{ $ISO_date := "2006-01-02T15:04:05Z0700" }}
            {{ $configDateFormat := .Site.Params.dateFormat | default "2 Jan 2006" }}
            <time class="post-item-meta" datetime="{{ dateFormat $ISO_date .Date }}">
                {{ time.Format $configDateFormat .Date }}
            </time>
        </article>
        {{ end }}
    </main>
</div>
{{ end }}