- Browse to https://gist.github.com/
- Add a Gist Description (optional)
- Add a filename with an extension (extension will be used to add syntax highlighting)
- Add your code snippet which need to be added to your blog post
- Click “Create Public Gist” button at the botton
- 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
Here is how an example Java code looks like after this 8 Steps above,
Nice!
ReplyDeleteThanks for this trick !
ReplyDeleteThanks Kasun
ReplyDeleteEla machan
ReplyDeleteThanks mate...it has helped
ReplyDeleteThanks mate. Helped me in a quick set-up.
ReplyDeleteNice work!
ReplyDeleteThank you for this tip. I had been looking all around for a simple solution like this.
ReplyDelete+1 for you :)
ReplyDeleteThanks, it works like a charm~
ReplyDeletegist is beautiful, I checked some other option and wrote about it: http://erannelinger.blogspot.de
ReplyDeleteThanks, really helpful.
ReplyDeleteThanks Kasun. Just a note, the embedding code won't work for "Dynamic View" templates.
ReplyDeleteDitto the others - nice!
ReplyDeletegood post dude ...
ReplyDeletenice
ReplyDeleteI do not see "option “Interpret typed HTML” under Post Options -> Compose Settings".
ReplyDeleteIs it removed or changed ?
seems it's now here http://imgur.com/iD4F57T if not I think it depends on the theme you are using.
DeleteReal simple. Thanks :)
ReplyDeleteThanks dear
ReplyDeleteThanks a lot man!
ReplyDeletealgolint is best online website dealing with all kind of online complier and online ide.. code snipets and compile and execute program online can be access and an be deal with no issue and erros free
ReplyDeleteThanks Kasun, nice work.
ReplyDeleteThanks ..it worked :)
ReplyDeletethank you! ^_^
ReplyDeletegood one.
ReplyDeleteGreat tutorial this really helps specially I'm applying for a web development company in the Philippines
ReplyDeleteThanks Kasun!
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteSnippets are almost giving the true values which will make easy task to remember in your mind the posting codes and such kind of the various values. java homework
ReplyDeleteya. but we can't depend fully on Gist for every single code we wanna write. Some statements may be a word or two. Adding a gist for such a statement is really inefficient.
ReplyDeleteThanks a lot
ReplyDeleteThere are many available tools by which you can highlight your java programming code here. I also use your trick to publish my Java Homework.
ReplyDeleteThank you, Kasun! Your blog is super helpful! I find pretty useful this site for doing homeowrk as well: Java assignment help. Happy coding everyone!
ReplyDelete