扩展 Shortcode - Gist

目录

gist shortcode 用于在你的内容中嵌入 GitHub Gist。

快速使用

要显示具有此 URL 的 GitHub gist:

1
https://gist.github.com/Lruihao/fb8b2d0353465c4d40bf74818db80710

在你的 Markdown 中包含:

1
{{< gist Lruihao fb8b2d0353465c4d40bf74818db80710 >}}

呈现的输出效果如下:

生成的 HTML 如下所示:

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

详细参数

gist shortcode 有以下位置参数:

  • 第一个位置参数 [必需]

    拥有 gist 的 GitHub 用户名。

  • 第二个位置参数 [必需]

    gist 的 ID。

  • 第三个位置参数 [可选]

    要显示的 gist 中的特定文件。


相关内容

Buy me a coffee
Lruihao 支付宝支付宝
Lruihao 微信微信

发现新版本

当前站点有新版本可用。