Tuesday, May 5, 2009

SyntaxHighlighter - Free Code Snippet, Syntax Highlighter By Alex Gorbatchev

SyntaxHighlighter Google Code
Image via SyntaxHighlighter Google Code via Flickr
Code snippets and syntax can be a pain in any blog owner's self-maintained template. Here is the very cool, free syntax highlighter called SyntaxHighlighter. SyntaxHighlighter is made with JavaScript and is created by Alex Gorbatchev.

To use SyntaxHighlighter, you first need to have the source files.

Downloads and direct links for Blogger users can be found at the Downloads page.

Upload a copy of the extracted 'SyntaxHighlighter' directory to your 'js' directory so you can link the source files with your blog template.

Paste this code into your blogger template HTML just before the closing </head> tag. You only need to do this once.

<link type="text/css" rel="stylesheet" href="js/SyntaxHighlighter/Styles/SyntaxHighlighter.css" />

Do not forget to change the links, in the code above, to your own links!

For more examples, check the Demo page.

For Usage instructions, check the Usage Guide.