Ted Kulp

Code, Photos, Assorted Nonsense

Switch to Octopress

A couple of weeks ago, I stumbled on the Octopress project. It’s essentially a cleaned up framework around the Jekyll blogging “engine” that Github Pages uses (an my site). It gives it a clean HTML 5 template, some nice plugins, etc. Since it’s essentially just a pretty version of Jekyll, I knew that it would be possible to swtich with minimal work and saved it for when I was on vacation and looking for little personal projects to work on.

Switching was fairly simple. The only thing that really required work was porting over my post_filter code from my Jekyll fork. Basically, I added a bunch of hooks to Jekyll to allow me to run plugins before and after rendering, and after a page was written to the disk. Hooking into that allows me to do things like auto-post items to my archive blog, and send out bitly links to Twitter when something is posted.

Luckily, I’ve learned a lot about ruby since I wrote that stuff, and was now competent to do it with monkey patching the jekyll gem instead of having to keep a fork – which made it really clean. Once that was there, my other plugins started working immediately.

Since Octopress is just Jekyll under the hood, all of my other things worked without any intervention. My email-to-post script works, as well as my automatic Dropbox publishing stuff that I setup.

In fact, the only thing I had to fix was some formatting for a few posts that have code or gists embedded in them. I’m happy with my decision – now to just blog a little more and maybe customize the template a little bit.

Comments