Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions _includes/JB/posts_collate
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
<h2>{{this_year}}</h2>
Expand Down Expand Up @@ -52,4 +52,4 @@ Usage:
{% endif %}
{% endfor %}
{% endif %}
{% assign posts_collate = nil %}
{% assign posts_collate = nil %}