Gist Tag
All you need is the gist's id and you can easily embed it in your page. This actually downloads a cache of the gist and embeds it in a <noscript>
tag for RSS
readers and search engines, while still using Github's javascript gist embed code for browsers.
Syntax
{% gist gist_id [filename] %}
Example
{% gist 4321346 %}
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -590,7 +590,7 @@ class SpritesTest < Test::Unit::TestCase | |
it "should generate a sprite from nested folders" do | |
css = render <<-SCSS | |
- @import "nested/*.png"; | |
+ @import "nested/**/*.png"; | |
@include all-nested-sprites; | |
SCSS | |
assert_correct css, <<-CSS |
If you want syntax highlighting (for a supported language), specify the filename (with extension):
{% gist 4321346 gistfile1.diff %}
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -590,7 +590,7 @@ class SpritesTest < Test::Unit::TestCase | |
it "should generate a sprite from nested folders" do | |
css = render <<-SCSS | |
- @import "nested/*.png"; | |
+ @import "nested/**/*.png"; | |
@include all-nested-sprites; | |
SCSS | |
assert_correct css, <<-CSS |
If you have a gist with multiple files, you can include files one at a time by adding the name after the gist id.
{% gist 1059334 svg_bullets.rb %}
{% gist 1059334 usage.scss %}
This plugin was initially developed by Brandon Tilly for Jekyll blogs.