Publishing html presentations on Github


Toni Verbeiren


July 10, 2014

You’ve seen those fancy html presentations on the web? Reveal.js is a framework to create such things of beauty. And it goes along well with my Markdown based style of writing, even for presentation slides.

I usually create the presentations on my laptop, using Pandoc to convert to html. In principle, this should be ready for the web by default. If only I had an easy hosting solution to move it to.

Github allows you to host html files and even complete web sites. I had never tried it myself, but now I did. It’s really simple. Move your repository into the branch gh-pages (you can do this on the Github website) and finished. The web site is accessible via http://<username><projectname>. This is what Github calls a Project Page.

Behind the scenes, Github uses Jekyll for building static website from source files in, e.g., Markdown format. When you publish something to the gh-pages branch, it automatically kicks in… and gave very vague errors in my case.

After some trial and error, I found out, the best approach is to install jekyll yourself and launch it locally. This immediately gives a readable error message. It turned out I had a stale symlink in my directory tree. Removing this removed the building issue for Github.

The result can be seen here:

BTW, in order to install jekyll on my MacBook Air, I had to install a newer version of Ruby (tip: use rvm for this, link).