Friday, August 21, 2009

How to setup SyntaxHighlighter on Blogger

Just installed SyntaxHighlighter v2.x to my Blogger.

I've searched the internet to SyntaxHighlighter-izing my Blogger site and found lots of interesting way to setup (widget, manual install, etc).
But, most of them are still using version published on GoogleCode (http://code.google.com/p/syntaxhighlighter/) which is v1.5.1.

The author, Alex Gorbatchev, He is actually publishing SyntaxHighlighter on his own website. Surprisingly, it even have newer version than the one on GoogleCode, and provide public hosted scripts :D.

So, how to install:
  • Firstly, you don't need to download/upload any files, just use Alex public scripts here.
  • It have lots of version on it, I prefer to use latest version of SyntaxHighlighter (you may choose another).
  • Go to Blogger theme configuration, and edit your HTML file and insert following lines just befor </head> tag :
  • 
    
    
    
  • To add another brush, insert new <script> tag referencing to any available brush inside scripts folder.
  • And, taraa!!! you see the example above ;). For more information about how to use visit: http://alexgorbatchev.com/wiki/SyntaxHighlighter:Usage


This is cool!!!

Pindah ke Blogger.com

Setelah tidak melanjutkan hosting blog sendiri di www.sverdianto.net, saya memutuskan untuk memindah aktifitas menulis blog di situs Blogger ini.
Sayangnya tulisan lama lupa di backup jadi hilang semua deh :(