Sha256: 8fb6c90b82ff7b7439f429f250b20cb184fd47ae71c335f395b2becdc61d5e83

Contents?: true

Size: 416 Bytes

Versions: 15

Compression:

Stored size: 416 Bytes

Contents

# frozen_string_literal: true

module Bridgetown
  module LayoutPlaceable
    # 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`
    def place_in_layout?
      !(yaml_file? || no_layout?)
    end

    def no_layout?
      data["layout"] == "none" || data["layout"] == false
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
bridgetown-core-0.21.0.beta3 lib/bridgetown-core/concerns/layout_placeable.rb
bridgetown-core-0.21.0.beta2 lib/bridgetown-core/concerns/layout_placeable.rb
bridgetown-core-0.21.0.beta1 lib/bridgetown-core/concerns/layout_placeable.rb
bridgetown-core-0.20.0 lib/bridgetown-core/concerns/layout_placeable.rb
bridgetown-core-0.19.3 lib/bridgetown-core/concerns/layout_placeable.rb
bridgetown-core-0.19.2 lib/bridgetown-core/concerns/layout_placeable.rb
bridgetown-core-0.19.1 lib/bridgetown-core/concerns/layout_placeable.rb
bridgetown-core-0.19.0 lib/bridgetown-core/concerns/layout_placeable.rb
bridgetown-core-0.18.6 lib/bridgetown-core/concerns/layout_placeable.rb
bridgetown-core-0.18.5 lib/bridgetown-core/concerns/layout_placeable.rb
bridgetown-core-0.18.4 lib/bridgetown-core/concerns/layout_placeable.rb
bridgetown-core-0.18.3 lib/bridgetown-core/concerns/layout_placeable.rb
bridgetown-core-0.18.2 lib/bridgetown-core/concerns/layout_placeable.rb
bridgetown-core-0.18.1 lib/bridgetown-core/concerns/layout_placeable.rb
bridgetown-core-0.18.0 lib/bridgetown-core/concerns/layout_placeable.rb