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

Match post.name instead of slugs and dates #3058

Merged
merged 3 commits into from Nov 17, 2014

Conversation

Projects
None yet
3 participants
@alfredxing
Member

alfredxing commented Nov 5, 2014

Match posts in post_url tag based on post.name and path only, instead of matching parsed dates and slugs.

Fixes #3057.

Show outdated Hide outdated lib/jekyll/tags/post_url.rb Outdated
Show outdated Hide outdated lib/jekyll/tags/post_url.rb Outdated

@parkr parkr modified the milestone: 3.0 Nov 5, 2014

@parkr

This comment has been minimized.

Show comment
Hide comment
@parkr

parkr Nov 9, 2014

Member

Would you please make this backwards-compatible? If it fails with the new method, then try the old.

Member

parkr commented Nov 9, 2014

Would you please make this backwards-compatible? If it fails with the new method, then try the old.

@alfredxing

This comment has been minimized.

Show comment
Hide comment
@alfredxing

alfredxing Nov 9, 2014

Member

Sure, I'll work on it later today.

Member

alfredxing commented Nov 9, 2014

Sure, I'll work on it later today.

@alfredxing

This comment has been minimized.

Show comment
Hide comment
@alfredxing

alfredxing Nov 9, 2014

Member

I implemented the backwards compatibility, but I can't think of any post names/paths that would have to fall back to test this on... Can you think of any?

Member

alfredxing commented Nov 9, 2014

I implemented the backwards compatibility, but I can't think of any post names/paths that would have to fall back to test this on... Can you think of any?

@alfredxing alfredxing referenced this pull request Nov 11, 2014

Closed

Post_url trouble #3051

@parkr

This comment has been minimized.

Show comment
Hide comment
@parkr

parkr Nov 11, 2014

Member

I can't think of any post names/paths that would have to fall back to test this on

It's around time zones and the break of day. So something for 22h00 -0800 would behave differently in a UTC build environment (because it'd be 06h00Z

Member

parkr commented Nov 11, 2014

I can't think of any post names/paths that would have to fall back to test this on

It's around time zones and the break of day. So something for 22h00 -0800 would behave differently in a UTC build environment (because it'd be 06h00Z

@alfredxing

This comment has been minimized.

Show comment
Hide comment
@alfredxing

alfredxing Nov 11, 2014

Member

Right. So an example case would be if I had a post with name 2014-11-10-random-slug and date: 2014-11-10 23:00 -10:00 while calling {{ post_url 2014-11-11-random-slug }} in a PST environment...

Member

alfredxing commented Nov 11, 2014

Right. So an example case would be if I had a post with name 2014-11-10-random-slug and date: 2014-11-10 23:00 -10:00 while calling {{ post_url 2014-11-11-random-slug }} in a PST environment...

@parkr

This comment has been minimized.

Show comment
Hide comment
@parkr

parkr Nov 11, 2014

Member

Yes! Travis runs on UTC so I tend to create a non-UTC time and check it the UTC timezone.

Member

parkr commented Nov 11, 2014

Yes! Travis runs on UTC so I tend to create a non-UTC time and check it the UTC timezone.

@alfredxing

This comment has been minimized.

Show comment
Hide comment
@alfredxing

alfredxing Nov 11, 2014

Member

But this behaviour would likely be phased out in a later version, right? It's not intuitive at all and the only use case for it would have been to bypass the buggy behaviour.

Member

alfredxing commented Nov 11, 2014

But this behaviour would likely be phased out in a later version, right? It's not intuitive at all and the only use case for it would have been to bypass the buggy behaviour.

@parkr

This comment has been minimized.

Show comment
Hide comment
@parkr

parkr Nov 12, 2014

Member

But this behaviour would likely be phased out in a later version, right?

Yes! But we can ship it pre-3.0 if we have backwards-compatibility.

Member

parkr commented Nov 12, 2014

But this behaviour would likely be phased out in a later version, right?

Yes! But we can ship it pre-3.0 if we have backwards-compatibility.

Show outdated Hide outdated lib/jekyll/tags/post_url.rb Outdated
@parkr

This comment has been minimized.

Show comment
Hide comment
@parkr

parkr Nov 12, 2014

Member

Just one more thing! 👍

Member

parkr commented Nov 12, 2014

Just one more thing! 👍

@alfredxing

This comment has been minimized.

Show comment
Hide comment
@alfredxing

alfredxing Nov 12, 2014

Member

Done! 🚢

Member

alfredxing commented Nov 12, 2014

Done! 🚢

parkr added a commit that referenced this pull request Nov 17, 2014

@parkr parkr merged commit 687b9cd into jekyll:master Nov 17, 2014

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details

@parkr parkr added the fix label Nov 17, 2014

@parkr parkr modified the milestones: 2.5.2, 3.0 Nov 17, 2014

parkr added a commit that referenced this pull request Nov 17, 2014

@jekyll jekyll locked and limited conversation to collaborators Feb 27, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.