Sha256: 07623f7ec71cb72aaf38504af453879f576eacc033f4ced25d6bf0353cbb2cfc

Contents?: true

Size: 425 Bytes

Versions: 1

Compression:

Stored size: 425 Bytes

Contents

# frozen_string_literal: true

module Bridgetown
  module LayoutPlaceable
    # Determine whether the file should be placed into layouts.
    #
    # @return [Boolean] false if the document is an asset file or if the front matter
    #   specifies `layout: none`
    def place_in_layout?
      no_layout?.!
    end

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bridgetown-core-2.0.0.beta3 lib/bridgetown-core/concerns/layout_placeable.rb