Changing platform - Tumblr to Jekyll
July 10, 2011
I've finally moved over my blog, and whilst there is a considerable amount of work to be done to re-theme and ensure that posts are correctly marked up (using markdown!), the basic move has been completed.
Finding a CMS which really suits me has been quite a non-stop challenge over the last 15 months. Initially I was using wordpress, but then packed that in due to the requirement to pay in order to use your own domain name. I then moved to Posterous, having had recommendations from various friends, however that too had shortcomings. Then at Tumblr, I also found some things I didn't like.
Gripes with Tumblr
I preferred Tumblr a lot compared to Posterous as a microblogging platform, but had considerable difficulty getting it to display source code within blog posts correctly. The intendation would drop out of line, the style which appeared to be applied to <code> tags always appeared inconsistent - and I couldn't find anyone who appeared to have managed to do it successfully. Eventually, this irritation spurred me on to change platform again.
I appreciate that microblogging platforms are not really meant to be as full-fledged as a CMS like Wordpress, however if you want to put a micro-blog post with some source code in it, it would be helpful to allow you to do so!
Which brings me to where I am today. Having ditched Wordpress (heavy, slow, and charged to have your own domain), Posterous (irritating interface, poor performance in my experience), Tumblr (problems posting source code) I've moved over to a combination of vim, jekyll, rake and git to sort out my blog: blogging like a hacker indeed.
So, now when I want to write a post, I can concentrate simply on the content, rather than my frustrations around the edges. I can host it essentially anywhere - since static files are hardly demanding on hosting requirements, and can easily deploy it automatically using git commit hooks. I use vim (my text editor of choice) to write the code in a combination of YAML and markdown, and use pygments to do the automatic generation of syntax highlighting of code snippets in my posts.
Moving from Tumblr
When moving from Tumblr I used Derek Watson's script (github gist here) to pull the posts from Tumblr down onto my computer. Then I quickly did some reformatting to make sure they used the right templates etc. and ensured that the source snippets used pygments. I pulled the syntax.css from Tom Preston-Werner on Github to provide me with a simple basis for the new syntax highlighting, and dropped some basic theme files in as scss files for compass to play with.
I then wrote a quick rake script to handle deployment of the posts:
task :generate => :clear do sh 'compass compile' sh 'jekyll' end task :deploy do sh 'compass compile' sh 'jekyll' sh 'rsync -avz --progress -e ssh _site/ [destination]' end task :clear do sh 'rm -rf _site/*' end
I plan to improve the above to utilise git commit hooks when I have a bit more time, but it will do for the present!
By way of future work I plan to use Disqus for comments, to integrate a few more features - especially tags from my old Tumblr posts - and making sure that any links still work within the site. So far this has been a fairly straightforward conversion, however there is quite a lot more left to do to sort out the theme, tags and comments. I will post a few more things on the topic over the next few weeks as and when I have some spare time!