1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
--- layout: default title: 文章彙整 --- {% for post in site.posts reverse %} <section class="archive"> {% capture this_year %}{{ post.date | date: "%Y" }}{% endcapture %} {% unless year == this_year %} {% assign year = this_year %} <h1 class="archive-title">{{ year }}</h1> {% endunless %} <article class="archive"> {% include archive_post.html %} </article> </section> {% endfor %}