{% capture date %}{{ post.date }}{% endcapture %} {% capture this_year %}{{ date | date: "%Y" }}{% endcapture %} {% capture number %}{{ forloop.length }}{% endcapture %} {% unless year == this_year %} {% assign year = this_year %} {% unless forloop.first %} {% endunless %}

{{ date | date: "%Y" }}