5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# File 'lib/jekyll/site_ignore_layout.rb', line 5
def self.included(base)
base.class_eval do
def ignored_layout?(layout)
return false unless config['ignored_layouts']
unless config['ignored_layouts'].is_a? Array
raise Jekyll::Errors::InvalidConfigurationError, "`ignored_layouts` must be an Array"
end
@ignored_layout ||= {}
if @ignored_layout.key? layout
@ignored_layout[layout]
else
@ignored_layout[layout] = config['ignored_layouts'].include?(layout)
end
end
end
end
|