vendor/bundle/gems/jekyll-3.1.6/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])
      payload["layout"] = nil
      while layout
        payload['content'] = output
        payload['page']    = document.to_liquid
        payload['layout']  = Utils.deep_merge_hashes(layout.data, payload["layout"] || {})
        output = render_liquid(
          layout.content,
          payload,
          info,
          File.join(site.config['layouts_dir'], layout.name)
        )
        site.regenerator.add_dependency(
          site.in_source_dir(document.path),
          site.in_source_dir(layout.path)
        ) if document.write?
        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 ] ) payload [ "layout" ] = nil while layout payload [ 'content' ] = output payload [ 'page' ] = document . to_liquid payload [ 'layout' ] = Utils . deep_merge_hashes ( layout . data , payload [ "layout" ] || { } ) output = render_liquid ( layout . content , payload , info , File . join ( site . config [ 'layouts_dir' ] , layout . name ) ) site . regenerator . add_dependency ( site . in_source_dir ( document . path ) , site . in_source_dir ( layout . path ) ) if document . write? 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 .
# Reset the payload layout data to ensure it starts fresh for each page. # Add layout to dependency tree # avoid recursive chain
content
<not_specific>
payload
<not_specific>
info
<not_specific>