Question

I have a Jekyll based post which works successfully when running locally with the --safe flag on. However, the page build fails on github pages. I am not using any plugins either. Can someone please help me figure out what is not compatible with github? Their page is not very helpful. I'm already following their advice of not plugins and using --safe locally to test before committing.

Link to my post: https://raw.github.com/danishm/danishm.github.com/master/_posts/2012-07-23-maintaning-read-more-links-when-moving-from-drupal-to-jekyll.md

Could it be the usage of {% raw %}? or the fact that I am trying to talk about liquid template code itself and trying to syntax highlight it

Was it helpful?

Solution

The issue is due to the fact that github pages uses liquid 2.2.2 and my local install was using liquig 2.3.0. The filter {% raw %} is new in 2.3 and not available in 2.2.2. In version 2.2.2, you need to use {% literal %} instead.

Once I made that change, the page got built successfully on github pages and is now visible on my blog.

I was also able to reproduce the issue locally by installing Jekyll 0.11.0 and liquid 2.2.2, which is what github pages use.

OTHER TIPS

Not sure, but there might be something wrong on GitHub, their status page shows that there was some problems with Pages (25th Jul 2012), that should be fixed now, but I still have same issues as you, pages won't compile, and local run w/ jekyll --pygments --safe works fine.

If you had used Jekyll version 1.0 at the beginning, you may config 'auto' option in _config.yml file. But the current version of Jekyll is 1.2.x, so this option is depreciated. In my case, it made my errors: successfully in local but not working in git page. The solution is so easy, just comment this line: "auto:true". Everything seems OK. In more details, you must comment that line to turn on Auto-regeneration feature which allow the server regenerate html pages automatically.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top