Skip to content

Instantly share code, notes, and snippets.

@shalzz
Created January 11, 2019 12:45
Show Gist options
  • Save shalzz/281559a80af7adb5ab71320f5a802f94 to your computer and use it in GitHub Desktop.
Save shalzz/281559a80af7adb5ab71320f5a802f94 to your computer and use it in GitHub Desktop.
Example of how to embed a GitHub Gist using Zola.

Embed a Github gist.

The arguments are:

  • url: the url to the gist (mandatory)
  • file: by default, the shortcode will pull every file from the URL unless a specific filename is requested
  • class: a class to add the div surrounding the iframe

Usage example:

{{ gist(url="https://gist.github.com/shalzz/281559a80af7adb5ab71320f5a802f94") }}

{{ gist(url="https://gist.github.com/shalzz/281559a80af7adb5ab71320f5a802f94", class="gist") }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment