Simplify `Jekyll::Renderer#validate_layout` (#8064)
Merge pull request 8064
This commit is contained in:
parent
46cffe89b8
commit
784a689b13
|
@ -174,16 +174,10 @@ module Jekyll
|
||||||
# layout - the layout to check
|
# layout - the layout to check
|
||||||
# Returns nothing
|
# Returns nothing
|
||||||
def validate_layout(layout)
|
def validate_layout(layout)
|
||||||
if invalid_layout?(layout)
|
return unless invalid_layout?(layout)
|
||||||
Jekyll.logger.warn(
|
|
||||||
"Build Warning:",
|
Jekyll.logger.warn "Build Warning:", "Layout '#{document.data["layout"]}' requested " \
|
||||||
"Layout '#{document.data["layout"]}' requested "\
|
|
||||||
"in #{document.relative_path} does not exist."
|
"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
|
end
|
||||||
|
|
||||||
# Render layout content into document.output
|
# Render layout content into document.output
|
||||||
|
|
Loading…
Reference in New Issue