Give a build warning if a layout does not exist
Throw a warning if a non-"none" layout is specified but the corresponding layout file does not exist.
This commit is contained in:
parent
c8b22a19ad
commit
ac744a6313
|
@ -163,6 +163,11 @@ module Jekyll
|
||||||
def render_all_layouts(layouts, payload, info)
|
def render_all_layouts(layouts, payload, info)
|
||||||
# recursively render layouts
|
# recursively render layouts
|
||||||
layout = layouts[data["layout"]]
|
layout = layouts[data["layout"]]
|
||||||
|
|
||||||
|
if !data["layout"].nil? && data["layout"] != "none" && layout.nil?
|
||||||
|
Jekyll.logger.warn("Build Warning:", "Layout #{data["layout"]} does not exist.")
|
||||||
|
end
|
||||||
|
|
||||||
used = Set.new([layout])
|
used = Set.new([layout])
|
||||||
|
|
||||||
while layout
|
while layout
|
||||||
|
|
Loading…
Reference in New Issue