Experimenting With Octopress
My personal blog began life on Blogger and was switched to Posterous in late 2010. The switch to Posterous was driven by an interest in easier media publishing, but I haven’t found Posterous to have lived up to my hopes. In particular I’ve found performance of their site to be a bit lacking, and have been disappointed that basic editing features have not evolved.
Being adventurous, and now having to support multiple web sites, I thought I’d experiment with Jekyll and Octopress and see what their limits are. I know this is not going to provide an improved editing experience, but this will address performance issues and provide a place for me to experiment.
Database driven backends are flexible and fun to write (I’ve been working with Ruby on Rails a lot this year) but they require maintenance, can have scaling issues under heavy load, and are not as cheap to host as a static site. Most site content really only needs to be generated when there is the occasional change to content rather then once per HTTP request. I’m looking to take the dynamic aspects of my pages and push these off to nano services such as Disqus and Google Wallet (or my own new services) and host the static pages on more economical hosting sites like Dreamhost or Amazon S3.
Migrating Blog Content
Jekyll provides a few tools to help with migrating your old blog content. The Posterous script automated most of the work of porting posts over from Posterous but required manual intervention for files containing code blocks or images. I did slightly modify the stock posterous.rb file, with the biggest fix being to comment out the image porting code as this was not working for me. This last issue required a few hours of manual intervention to repair content. I did not port over old blog contents.
There were a few details to get right to get Alex’s script working. The 404 page is simply an html page in my source directory. For this page and this page only I load
404.js as shown further below. My biggest head-banging issue was that the script failed silently when my JSON file with syntax errors didn’t load. Here’s a handy online JSON validator that you can use to avoid JSON syntax problems.
File /Users/jpravetz/dev/epdoc/jekyll/jpravetz-octopress3/source/downloads/code/404.html could not be found
File /Users/jpravetz/dev/epdoc/jekyll/jpravetz-octopress3/source/downloads/code/head.html could not be found
The other site that I am porting to Jekyll is a small eCommerce site requiring data driven page generation. You can find more information on how this site was built in this later blog post.
Here are some related links that you may find useful: