Using Jekyll and Git to Blog

I’ve been using Posterous for a few months now as a blog, and found some of the features really handy. It was nice composing my blog posts by email, and the simplicity of the service as a whole was really nice. Then I tried to write a blog post about netbooting the Ubuntu Live CD and it all went wrong. Posterous isn’t all that friendly about code snippets, and it inserted newlines and incorrect symbols all over the place. I’m a Computer Science student (see the lecture notes?) and I like computers, so I’m going to be writing blogs posts that include code. This made me see the light – I spent more time fixing that blog post than I did writing it. I want the barrier to entry to posting on my blog to be as small as possible. I needed to try something different.

I turned back to WordPress which I had used for quite some time, and very quickly I was reminded of why I stopped using it; I saw the memory usage on my server skyrocket, and a security fix was released the very next day. That wasn’t an option either.

I’d heard a bit about just using static files to create a blog which sounded interesting (certainly fixed my ‘memory usage’ issue) and investigated further. I came across Jekyll which is written by the guy who co-founded github. Github themselves use it to generate github pages. It seemed pretty interesting, so I forked a blog that uses it (happens to be the guy who wrote it) and adapted it for my needs. Note that at the moment the designs are quite similar, I’m hoping to alter this over time so my blog is a little more unique.

It’s been a lot of fun to use, and due to the way it’s designed it really complements a blog structure, with anything else you need. For example I’m using it to store my lecture notes (which I write in Markdown already where I can) and thanks to Jekyll using the Liquid templating engine it’s easy to generate the ‘dynamic content’ necessary to give access to your content.

Jekyll works really well with a version control system too. I’m using git with github, and all the source is available on my github. This means that I can get to my blog from anywhere, keep a copy of it (and run a copy of it) locally, and use hooks to automatically update the live version of my blog if I wish. Feel free to take a look at the code and use any of it yourself.

Any comments on the new system much appreciated. It’s a work in progress and I may alter things as time goes on.

This entry was posted in Blog. Bookmark the permalink.