Skip to content

Commit cce8157

Browse files
committed
allow noscript fallback to be disabled
1 parent 475035e commit cce8157

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/jekyll-gist/gist_tag.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ class GistTag < Liquid::Tag
1010

1111
def render(context)
1212
@encoding = context.registers[:site].config['encoding'] || 'utf-8'
13+
@settings = context.registers[:site].config['gist']
1314
if tag_contents = determine_arguments(@markup.strip)
1415
gist_id, filename = tag_contents[0], tag_contents[1]
1516
if context.has_key?(gist_id)
@@ -50,6 +51,7 @@ def gist_script_tag(gist_id, filename = nil)
5051
end
5152

5253
def gist_noscript_tag(gist_id, filename = nil)
54+
return if @settings && @settings["noscript"] == false
5355
code = fetch_raw_code(gist_id, filename)
5456
if !code.nil?
5557
code = code.force_encoding(@encoding)

0 commit comments

Comments
 (0)