---
title: Archives
icon: fas fa-archive
order: 3
# The Archives of posts.
# v2.0
# https://github.com/cotes2020/jekyll-theme-chirpy
# © 2017-2019 Cotes Chung
# MIT License
---
{% 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 %}