'gist' liquid tag by @stereobooster. Fixes #463.

This commit is contained in:
sterebooster 2013-02-24 00:38:10 +01:00 committed by Parker Moore
parent cc0f84197a
commit 425f466842
1 changed files with 19 additions and 0 deletions

19
lib/jekyll/tags/gist.rb Normal file
View File

@ -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
end
def render(context)
"<script src=\"http://gist.github.com/#{@gist}.js\" type=\"text/javascript\"></script>"
end
end
end
Liquid::Template.register_tag('gist', Jekyll::GistTag)