百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
J

jekyll-gist

> 开发工具
开源

:page_with_curl: 用于在 Jekyll 站点中显示 GitHub Gist 的流体标签。

270 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

:page_with_curl: 用于在 Jekyll 站点中显示 GitHub Gist 的流体标签。

Jekyll::Gist

Liquid tag for displaying GitHub Gists in Jekyll sites: {% gist %}.

Installation

Add this line to your application's Gemfile:

$ gem 'jekyll-gist'

And then execute:

$ bundle

Or install it yourself as:

$ gem install jekyll-gist

Then add the following to your site's _config.yml:

plugins:
  - jekyll-gist

If you are using a Jekyll version less than 3.5.0, use the gems key instead of plugins.

Usage

Use the tag as follows in your Jekyll pages, posts and collections:

liquid
{% gist c08ee0f2726fd0e3909d %}

This will create the associated script tag:

xml

You may optionally specify a filename after the gist_id:

liquid
{% gist c08ee0f2726fd0e3909d test.md %}

This will produce the correct URL to show just the specified file in your post rather than the entire Gist.

Pro-tip: If you provide a personal access token with Gist scope, as the environmental variable JEKYLL_GITHUB_TOKEN, Jekyll Gist will use the Gist API to speed up site generation.

Disabling noscript support

By default, Jekyll Gist will make an HTTP call per Gist to retrieve the raw content of the Gist. This information is used to propagate noscript tags for search engines and browsers without JavaScript support. If you'd like to disable this feature, for example, to speed up builds locally, add the following to your site's _config.yml:

yaml
gist:
  noscript: false

Contributing

  1. Fork it ( https://github.com/jekyll/jekyll-gist/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Issues· 4 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Rubygistgithubjekylljekyll-plugin

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类开发工具
定价开源

> 相关工具

V
VS Code
流行的开源代码编辑器
G
Git
分布式版本控制系统
V
Vite
下一代前端构建工具