Why, hello there, Octopress
Unless you’re reading this on a braille reader, you’re probably wondering what happened to my blog. The theme has changed, the sidebar is different, the background image different, and so on. What gives?
I’ve been blogging now for over a year. In truth, at the time, I wasn’t sure how often I’d be posting, or what sort of content I would be writing. Thus, I was happy to simply accept a low/no-barrier entry solution, in the shape of Blogger.
Blooger is great for getting started - it’s a few clicks to set it up, a CNAME in my DNS to get the name right, and then you can get started. Links are easy to generate, pictures can be included from Picasa/Google Plus, and so on. It’s a great toolset when you’re not sure what you need yet.
However, as my style and content have gained definition over the year, I’ve founf myself struggling with various parts of Blogger. A few of these are:
- No syntax highlighting
- Picture Positioning
My recent series on my walks around Arran suffered horrendously from images getting into the wrong places. Short of manually specifying the exact divs you want in the HTML editor, it’s very hard to get robust image placement in Blogger. And I can’t write decent HTML, remember ;)
- No MarkDown support
This is main one. I’m a coder, I write text. MarkDown is a fantastic format to write text in, and yet I have no easy way to use this with Blogger. All I can do is to run my markdown through an MD-HTML converter, and paste the result into Blogger’s HTML editor. Far from ideal, and the final blog isn’t what’s stored in my MD file, as it inevitably needs some tweaks. I want to write, not spend precious time fighting with the formatting. It’s the same reason I use vim and LaTeX instead of a WYSIWYG wordprocessor.
With the above issues in mind, I started looking for a MarkDown compatible blog engine. I was already aware of Jekyll, as we use it in the Foreman project for our manual. But Jekyll requires you to write your styles and suchlike - I can’t write CSS and have little desire to learn.
It’s only a short jump from Jekyll to Octopress though, as it’s built on Jekyll, along with theme support, image and code-highlighting support, and plugins for more awesomeness. Sounds perfect.
Their deployment guide talks about Heroku, but as I had some space on my free-tier OpenShift account, I thought I’d run up a copy of my blog there to see how it plays. In short, you’re looking at it now, so I think we can call it a success :)
Setting up Octopress on OpenShift was pretty easy. The steps went something like this:
gem install rhc rhc setup rhc app create blog ruby-1.9 git remote add openshift <git url from the rhc create command> # we already have a repo, thanks rhc rm -rf blog # remove public so we can publish it vi .gitignore git add -A git ci -m "Add public dir for OpenShift deployment" git push -f openshift HEAD -u
And the blog is live at the url that was in the output of the
What about the old content?
It’s possible to migrate your data from Blogger via an XML export and a script to import it into Octopress. I’ve done this, and the results are not terrible, so I’ll use them for now. I will likely try to find time to go back are fix up the old posts at some point, but at least they’re still readable. I’ve also added redirects for Blogger’s old URL style, using the awesome Jekyll Plugin Alias Generator so you shouldn’t have any broken links. Nice!