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

Using post_url causes pages to not build in Github #3179

Closed
mdayaram opened this Issue Dec 3, 2014 · 9 comments

Comments

Projects
None yet
8 participants
@mdayaram
Copy link

mdayaram commented Dec 3, 2014

I have a blog post where I link to a different post using the post_url feature like so:

[text]({% post_url 2014-08-30-my-title %})

When I run jekyll locally, everything is rendered correctly and the link appears properly. Both the post with the markup and the post being linked are in the same directory.

However, when I push to Github, I get a build error notification without a description. I've verified that removing the reference to post_url fixes the build.

My project uses the gh-pages gem, and I've verified that my environment locally matches the environment that Github uses (listed here: https://pages.github.com/versions/)

The error email I get from Github is anything but helpful:


The page build failed with the following error:

Page build failed. For more information, see https://help.github.com/articles/troubleshooting-github-pages-build-failures.


I've gone through the troubleshooting link and was not able to find any information regarding this problem. Is there anything that I might be doing incorrectly? For reference, here's the diff that breaks my build in github but works locally:

mdayaram/mdayaram.github.io@a7efa6a

@edwinlunando

This comment has been minimized.

Copy link

edwinlunando commented Feb 3, 2015

Yes, i get this errors too. Is there any solution?

@parkr

This comment has been minimized.

Copy link
Member

parkr commented Feb 3, 2015

It's likely a timezone problem. We can't determine this though. Please write support@github.com

@parkr parkr closed this Feb 3, 2015

@iplus26

This comment has been minimized.

Copy link

iplus26 commented Sep 25, 2015

Still have the problem. I've spent a whole afternoon but it turns out that I can't use {% post_url %} in GitHub Pages.

@parkr

This comment has been minimized.

Copy link
Member

parkr commented Sep 25, 2015

The feature is there, they're just running a version of Jekyll that's a little old and it's run in UTC-0700. post_url may get mixed up if that timezone shifts any of your dates!

joshuaflanagan added a commit to joshuaflanagan/blog that referenced this issue Nov 7, 2015

Stop using post_url
GitHub is currently running a buggy version of jekyll.
jekyll/jekyll#3179
@joshuaflanagan

This comment has been minimized.

Copy link

joshuaflanagan commented Nov 7, 2015

I just ran into this problem too. To clarify @parkr's comment, GitHub is still running version 2.4.0 (check the latest version), and jekyll used a timezone-sensitive implementation that wasn't fixed until version 2.5.2.

Unfortunately, fixing it isn't as easy as I hoped. I thought I could just hardcode the post path. But it turns out that GitHub generates a different URL than what I generate locally, likely because of more Timezone bugs. For example, check out this file

The filename contains "2015-11-02". The date in the front matter indicates "2015-11-02" in a specific timezone. But when it builds on Github, it generates the URL as "2015/11/03".

I would hope that jekyll would use the date from the front-matter. Since the timezone offset is specified, there is no ambiguity, or risk of it changing when run on different servers. But it appears to convert to UTC when generating the url.

@DanySK

This comment has been minimized.

Copy link

DanySK commented Nov 19, 2015

I am also experiencing an issue with post_url. If I apply this change, the page does not build.

@envygeeks

This comment has been minimized.

Copy link
Contributor

envygeeks commented Nov 19, 2015

@parkr is there anyway Github can be pinged to send a hotfix?

@parkr

This comment has been minimized.

Copy link
Member

parkr commented Nov 19, 2015

@joshuaflanagan Did you specify a timezone in your _config.yml?

@envygeeks Probably. They usually only do security hotfixes though.

@joshuaflanagan

This comment has been minimized.

Copy link

joshuaflanagan commented Nov 19, 2015

@parkr I did not. That is interesting, I will look into it.

@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.