New domain and blog

New domain and blog
Please head over to my new domain to view my blog and current projects

Monday, 29 October 2012

Embedding Gist code into Blogger

I have been playing with my Raspberry Pi and Linux for a few weeks now. Most of the example code has been published on GitHub so I thought I'd give it a go and see what it's all about.

At first I tried to add a repository and then the code snippets. That didn't seem to work as I liked so had a quick look around and saw that you can add a Gist and embed that a lot better. You are also able to link to a raw piece of code. This will hopefully come in handy as I have an idea on how to use this. If it works I will cover it in another post.

All you need to do is create a GitHub account and add a new Gist. Save the Gist get the embedded link.

When you are writing your post, switch to HTML view and paste the script where you want it to appear in your post. You can then switch back to normal view to finish writing the post.

That's about it really. Pretty simple and quick to add code. This is much easier than some of the other methods that I have seen where you have to edit the HTML code of the template with custom java script code.

Greg