Sha256: 9972e8c196351ba8ae8b0b625989ff4dd51e8bfe6c2b6a5e9eaed4626f07d6be

Contents?: true

Size: 389 Bytes

Versions: 5

Compression:

Stored size: 389 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"
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
bridgetown-core-0.17.1 lib/bridgetown-core/concerns/layout_placeable.rb
bridgetown-core-0.17.0 lib/bridgetown-core/concerns/layout_placeable.rb
bridgetown-core-0.16.0 lib/bridgetown-core/concerns/layout_placeable.rb
bridgetown-core-0.16.0.beta2 lib/bridgetown-core/concerns/layout_placeable.rb
bridgetown-core-0.16.0.beta1 lib/bridgetown-core/concerns/layout_placeable.rb