getherbie/plugin-gist

Herbie 的 Gist 插件。

安装: 242

依赖: 1

建议者: 0

安全: 0

星星: 1

关注者: 1

分支: 0

开放问题: 0

类型:herbie-plugin

v1.0.0 2016-04-05 15:01 UTC

This package is auto-updated.

Last update: 2024-09-22 18:41:47 UTC


README

Gist 是一个 Herbie 插件,允许你将 Gist 段落嵌入到你的网站中。

安装

你可以通过 Composer 安装此插件。

$ composer require getherbie/plugin-gist

然后,在配置文件中激活此插件。

plugins:
    enable:
        - gist

配置

plugins.config.gist 中,你可以使用以下选项:

# enable shortcode
shortcode: true

# enable twig function
twig: false

应用

使用 Gist 短代码,你可以在页面内容中嵌入任何 Gist 段落,其中 "123456789" 是你想要嵌入的 Gist ID。

[gist 123456789]

oder

[gist id="123456789"]    

如果你想要显示 Gist 中的特定文件,你可以使用可选的 file 参数。

[gist id="12345" file="filename.md"]

通过启用 Twig 函数,你还可以在布局文件中使用 Gist 段落。

{{ gist id="123456789" }}    

{{ gist id="12345" file="filename.md" }}

参数

演示

https://herbie.tebe.ch/dokumentation/plugins/gist