{% comment %}{% endcomment %}
{% for post in posts %} {% capture this_year %}{{ post.date | date: "%Y" }}{% endcapture %} {% capture this_month %}{{ post.date | date: "%B" }}{% endcapture %} {% unless forloop.last %} {% assign next_index = forloop.index + 1 %} {% assign next_post = posts[next_index] %} {% capture next_year %}{{ next_post.date | date: "%Y" }}{% endcapture %} {% capture next_month %}{{ next_post.date | date: "%B" }}{% endcapture %} {% endunless %} {% if forloop.first %}

{{this_year}}

{{this_month}}

{% else %} {% if this_year != next_year %}

{{next_year}}

{{next_month}}

{{next_month}}