Monday, June 25, 2012

code syntax highlighting in blog posts

Problem: Need to syntax highlight the code in the blog posts (to improve it's readability).
Solution: github's gist (

OK now what's the story? I tried to find some simple solution for me to be used in the in the dynamic templates.
I've found: gist. 
As one of the quite popular proposals on stackoverflow said :

What is gist?
(Copy pasted from their site) "Gist is a simple way to share snippets and pastes with others. All gists are git repositories, so they are automatically versioned, forkable and usable as a git repository."

Sounds good. But when trying it didn't work for the blogger and dynamic templates.
After some googling found following post:
and that worked for me!

So since from now on, you can expect some nicely highlighted code snippets in my posts :)

No comments: