{% extends "base.html" %} {% block title %} Archives {% endblock %} {% block top_center %}

Archives

{% endblock %} {% block content %} {% set year_range = [] %} {% for year in range(dates[-1].date.year, dates[0].date.year + 1) %} {% if year_range.append(year) %}{% endif %} {% endfor %} {% set year_range = year_range[::-1] %}
{% for year in year_range %}
{% set current_month = False %} {% for article in dates %} {% if article.date.year == year %} {% if article.date.month != current_month %} {% set current_month = article.date.month %} {% if not loop.first %} {# Triggers lint error with curlylint. This is a bug, see: https://github.com/thibaudcolas/curlylint/issues/14 #} {% endif %}
{% endif %}
{{ article.date.strftime('%b. %d') }}
{{ article.title }}
{% if loop.last %}
{% endif %} {% endif %} {% endfor %}
{% endfor %}
{% endblock %}