martedì 26 ottobre 2010

SyntaxHighlighter on Blogger

Yesterday I installed SyntaxHighlighter on this blog.

Here are the steps I followed:
  1. On the blogger template I added the following code just before the </head> closure.
    This would add the Gorbatchev's base framework with the brush for XML.
    Moreover I add the Haskell brush from Michael Rüegg.
    In the future I could add the following brush too:
  2. Before the </body> closure, insert the SyntaxHighlighter.all(); call.
  3. When composing a blog entry that contains source code, click the "Edit Html" tab and put your source code (with html-escaped characters) between these tags:
    <code language="haskell">
      <pre class="brush: haskell">
You can replace the "haskell" brush with whatever language you are using (as far as you included the relative brush js file).

Nessun commento:

Posta un commento