{% for year in grouped_posts %}
{{ year }}
-
{% for month, month_posts in grouped_posts[year] %}
- {{ month }}. {{ month_posts|length }} posts {% endfor %}