Finding the right platform for a technology blog, especially a technology blog that references code, is a challenge. Platforms like Wordpress are very configurable, but require a lot of maintenance. Hosted platforms remove the maintenance burden at the cost of configuration.
My requirements are straightforward. I want a system that:
- requires almost no on going maintenance
- delivers content quickly
- is inexpensive
- makes including well formatted code snippets easy
- customizable
- and easy to back up
Tumblr had a lot of these features, but it failed on customizability and code snippets. Instead I decided to move the whole thing over to Jekyll, hosted on Amazon S3 and distributed by Cloudfront.
The Initial Conversion and Handling a Broken Importer
Jekyll includes a migration for Tumblr. However at the time of this writing (Jekyll 0.12.1), the migration is broken.
Rather than applying the patch, I downgraded the gem to version 0.11.2 to perform the initial import. Once the import was complete, I simply migrated back to the latest release.
Necessary Post Cleanup
The migrator pulled down all the text content. There are two major changes needed. The first is all the files are named with their Tumblr ID, making for awful URLs. The second is that since Tumblr is difficult to use for code, all my recent code was in Gist.
I used a little bit of ruby programming to hurdle these issues.
The code is far from perfect and I could not find an ideal way to handle inserting code snippets that contained XML. Eventually I gave up on the programmatic solution and fixed these files manually.
Hosting
Jekyll is a static site generator. I edit less
, write markdown and edit templated markup, but the output of the process are ready to serve resources.
Mostly because I could, I decided to serve by blog thorough Amazon’s Cloudfront CDN. This process was trivial using the jekyll-s3 gem.
I did run into one gotcha. Initially, I had my blog configured to use the bucket as the origin. However, none of the sub-directory indexes would resolve. The Amazon static site URL must be used as the Cloudfront origin for this to work properly.
Are the Goals Met?
I am very happy with the setup. Since this is hardly a high traffic site, the cost to host it is mere pennies. The site itself is blazing fast since it uses little else than circa 1995 level web technology.
I also manage this site with Git, allowing for multiple copies and easy versioning. Also, since I am now only editing a little markdown, it’s very easy to write new posts on the iPad with IA Writer.
The only drawback is the difficulty in sharing media on the go. For that reason, my personal blog will not be making the transition.
Did you like this content?
Related Posts:
Showing the Right Data with Out-of-Order Responses in Javascript
Javascript is an asynchronous language, which means sometimes things don't happen in the order you expect. This pattern ensures that the right response is shown.
The Rise and Fall of a Personal Cargo-Cult
Cargo-cults are common when confronted with the unfamiliar and new. This is not that story. Instead this is a story about forgotten knowledge around a complex interaction.
Slides from Atlrug
Slides from my presentation on AngularJS for the Atlanta Ruby Users Group