vendor/bundle/ruby/2.5.0/gems/jekyll-2.4.0/lib/jekyll/renderer.rb
# Render layouts and place given content inside.
#
# content - the content to be placed in the layout
#
#
# Returns the content placed in the Liquid-rendered layouts
Render layouts and place given content inside.
content - the content to be placed in the layout

Returns the content placed in the Liquid-rendered layouts
Render layouts and place given content inside . content - the content to be placed in the layout Returns the content placed in the Liquid - rendered layouts
def place_in_layouts(content, payload, info)
      output = content.dup
      layout = site.layouts[document.data["layout"]]
      Jekyll.logger.warn("Build Warning:", "Layout '#{document.data["layout"]}' requested in #{document.relative_path} does not exist.") if invalid_layout? layout
      used   = Set.new([layout])
      while layout
        payload = Utils.deep_merge_hashes(
          payload,
          {
            "content" => output,
            "page"    => document.to_liquid,
            "layout"  => layout.data
          }
        )
        output = render_liquid(
          layout.content,
          payload,
          info,
          File.join(site.config['layouts'], layout.name)
        )
        if layout = site.layouts[layout.data["layout"]]
          if used.include?(layout)
            layout = nil 
          else
            used << layout
          end
        end
      end
      output
    end
def place_in_layouts ( content , payload , info ) output = content . dup layout = site . layouts [ document . data [ "layout" ] ] Jekyll . logger . warn ( "Build Warning:" , "Layout '#{document.data["layout"]}' requested in #{document.relative_path} does not exist." ) if invalid_layout? layout used = Set . new ( [ layout ] ) while layout payload = Utils . deep_merge_hashes ( payload , { "content" => output , "page" => document . to_liquid , "layout" => layout . data } ) output = render_liquid ( layout . content , payload , info , File . join ( site . config [ 'layouts' ] , layout . name ) ) if layout = site . layouts [ layout . data [ "layout" ] ] if used . include? ( layout ) layout = nil else used << layout end end end output end
Render layouts and place given content inside.
Render layouts and place given content inside .
# avoid recursive chain
content
<not_specific>
payload
<not_specific>
info
<not_specific>