Using Github Gists to Display Code on Blog
06 Feb 2011
Sometimes you notice things on the Internet and they just don't register for a while. I've seen many sites displaying their code samples using a Gist by Github
, but it hasn't really registered in my head for some reason.
I even created a custom snippet of code the other day for displaying code in myWordpress
blog. The other day I was going through Mashape's
documentation and their use of Gist for their PHP API
examples finally hit home.
Gist is a simple way to share snippets of code with others. All gists are git repositories, so they are automatically versioned, forkable and usable as a git repository.
I've been creating quite a few Github repositories
lately for Mimeo Cloud Print
, but Gists are just what I'm looking for when blogging. They work great for displaying code in technical blog posts without much work. When done with the blog series I will post the final code in a complete form as a full Github repository.