web/tabs/archives.md
2020-01-14 02:57:31 +08:00

1.1 KiB

title
Archives
{% for post in site.posts %} {% capture this_year %}{{ post.date | date: "%Y" }}{% endcapture %} {% capture pre_year %}{{ post.previous.date | date: "%Y" }}{% endcapture %} {% if forloop.first %} {% assign last_day = "" %} {% assign last_month = "" %} {{this_year}}
    {% endif %}
  • {% capture this_day %}{{ post.date | date: "%d" }}{% endcapture %} {% capture this_month %}{{ post.date | date: "%b" }}{% endcapture %} {{ this_day }} {{ this_month }} {{ post.title }}
  • {% if forloop.last %}
{% elsif this_year != pre_year %} {{pre_year}}
    {% assign last_day = "" %} {% assign last_month = "" %} {% endif %} {% endfor %}