Twitter Updates

Tuesday, 28 April 2009

Displaying code Snippets on blogspot

I have been trying to show pretty code snippets on I found for larger files displays code nicely but not very handy for short inline examples. Today I discovered prettify by google

This post describes setting up prettify on

Originally explained here:

Include this before the head tag in the blogger template.

I have made a modified version of the css file suitable for displaying code on darkbackgrounds, I use this instead:

Then change the body tag to:

Then use the prettyprint class when using pre tags around code:

No comments: