Skip to main content

Posts

Showing posts with the label blogger

Using SyntaxHighlighter to Show Code Snippets in Blogger

Update: I no longer support the use of SyntaxHighligter. I would rather suggest the use of gists provided by GitHub. It is easier to use. Give it a try. https://gist.github.com/ Using SyntaxHighlighter to Show Code Snippets in Blogger I have found out a way to display code snippets with syntax colouring. There is a very nice yet useful tool consisting of a small set of js and css files: SyntaxHighlighter .  Required files can be found at project site.  After downloading files we will need to store them in an online location to refer them from our blog pages. At this point  Google Sites  proves to be useful. Just create some pages and upload SyntaxHighlighter files. So that we can refer them from blogger pages. Usage:  Add lines below to blogger page. Just remember to add all brush files you need. For a list of all available brushes see  related page. <script type="text/javascript" src="https://sites.google.com/site/your_site_path/sc