Module: Jekyll::DocumentIgnoreLayout

Defined in:
lib/jekyll/document_ignore_layout.rb

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/jekyll/document_ignore_layout.rb', line 5

def self.included(base)
  base.class_eval do
    alias :original_write? :write?

    # Only write the document when its layout is not ignored
    def write?
      return false if site.ignored_layout?(data['layout'])

      original_write?
    end
  end
end