Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
bo0ts opened this issue Mar 31, 2015 · 1 comment · May be fixed by #259
Open

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

bo0ts opened this issue Mar 31, 2015 · 1 comment · May be fixed by #259
Assignees
Labels
Milestone

Comments

@bo0ts
Copy link

bo0ts commented Mar 31, 2015

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.

bo0ts pushed a commit to bo0ts/jekyll-bootstrap that referenced this issue Mar 31, 2015
@bo0ts bo0ts linked a pull request Mar 31, 2015 that will close this issue
@groundh0g
Copy link
Collaborator

Based on your description, the fix seems sound. I'll do some testing to verify (all posts, subset of posts, ...) then incorporate your changes if all seems well or report back using this issue if I see any problems.

Thanks for the contribution!

@groundh0g groundh0g added the bug label Apr 1, 2015
@groundh0g groundh0g added this to the v 0.5.0 milestone Apr 1, 2015
@groundh0g groundh0g self-assigned this Apr 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants