I decided to move from Blogger to something, which is more close to a developer’s nature - Octopress. Now I can write my blog in my favourite IDE using language I’m used to (Markdown). However, my biggest motivation was to change the old layout to something up-to-date. Due to the migration I also expect one more thing to happen - me writing more often. :)

To make this post somehow valuable, I will outline few steps I followed and share links I found useful. In general,
I consider the migration rather smooth, especially as I did not have any knowledge on Octopress, Jekyll and Ruby before. It took me a single weekend to set up everything (Most of the time - tweaking the theme).

Note: While I was writing this, I realized that I used somewhat old Octopress version (or at least an old way of using it). Latest version instructions are only available on Octopus GitHub (as for today). Nevertheless, it works as is, so I’m not bothered with it right now.

Firstly, I want to point out that documentation of Octopress is well written and everything is clearly explained. Another place to go is Jason’s series of posts strictly on migrating from Blogger to Octopress. I will add some notes, when something was not clear for me or if it was out of scope of the Octopress.

For reference: I use Ubuntu Gnome 15.04.

  • Installing Ruby

I installed the exact version they recommend (1.9.3-rc0) using rbenv. When cloning rbenv remember to stay in your home folder :)

  • Installing ExecJS

    I went with therubyracer, but I have encountered a problem of ExecJS not finding JavaScript environment. Surprisingly (at least for me) installing Node.js helps.

  • Installing Octopress and deploying to GitHub

    That was really straightforward, everything went just fine.

  • Blogger posts migration

    Posts migration is an easy task, as long as you find a good version of import script. I went through some and eventually found the one which worked. They are really similar and I don’t remember who was the author of that specific version (sorry!), Hence, I placed it as another Gist - available here.

  • Comments migration

    I decided to go with Disqus. Octopress has a built-in support, so it was an obvious choice. And here is the biggest disappointment. Disqus has lost support for importing comments from blogger (Source). I did not have that much to migrate and I decided to leave my old comments behind.

  • Custom domain

    Everything is well described in the Octopress docs. I want to share my experience here: for the first time I managed to switch the domain within seconds!

  • Fixing links and handling redirects

    As I have only few blog posts so far, I handled broken links in posts manually. You can use tools for search and replace like sed or something similar. Redirects were a little bit more tricky. Solution suggested by Jason, does not seem to work anymore. Blogger template is now strictly XML validated and these tags don’t work currently. The other option I found is here. The solution is really naive. I modified it a little bit - the pages are now recognized not by URL, but by title, as one can provide URL in different blogspot domains:

<b:if cond='data:blog.pageTitle == &quot;It&apos;s SOAP&apos;s Fault...: Handling Groovy scripts in Mule ESB&quot;'>
<meta content='0;url=http://blog.poznachowski.pl/2013/11/03/handling-groovy-scripts-in-mule-esb/' http-equiv='refresh'/>

<b:elseif cond='data:blog.pageTitle == &quot;It&apos;s SOAP&apos;s Fault...: MUnit testing, Mule best practices and more...&quot;'/>
<meta content='0;url=http://blog.poznachowski.pl/2014/04/03/munit-testing-mule-practices-and-some/' http-equiv='refresh'/>

<b:elseif cond='data:blog.pageTitle == &quot;It&apos;s SOAP&apos;s Fault...: Exposing RESTful interface with Mule pt.2&quot;'/>
<meta content='0;url=http://blog.poznachowski.pl/2013/10/20/exposing-restful-interface-with-mule-pt2/' http-equiv='refresh'/>

<b:elseif cond='data:blog.pageTitle == &quot;It&apos;s SOAP&apos;s Fault...: Exposing RESTful interface with Mule pt.1&quot;'/>
<meta content='0;url=http://blog.poznachowski.pl/2013/10/11/exposing-restful-interface-with-mule-pt1/' http-equiv='refresh'/>

<b:elseif cond='data:blog.pageTitle == &quot;It&apos;s SOAP&apos;s Fault...: How to make Jenkins speak Git Flow?&quot;'/>
<meta content='0;url=http://blog.poznachowski.pl/2015/02/14/how-to-make-jenkins-speak-git-flow/' http-equiv='refresh'/>

<meta content='0;url=http://blog.poznachowski.pl' http-equiv='refresh'/>
  • Making the blog look nice

    This is the part that took me 80% of the time. My first step around Octopress was searching for a good looking theme. I ended up using Octoflat. It looked really nice, but I wanted to tweak it a little bit. Important places to investigate are: source/_layouts, source/_includes, sass/_flat-ui.scss. It is important to get familiar with Liquid, which is a templating language used in Jekyll. Fortunately, it’s pretty easy to grasp.

  • Code syntax highlight

    Default version of code highlighter of Octopress has two color schemes, which I didn’t find attractive. Then I found Coderay and an article, how to integrate it into the blog. The problem I had is that line number greater than 9 were not shown properly. I found a solution for that. This indicated me another thing. Root cause of submitted issue - line numbers of wrapped lines are out of sync. Unfortunately, it still applies in my case. I need to work on that.

That would sum up all things I was coping with last weekend. My next goal is to introduce Asciidoctor to the blog and make sure everything works as expected :) If you have any suggestions or comments, please reach out.