Gist embeds like this one:
document.write() which is totally uncool if you are doing stuff like
This plugin provides an alternative way to embed gists.
Which maps to the corresponding markup:
Or if you want to embed a specific file from a gist:
This library can be install with npm, bower, or just by downloading the zip. It is written in the UMD pattern to support AMD, CommonJS, and global usage.
npm install async-gist --save
bower install async-gist --save
A few options can be passed, for example, here we make the timeout 2 seconds:
Description: How long to wait for the
Description: It is best to leave this alone and let the internal function do the need. It’ll load the needed stylesheet and gist content.
Description: It is also best to leave this alone. It’ll display a link to the gist on failure to load.