{{ define "main" }}
<main class="container">
    <header>
        <h2>{{.Title}}</h2>
    </header>
    <!-- "{{.Content}}" pulls from the markdown content of the corresponding
         _index.md -->
    {{.Content}}
    <article class="posts-list">
        <!-- Ranges through content/posts/*.md in reverse order, then displays
             the post title, the date and categories (list-footer template) -->
        {{ range .Pages.ByPublishDate.Reverse }}
        <article>
            <a href="{{.Permalink}}">{{.Title}}</a>
            {{ partial "lists-footer.html" . }}
        </article>
        {{ end }}
    </article>
</main>
{{ end }}
