Tuesday, July 31, 2012

Using SyntaxHighlighter with Blogger

As this blog is about Dev and Technology there might be some "code" posting and its only make sense that it'll be posted in a nice graphic readable way.

So after messing around i found out that SyntaxHighlighter is probably the best way to post code in Blogger. But expect nothing out of the box. this guide will show you how to add SyntaxHighlighter features to your Blog:

1. Make sure you are using Editable template (or all of this is not possible) by going to template settings in your blog and finding the Edit HTML button.


2. Press the Edit HTML button and find the </title> tag.
3. paste the following line AFTER the </title> tag:



4. choose brushes from Bundled Brushes and create line for each brush you want to have:


replacing XX.js with the brush file name from  Bundled Brushes 
for example:
5. find the </body> tag and paste the following BEFORE the tag:



6. when you want to post source code just use:

 bla bla 

for example. thats it. Enjoy.

No comments:

Post a Comment