Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jekyll/jekyll-gist
:page_with_curl: Liquid tag for displaying GitHub Gists in Jekyll sites.
https://github.com/jekyll/jekyll-gist
gist github jekyll jekyll-plugin ruby
Last synced: 27 days ago
JSON representation
:page_with_curl: Liquid tag for displaying GitHub Gists in Jekyll sites.
- Host: GitHub
- URL: https://github.com/jekyll/jekyll-gist
- Owner: jekyll
- License: mit
- Created: 2014-06-01T16:59:34.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2020-05-16T03:23:34.000Z (over 4 years ago)
- Last Synced: 2024-09-28T14:33:03.581Z (about 1 month ago)
- Topics: gist, github, jekyll, jekyll-plugin, ruby
- Language: Ruby
- Homepage: https://rubygems.org/gems/jekyll-gist
- Size: 127 KB
- Stars: 263
- Watchers: 12
- Forks: 40
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: History.markdown
- License: LICENSE.txt
Awesome Lists containing this project
- awesome-jekyll-plugins - **Gist** - gist](https://rubygems.org/gems/jekyll-gist)) -- Liquid tag for displaying GitHub Gists **#Official** **#GitHub Pages** (Tags)
README
# Jekyll::Gist
Liquid tag for displaying GitHub Gists in Jekyll sites: `{% gist %}`.
[![Build Status](https://travis-ci.org/jekyll/jekyll-gist.svg?branch=master)](https://travis-ci.org/jekyll/jekyll-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:
```html
```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`:
```yml
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