{% extends "base.html" %}
{% block title %} Archive | {{ SITENAME }} {% endblock %}
{% block content %}
<section>
    <h4 class="post-author"><a href="{{ SITEURL }}">{{ SITENAME }}</a></h4>
    <hr>
    <h1 class="section-header">Blog Archives</h1>
    {% for year, date_year in dates|groupby( 'date.year' ) %}
        <h2 class="section-header">{{ year }}</h2>
        {% for month, articles in date_year|groupby( 'date.month' ) %}
            <h3>{{ articles[ 0 ].date.strftime( '%B' ) }}</h3>
            <ul class="unstyled">
                {% for article in articles %}
                  <li><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></li>
                {% endfor %}
            </ul>
        {% endfor %}
    {% endfor %}
</section>
{% endblock %}
