gist tag plugin now works with the latest changes GitHub gists and does not fail if you do not specify a filename.

This commit is contained in:
Brandon Mathis 2012-12-18 11:38:37 -06:00
parent 22105bebc9
commit 72b4e8d562
2 changed files with 39 additions and 29 deletions

View file

@ -40,7 +40,9 @@ module Jekyll
end
def script_url_for(gist_id, filename)
"https://gist.github.com/#{gist_id}.js?file=#{filename}"
url = "https://gist.github.com/#{gist_id}.js"
url = "#{url}?file=#{filename}" unless filename.nil? or filename.empty?
url
end
def get_gist_url_for(gist, file)