Monday, January 25, 2010

Syntax Highlighting on Blogger

A big shout-out to your friend and mine, Ken Sipe, for his recent post on adding syntax highlighting to Blogger. (And many thanks to Alex Gorbatchev for the original work.)

Some notes:

My experience matches Ken's, in that it is best to put the links just before the </head> tag.

The highlighting doesn't take effect when writing the post, or in preview mode (presumably because the templating engine isn't emitting the head section). You have to publish it.

One trick for initial testing is to add highlighting to an older post that contains code, and republish.

Finally, don't limit yourself to the list on this excellent post. Chances are, your language has support (e.g. Groovy).

1 comment:

website design said...

I’ve learn a few excellent stuff here. Definitely price bookmarking for revisiting. I wonder how so much attempt you place to make the sort of great informative site.
website design