Few days back I have shared a post about Syntax Highlighter WordPress plugin to beautify your posts on wordpress blog. Now here is tutorial to add the same syntax highlighter to blogger blogs. Simply follow the steps given below :
- First of all copy the code given in this link and paste it before
</b:skin>
tag. - Now paste the followig code before
</head>
tag<!-- Add-in CSS for syntax highlighting --> <script src='http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shCore.js' type='text/javascript'></script> <script src='http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shBrushCpp.js' type='text/javascript'></script> <script src='http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shBrushCSharp.js' type='text/javascript'></script> <script src='http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shBrushCss.js' type='text/javascript'></script> <script src='http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shBrushDelphi.js' type='text/javascript'></script> <script src='http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shBrushJava.js' type='text/javascript'></script> <script src='http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shBrushJScript.js' type='text/javascript'></script> <script src='http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shBrushPhp.js' type='text/javascript'></script> <script src='http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shBrushPython.js' type='text/javascript'></script> <script src='http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shBrushRuby.js' type='text/javascript'></script> <script src='http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shBrushSql.js' type='text/javascript'></script> <script src='http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shBrushVb.js' type='text/javascript'></script> <script src='http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shBrushXml.js' type='text/javascript'></script>
- Now search for the
</body>
tag and paste the following code before it :<!-- Add-in Script for syntax highlighting --> <script language='javascript'> dp.SyntaxHighlighter.BloggerMode(); dp.SyntaxHighlighter.HighlightAll('code'); </script>
- Click on Save Template.
- Whenever you have to write some codes in your posts, simply write the codes between the following tags :
<pre name="code"> ...Your html-escaped code goes here... </pre>
Thanks to Heisencoder for this beautiful coding for blogger blogs
that is a valuable post.. Thanks for that.
.-= Swagat´s last blog ..How to add 125×125 ad spots in your template? =-.
Thanks Swagat for appreciation 🙂
Nice Find Friend. But adding these many javascripts will certainly make the blog load very slow.It would be best if all the JavaScripts are compressed into one single file. So less requests will be made and blog gets considerably faster. Keep posting.
.-= Amal Roy´s last blog ..How To Avoid Getting Banned on Twitter – 10 Useful Tips =-.
It will be helpful for my new blog. Thanks dude.
.-= Tech @ InkAPoint´s last blog ..Now Tech @ InkAPoint is Fresh & Fast =-.
This really will come in handy for my coming projects. Thanks muchly. Bookmarked.
.-= Bariski´s last blog ..22 Amazing and Colorful High Speed Photography Shots =-.
This plugin does not work properly at times ..I had tough time with it..I have stopped using it..
great post about adding highlighter to blogger.
thank you
will come in handy ,but troublesome to add code everytims 😛
.-= qwertyweb.blogspot.com´s last blog ..Twitter gets a new homepage =-.
Very nice information dude :-), i am using syntex highlighter right now 🙂
.-= Best Blogger Tips´s last blog ..Add DISQUS Comments in Blogger =-.
Wawwwwww. Thanks Tricksdaddy. 🙂
.-= Mücahit Özer´s last blog ..Meb Anket Yapıyor [Okullara Sivil Kıyafetle Girilsin mi ?] =-.
Nice way to do without plugin
This is a must need Tips for blogger users. you have done it again mat 🙂
hey is there any plguin for the wordpress??
Yes.. You can about WordPress blogs here –