This is now a Bower package: [gist-async]. [gist-async]: https://github.com/razor-x/gist-async
Requires jQuery.
Jekyll plugin included that modifies the gist markup added by its gist Liquid tag.
Load GitHub Gists asynchronously and optionally specify which file to show. This allows you to keep related files in a single gist, but show them individually on your pages. The async loading prevents your page rendering from stalling.
Example markup:
<div class="gist" data-gist="8288761" data-gist-file="gist-async.coffee">
<a href="https://gist.github.com/8288761">Loading file gist-async.coffee from 8288761</a>
</div>
The minimal required markup is
<div data-gist="8288761"></div>
Demo on CodePen: http://codepen.io/razorx/pen/mGKih
Based on Mark Selby's async-gists.js: https://gist.github.com/markselby/7209751
This version by Evan Sosenko: https://gist.github.com/razor-x/8288761
Found this immensely useful. I forked your gist to add a silly little WordPress shortcode for easy gist embedding. Thanks for your excellent work on this, seems way more predictable/maintainable than the crazy PHP string manipulation I was doing to produce the same result. And it's async.