Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

posts_collate shows wrong year and month for sub sets of posts #258

@bo0ts

Description

@bo0ts

When collating a subset of a tag with:

{% assign posts_collate = site.tags.WIP %}
{% include JB/posts_collate %}

the generated list will not show the correct month and year when the posts which are not in the subset cross the month or year boundary.

As far as I can tell this is caused by the following code in posts_collate:

{% capture next_year %}{{ post.previous.date | date: "%Y" }}{% endcapture %}
{% capture next_month %}{{ post.previous.date | date: "%B" }}{% endcapture %}

post.previous is not the actual previous post in a subset. The correct previous post would be the next post in the array.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions