setting up jekyll locally
22 Feb 2014
I ♡ github, it has never been easier to start working in open source projects =). One of their rock star services is github pages, which allows people to setup static pages for their projects, it even provides some nice themes so your page doesn’t look awful. Many people however (mostly technical) use it to host their blogs (such as this one), you get great infrastructure, a subdomain (and the possibility of using your own domain), revisions (git) and markdown, all for free!, isn’t that freaking awesome!?
Github pages could be perfect, however they’re not (although they’re really close), sometimes when you’re using markdown and the translation markdown ⇨ html fails you’ll get a nice mail such as this one:
The page build failed with the following error: page build failed For information on troubleshooting Jekyll see: https://help.github.com/articles/using-jekyll-with-pages#troubleshooting If you have any questions please contact GitHub Support.
Beautiful!, no signal of what went wrong =), ok, to be fair, github has recently started to add more details, however they’re still not sufficient, I still require to mirror their jekyll setup in order to see what’s really happening. Since I’ve done more than a couple of times, I thought it would be a good idea to automatize it.
$ sh <(wget -qO- https://raw.githubusercontent.com/javier-lopez/learn/master/sh/is/gitpages) ... $ git clone --depth=1 https://github.com/username/site.github.com $ cd site.github.com $ jekyll serve #fix errors till it works
It requires an Ubuntu ⇨ 12.04 system and sudo credentials. Additional gotchas:
Happy blogging 😄!