{% extends "_layout/base.html" %} {% block title %} 归档 {% endblock %} {% block content %}

Archives

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

{{ this_year }}

{% endif %}

{{ post.title }}

{% endfor %}
{% endblock %}