web/_tabs/archives.md
2020-11-22 04:24:09 +08:00

1.2 KiB

title icon order
Archives fas fa-archive 3
{% 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 %}