{% 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') %}
{{ this_year }}
{% else %}
{% endif %}
{{ post.pub_time.strftime('%b %d') }} , {% for category in post.categories %}{{ category }} {% endfor %}