I’ve just moved my blog to Tumblr. One thing that most my posts have are code examples. Here’s how I added this to my Tumblr blog. Go in to the customization section of your blog where you can configure the theme. Once there, click the “Edit HTML” button and add this somewhere before the ending </head> tag:
<link rel="stylesheet" href="http://yandex.st/highlightjs/6.1/styles/solarized_light.min.css">
<script src="http://yandex.st/highlightjs/6.1/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
Adjust “solarized_light.min.css” to point to whatever highlight.js theme you’d like to use. The themes can be viewed on the highlight.js test page.
The only problem I’ve run in to is with tumblr’s infinite scrolling feature. Since highlight.js is applying syntax highlighting when the page first loads then any code blocks that are loaded as you scroll will not get highlighted. I’m sure there is a way around this, but for now I just disabled this feature in my blog’s preferences.