A few months ago, I ditched my install of Wordpress and rebuilt this blog from the ground up using nothing but good old, raw HTML, with a little sprinkling of magic. At the time, I didn't really talk about it much, so in this post I will be talking about how my blog is built, maintained and published using that little sprinkling of magic that is called Jekyll and Codaset Pages.
Goodbye Wordpress
Now don't get me wrong here, but Wordpress is great at what it does. It's probably the best blog engine available, and the fact that it has a huge community around it, makes it somewhat of a rock star in the open source community. But... what it tries to do is everything! It tries to answer all your blogging conundrums, which unfortunately actually places some restrictions on what you can or cannot do with your blog. Yes I can install a plugin, or even write one myself, but have you ever written a Wordpress plugin? Don't!
What I am trying to say, is that blogging with Wordpress or any other automated blogging engine is not fun anymore. I know the point of a blogging engine is to allow you to publish without the need to write code, but you know what? I like writing code! I like having full control over what my blog does and what it looks like. And that is why I ditched Wordpress.
Hello Jekyll
What I didn't want to do was to write my own blogging engine. In fact, I don't want to use a blogging engine at all, at least not in the traditional sense. I just want a simple, unrestricted method of blogging. So I turned to Jekyll. Jekyll is a blog aware, static site generator written in Ruby, and in use by Codaset and Github for their pages feature. It lets you write raw HTML, or your template language of choice (Textile, Markdown), and even lets you create layouts. It then takes these templates and layouts and spits out a complete website or blog in a completely static form.
And Hello Codaset Pages
Codaset Pages are a brilliantly simple way to host any static content, and works perfectly with Jekyll. Just create a new project under your Codaset account, then every time you 'git push' to it, your site or blog is instantly updated. So I have a project called 'joelmoss_pages', which can be seen at https://joelmoss.codaset.com. And that is this very blog.
You can see exactly how my blog is structured and have access to all the source code at Codaset, so I won't go into too much detail. Just look at the source yourself. But what I will quickly do is show you how I wrote this blog post.
You can find the actual source file for this blog post right here. Nothing special right? Wrong! The top four lines contain what we call 'YAML front matter', and they tell Jekyll which layout to use and the pages title. You can find the layout here and can see on line 66 where we include this blog post file.
Now I just load up my command line and cd to my 'joelmoss_pages' working directory, and then 'git push'. Codaset will then run Jekyll against my new blog post when I push it to the server. Which means that my blog post is published almost as soon as I push to my Git repository. There's just something so bloody wicked about that!
And that, my friends is it! I have full control over what my blog post looks like, as I can edit the html directly and with very little effort. And I can very easily create any other pages of content just as quickly. I don't have to mess about with the restrictions of a blog engine such as Wordpress, and there are no version upgrades to mess around with. I also don't have to look at the messiest, spaghettiest codebase in the open source community, every time I want to add some sort of plugin.
