Question

I'm trying to use Jekyll on GitHub pages. I'm running it exactly how they tell me on version 0.11.0 and with --safe on my machine and it works, however when GitHub build the site it doesn't build the pages properly.

http://kennydude.github.com/data/months.html should appear with a template, however it's not. You can see in my YAML front it does define a layout https://github.com/kennydude/data/blob/gh-pages/_posts/2012-04-10-months.json

It would be lovely to make this work, as I think it'd be a nice little resource.

Joe :)

Was it helpful?

Solution

It appears that part of your layout code is messing with GitHub. I made a copy of your pages and saw the same behavior. When I removed the string:

<code>{% raw %}{{ FIELDNAME }}{% endraw %}</code>

from the '_layouts/entry.html' file, the page rendered as expected. Give that a shot.

Update:

I believe the {% raw %} and {% endraw%} tags are from this jekyll plug-in. For security reasons, GitHub Pages doesn't run plug-ins. When the raw jekyll engine hit your code, it choked.

You can use an escape string to output the raw Liquid tag without it being processed. For your example, you would do this:

<code>{{ "{{ FIELDNAME " }}}}</code>

I've tested that on GitHub and it works as expected, rending the output:

{{ FIELDNAME }}

To give credit where it's due, I discovered this from this answer on 'How to escape liquid template tags' while researching escape strings for myself.

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