Ads

Tuesday, October 22, 2013

How to display source code on blogger?

I've used this personally and I gotta say, I'm surprised at how easy it is to use this. :) Okay, as usual, I write instructions for noobs (since I was a noob myself) - baby steps alright?

1. Go to https://gist.github.com/ (You don't need to register to use this, but if you want to register, well, it's free :) )

2. Type a description for your code (will later be displayed at the bottom of the github box).
3. Paste your code into the box below the description box.
4. Then click 'Create Public Gist' at the bottom. (You can choose Secret Gist instead but well, you're posting it for free viewing on your blog right? So, it's better to put it as public)
5. Now, you can either link to the code (Easiest method, but no display in blogger) or you can embed it into your blogger (there will be a display shown in blogger). Since this is a 'how to display'-kind of blog post, I'll be teaching you how to embed the github box.

  • Copy the embed code (the highlighted one) and then paste it in the HTML section of the blog post that you want to display the code in.

Copy from here...
Paste to the exact location where you want it to be displayed in. As you can see, this is from my blog post 'How to add Feedjit to your blogger'. :)
6. Voila! You're done! :) Go to preview to see your handiwork before updating/publishing.


Also, you can go ahead and register yourself as a github user. It's free. :)


Oh and also check out my How to add Feedjit to your blogspot. ;)

No comments:

Post a Comment