How to Post code snippets to Blogger


In my last post I wanted to put some Java and JavaScript code snippets in it so I started googling and asking my friends how to do it. But, I could not find an easy way to do that so I started searching more and found the following which is actually a zero work thing to do. Here we go,

  1. Browse to https://gist.github.com/
  2. Add a Gist Description (optional)
  3. Add a filename with an extension (extension will be used to add syntax highlighting)
  4. Add your code snippet which need to be added to your blog post
  5. Click “Create Public Gist” button at the botton
  6. Click on the “embed” link and copy the script generated
This is all from Gist side. Now to Blogger,

     7. Paste the script where you need to add the code snippet
     8. Make sure to select the option “Interpret typed HTML” under Post Options -> Compose Settings

Comments

Popular posts from this blog

SharePoint 2007 - Simple Task Dashboard

MERGE transformation in SSIS