0

Folks, help is needed and MUCH appreciated with a fuzzy behaviour of Jekyll site deployed to Github.

The site works perfectly when putting it up and using it in the local machine (through 'jekyll serve'). The surprise came up upon deployment to Github, the HTML 'posts.html' page created to show the post list does not get rendered at all. The rest of the site is up and running fine, but once the link is clicked to reach the mentioned page the browser is trying to DOWNLOAD the file, instead of rendering.

If you need to have a peek at the code:

https://github.com/zekdeluca/zekdeluca.github.io

And the site can be seen at:

http://zekdeluca.github.io/

Thanks in advance!

zekdeluca
  • 111
  • 1
  • 5

1 Answers1

0

It has to do with the permalink and how the extension-less urls are working. If you add a trailing slash to your url it will work. If you are trying to do it without the trailing slash, I was under the impression that what you did would work on GH.

Something like permalink: /my-page/ will work and it creates a folder called my-page with an index.html file in it. The url will show as /my-page/ without the index.html - pretty except the trailing slash.

If you do permalink: /my-page it should be making a file my-page.html, but in your case it seemed to have made just my-page with no extension, which is then being served as a file by github and it doesn't seem to know what it is so it is downloading it instead of serving it.

There seems to be a lot of conflicting info on this, I think the behavior has changed recently, and maybe the version GH is using is able to output a file with no extension? I did not think that was the case.

more reading:

http://overengineer.net/pretty-extensionless-urls-in-github-pages-using-jekyll/

Jekyll extension-less permalinks with markdown

Community
  • 1
  • 1
Ron
  • 1,121
  • 9
  • 19
  • Thanks for the quick response! I ended up resolving the issue after asking the question through trial and error and had not yet been able to share back, but I believe you're exactly right. After adding the '/' at the end of the permalink it started working in the GitHub as well. It is likely related to either the version of Jekyll in GH being older than the one I've locally installed or a different configuration required on their end so it works fine without the ending '/' as well. Meanwhile hope this question/answer will help others going through the same. Cheers – zekdeluca Jan 23 '16 at 02:40