Moved to Github Pages

August 9th, 2014

As of this post I moved my blog to Github Pages from Google’s Blogger. As a consequence I built this blog from scratch. As a frequent reader you may notice some changes, hopefully all to your liking.

Github Pages uses Jekyll to serve content. Jekyll generates a static site from your articles (I write these in markdown) and templates. My main goal was to move my blog to Github Pages, with all articles and a similar layout. Of course on the way I came up with a ton more things I could do (now that I entangled myself from the constraints of Blogger). Most didn’t make it because they were not important to move the blog. It’s interesting to be your own customer.

Even comments were not important enough to me. I do much appreciate your comments. It’s just that there are great alternatives such as Reddit, rendering my own comments feature unimportant. As a result, comments from my old blog are not available at this time. Sorry about that. I might support commenting later and move existing comments (if the tools allow me to). Of course you can also contact me directly.

Github Pages

Github Pages

So why Github Pages?

Well, I want to write my blogs in text using a decent editor. Hence I don’t use rich text formatting in an editor. Rich text editors are broken and it highly unlikely for them to be be fixed anytime soon. For me the Blogger editor caused all kinds of issues, from data loss to broken layouts (because the HTML generator changed again). Others (like WordPress) are just as bad.

Then I also wanted to be able to build some decent templates. Believe it or not, my Blogger template counted almost 2400 lines. At this point all my templates and css combined counts about 400 lines. As a result it’s easy to change templates and add new stuff. Also I now have full control over the HTML, which is alright with me.

Starting a new site with Jekyll was easy and writing the initial templates was fun. As I write posts in markdown it caused some trouble to set attribute values on tags (like rel=nofollow on ancors). I ended up using the Kramdown markdown engine, which supports most of the things I need.

But then there comes that point where you have to start migrating content. I could grab the HTML of my articles easily from the atom feed. Then I had to convert that into the markdown I want. That is not fun to do. So rather than converting all of it myself I hacked up a Vim script with a bunch of regex substitutions to do most of the tedious conversion stuff for me.

So far I pretty much enjoyed Jekyll. It has built-in support for things like pagination and code highlighting. It is kind of a do-it-yourself tool, which is a good thing. It keeps things simple. Yet the powerful templates make many things possible (like creating your own atom feed, as Jekyll doesn’t come with one).

A bit of a challenge when moving existing content is to keep the exact same URL structure. Normally I would 301 redirect the old URLs to the new structure. Given the nature of Jekyll this is not possible. The use of 301 redirects (in my case) is mainly important to preserve ranking in a search engine. Luckily Google (and likely others) also treat a meta-refresh with a canonical link like a 301.

All in all this was an interesting experience. For any static site I now would consider Jekyll first, especially if content needs not to be written in a rich text editor. And for many dynamic features of a site you can always use Javascript and cloud service.