Code snippets posted online are a great source of knowledge and simple way to share experience and to reuse code. As developers we always look to see if there is a ‘code example’ which we can modify to our needs. As bloggers we find code snippets very useful to get our information out to the readers.
The problem is that creating these code snippets is a complex and cumbersome task. You need you replace all the < with
&alt, wrap the code in <pre> and <code> tags and then use a Syntax Highlighter to make our code look nice. Every time we change or fix the code you need to reiterate this process.
In this article I will show how to generate automatic snippets for your blog and source/code websites.