--- layout: default home: true --- {% for post in site.posts %} {% capture current_year %} {{post.date | date: "%Y"}} {% endcapture %} {% if current_year != previous_year %} {% assign previous_year = current_year %}