diff --git a/lib/jekyll/tags/gist.rb b/lib/jekyll/tags/gist.rb new file mode 100644 index 00000000..d3eb0b37 --- /dev/null +++ b/lib/jekyll/tags/gist.rb @@ -0,0 +1,19 @@ +# Gist Liquid Tag +# +# Example: +# {% gist 1234567 %} + +module Jekyll + class GistTag < Liquid::Tag + def initialize(tag_name, gist, tokens) + super + @gist = gist.strip + end + + def render(context) + "" + end + end +end + +Liquid::Template.register_tag('gist', Jekyll::GistTag) diff --git a/test/test_tags.rb b/test/test_tags.rb index 3d97410b..caefb9ac 100644 --- a/test/test_tags.rb +++ b/test/test_tags.rb @@ -203,4 +203,22 @@ CONTENT assert_match %r{/2008/11/21/complex/}, @result end end + + context "simple gist inclusion" do + setup do + @gist = 358471 + content = < 'pretty', 'source' => source_dir, 'destination' => dest_dir, 'read_posts' => true}) + end + + should "write script tag" do + assert_match %r{}, @result + end + end end