def validate_layout(layout)
      if invalid_layout?(layout)
        Jekyll.logger.warn(
          "Build Warning:",
          "Layout '#{document.data["layout"]}' requested "\
          "in #{document.relative_path} does not exist."
        )
      elsif !layout.nil?
        layout_source = layout.path.start_with?(site.source) ? :site : :theme
        Jekyll.logger.debug "Layout source:", layout_source
      end
    end
def validate_layout(layout)
      if invalid_layout?(layout)
        Jekyll.logger.warn(
          "Build Warning:",
          "Layout '#{document.data["layout"]}' requested "\
          "in #{document.relative_path} does not exist."
        )
      elsif !layout.nil?
        layout_source = layout.path.start_with?(site.source) ? :site : :theme
        Jekyll.logger.debug "Layout source:", layout_source
      end
    end
Checks if the layout specified in the document actually exists

 layout - the layout to check
 Returns nothing