{% comment %} Displays a list of posts broken down by year. {% endcomment %} {% for post in site.posts %} {% capture currentyear %}{{ post.date | date: "%Y" }}{% endcapture %} {% if currentyear != year %} {% unless forloop.first %} {% endunless %}