{% 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 %}