diff --git a/_includes/JB/posts_collate b/_includes/JB/posts_collate index f612ade871..dd2678f4a4 100644 --- a/_includes/JB/posts_collate +++ b/_includes/JB/posts_collate @@ -23,8 +23,8 @@ Usage: {% for post in posts_collate %} {% capture this_year %}{{ post.date | date: "%Y" }}{% endcapture %} {% capture this_month %}{{ post.date | date: "%B" }}{% endcapture %} - {% capture next_year %}{{ post.previous.date | date: "%Y" }}{% endcapture %} - {% capture next_month %}{{ post.previous.date | date: "%B" }}{% endcapture %} + {% capture next_year %}{{ posts_collate[forloop.index].date | date: "%Y" }}{% endcapture %} + {% capture next_month %}{{ posts_collate[forloop.index].date | date: "%B" }}{% endcapture %} {% if forloop.first %}