imathis/octopress — pull request #716 by idavis (2012-08-18 18:36:57+00:00)
Title: Adding github tag to support embedding code from github project repositories

This plugin works like a combination of the gist and codeblock plugins to import code from github repositories that are not gists.

Usage:

{% github user repo sha [title/filename [link linkText]]] [/lang:value] %}

Example, loading haml.rb with a link to its current version rather than the version displayed on the page:

{% github imathis octopress 7e548dec97365691571d3b6e3c880717129692b9 haml.rb https://github.com/imathis/octopress/blob/master/plugins/haml.rb Current Version %}

Example, if there is no extension for the file, you can specify the language manually:
{% github imathis octopress 7e548dec97365691571d3b6e3c880717129692b9 /lang:rb %}

There are a number of examples in the file along with instructions on how to generate the needed hashes. It also supports a githubnocache tag which will force the code to be fetched every time the site is generated (especially helpful for testing).

This pull request adds a new dependency on json ~> 1.7.4.