{% extends "_layout/base.html" %} {% block title %} Archives {% endblock %} {% block content %} {% for post in posts %} {% endfor %} {% set this_year = 0 %} {% for post in posts %} {% set this_month = post.pub_time.strftime('%b') %} {% if this_year != post.pub_time.strftime('%Y') %} {% set this_year = post.pub_time.strftime('%Y') %}