Github Gist Helper - aadlani/nanoc-toolbox GitHub Wiki

http://rubydoc.info/github/aadlani/nanoc-toolbox/Nanoc/Toolbox/Helpers/GithubGist

Setup

In the folder lib/helpers_.rb add the Helper inclusion as following:

# Helpers of the nanoc-toolbox
include Nanoc::Toolbox::Helpers::GithubGist

Usage

Simple gist

Code:

gist(1)

Result:

<script src="https://gist.github.com/1.js"></script>

a specific file in a Gist

Code:

gist(1, "gistfile1.txt")

Result:

<script src="https://gist.github.com/1.js?file=gistfile1.txt"></script>
⚠️ **GitHub.com Fallback** ⚠️