Break up article page into dates
diff --git a/templates/archives.html b/templates/archives.html
index 27ddf6f..7201bbd 100644
--- a/templates/archives.html
+++ b/templates/archives.html
@@ -9,9 +9,17 @@
<article>
<div class="article_text">
<dl>
- {% for article in dates %}
- <dt>{{ article.locale_date }}</dt>
- <dd><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></dd>
+ {% for year, year_articles in articles|groupby('date.year')|reverse %}
+ <h2>{{ year }}</h2>
+ {% for _, month_articles in year_articles|groupby('date.month')|reverse %}
+ {# A little gross, but works (need a date object to get the month name). #}
+ <h3>{{ month_articles[0].date.strftime('%B') }}</h3>
+ <ul>
+ {% for article in month_articles %}
+ <li><span>{{ article.date.strftime('%b %d, %Y') }}</span> - <a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></li>
+ {% endfor %}
+ </ul>
+ {% endfor %}
{% endfor %}
</dl>
</div>