The gist shortcode embeds a GitHub Gist in your content.
Usages
To display a GitHub gist with this URL:
1
| https://gist.github.com/Lruihao/fb8b2d0353465c4d40bf74818db80710
|
Include this in your Markdown:
1
| {{< gist Lruihao fb8b2d0353465c4d40bf74818db80710 >}}
|
The rendered output looks like this:
The HTML looks like this:
1
| <script src="https://gist.github.com/Lruihao/fb8b2d0353465c4d40bf74818db80710.js"></script>
|
To display a specific file within the gist:
1
| {{< gist Lruihao fb8b2d0353465c4d40bf74818db80710 bilibili.html >}}
|
Parameters
The gist shortcode has the following positional parameters:
first positional parameter [required]
GitHub username who owns the gist.
second positional parameter [required]
The ID of the gist.
third positional parameter [optional]
A specific file within the gist to display.