Edited 08/10/2012: See updated post: Add Code Syntax Highlighting to any page in “Two” Lines

It aggravates me that no blogging platform makes it easy to enable code highlighting. Oh well, at least tumblr makes it easy to edit HTML manually to include code highlighting.

I put together the code highlighting on this blog using the following two posts as guidelines:

  • http://ghoti143.tumblr.com/post/1412901908/google-code-prettify-tumblr-love
  • http://www.codingthewheel.com/archives/syntax-highlighting-stackoverflow-google-prettify

Both of those posts are great, but I’m a minimalist so I want to make the whole process a bit easier. You can highlight all of your code blocks with one block that you can copy and paste into your html file right before the </body> tag: