Saturday, September 27, 2014

Code formatting in Blogger

I found this answer on stackoverflow about how to format source code in blogs on blogger, which pointed this tutorial with detailed instructions. It worked for me with Python! Many Thanks to David Craft and Alex Gorbatchev.

Also note the useful tip here about loading only the format styles that you need for your blog, to speed up page load.

How-to (for Python)

Add the following to Blogger template above the </head> tag.







In the blog editor, switch to HTML mode and insert code within <pre> as follows.

You can find more brushes here.

No comments:

Post a Comment