GitHub gists

Embed a gist using:

{{< gist <USERNAME> <GIST_ID> >}}

Both <USERNAME> and <GIST_ID> can be extracted from the gist URL. For instance, in this URL https://gist.github.com/sellorm/20525aff669acafb975b7495b8f2066e the username is sellorm and the ID is 20525aff669acafb975b7495b8f2066e, giving us:

{{< gist sellorm 20525aff669acafb975b7495b8f2066e >}}

Which is rendered like this:

GitHub’s gists can contain more than one file and if you’d like to embed a specific file from a gist, you can use the shortcode’s optional third parameter to supply the filename.

For example:

{{< gist <USERNAME> <GIST_ID> <FILENAME> >}}