Friday, October 21, 2011

Syntax Highlighter for Blogger

We use Alex Gorbatchev's Syntax Highlighter to highlight the code we post. Natural assets are:
  • Code easier to read when colorized
  • Code can be easily copied and pasted
  • Code can be accessed raw
  • There are different themes available
  • One can write its own "brush" (syntax highlight for a language that does not have a brush yet)

How to integrate Syntax Highlighter in Blogger

In your Template section, choose "Edit HTML". Spot the following code And replace it by: Then, whenever you want to highlight code, do it in such manner: Which will render such as: Here you have a list of brushes you can use.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.