Module: Bridgetown::LayoutPlaceable

Included in:
GeneratedPage, Resource::Base
Defined in:
bridgetown-core/lib/bridgetown-core/concerns/layout_placeable.rb

Instance Method Summary collapse

Instance Method Details

#no_layout?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'bridgetown-core/lib/bridgetown-core/concerns/layout_placeable.rb', line 13

def no_layout?
  data.layout.nil? || data.layout == "none" || data.layout == false
end

#place_in_layout?Boolean

Determine whether the file should be placed into layouts.

Returns false if the document is an asset file or if the front matter specifies layout: none

Returns:

  • (Boolean)


9
10
11
# File 'bridgetown-core/lib/bridgetown-core/concerns/layout_placeable.rb', line 9

def place_in_layout?
  no_layout?.!
end