Where does he get those wonderful toys? - The Joker, Batman (1989)Recently I was asked how I make code snippets on this blog prettier. Here's how.
- In your blog's template, install Alex Gorbatchev's Syntax Highlighter.
- Then, in the body of the blog post (with all occurrences of "<" HTML-escaped as "<"):
<pre class="brush:shell"> ... </pre> or <pre class="brush:java"> ... </pre> or <pre class="brush:xml"> ... </pre>
- There are other "brushes" available too with which you can "paint" your code. I generally only need java, xml, and shell.