This weekend I migrated http://shinysparkly.com over to using Octopress. And like everyone else that starts using Octopress I am going to be all meta and blog about it. So far this blog has been hosted on
tumblr.com and almost on
squarespace.com. I was never really happy with any of them and I decided try out a so called “static blog generator”.
What is a static blog generator?
I was first introduced to the concept a while ago when Marco Arment discussed his own project (Second Crack) which he uses to run his http://www.marco.org blog. This was first mentioned on episode 18 of Build and Analyze. Generally a static blog generator is a program that you run locally on your own hardware that creates your blog from a set of configuration files and blog entries stored in text files. You then upload the created HTML to your server. There are both advantages and disadvantages to this approach.
Main advantages over a host like
wordpress.com is that of control:
- You aren’t limited by what their templates or customisation features provide.
- You aren’t limited by their terms of service.
- All your content lives on your computer, not their servers.
Advantages over running your own
wordpress.org instance (or some other CMS):
- Your hosting can be much cheaper because you don’t need to worry about databases or application support.
- You don’t have to worry about server-side security of your CMS
- You don’t have to worry about installing or updating plugins
Also the site is just static HTML which is much faster than dynamically generated content.
The main drawback is that don’t have access to any sort of web-based front-end to work on the site. You can only update the site from the computer where the software is. You could keep the files for the site in Dropbox so you can edit them from anywhere, but you still need to be able to run the software to re-generate the site and upload. This is something you could schedule or have triggered by something like Hazel on an always-on desktop machine.
Again you have control over all of it - this makes it ideal for developers, less so for anyone else.
What is Octopress and why did I pick it?
There are many, many static blog generators out there. Octopress is actually a framework that is built on top of Jekyll which is the software that backs the Github Pages service. However while Jekyll requires the user to design their own site from scratch, Octopress provides an excellent site design to start from.
My rational for picking Octopress over some of the others was:
- It was an easy install (for me on OSX anyway)
- Simple, clear documentation
- The nicest default theme with a great responsive design.
- It supports Markdown
- Built in support for syntax highlighted code snippets
- It’s all written in Ruby so I feel reasonably confident in my ability to hack on the source if needed.
- Because it’s built on Jekyll it supports that plugin ecosystem
- Built in support for hosting using Github pages
- It has the best logo
Seriously, an octopus with a typewriter. How awesome is that? Very.
I’m currently hosting this using Github Pages and all my files are on Dropbox. I was considering AmazonS3 but Octopress has excellent built-in support for Github Pages.
I use Textmate on OSX and Elements on iOS to edit posts. There is rarely a time I am without an iOS device or my MacbookAir, so the lack of a CMS web-UI doesn’t really worry me. Currently I do need to be on my Macbook Air to run the publish script but I am thinking about ways I could automate this process with Hazel and my Mac Mini.
My only real change at this point was to add a Jekyll plugin to handle post aliases. This was because the default site structure of an Octopress blog differs from that of my previous CMS (tumblr) and I wanted a few specific popular posts to redirect. It works quite nicely.
I am just using the Octopress ‘classic’ theme at the moment. I will probably look into tweaking it in the future. I’m not really happy with the font sizing and a few other minor formatting issues. But right now, it is functional and it renders quite nicely on different sized devices.