Alex Gorbatchev created a really awesome syntax highlighter for code. To add it to your blogger:
- Click "Template" on your main blogger menu
- Click "Edit HTML"
- Before "</head>" add the following code
Remove all the brush you don't need. Here's a list of all the available brush.
- Before "</body>", add the following code
Adding a test post
- Create a new post
- Click "HTML" on the left hand side to switch to the html view
- Enter the following
/**
* SyntaxHighlighter
*/
function foo()
{
if (counter <= 10)
return;
// it works!
}
- Click "Preview" to view the test post
Resource: http://stackoverflow.com/questions/679189/formatting-code-snippets-for-blogging-on-blogger
0 comments:
Post a Comment