diff --git a/lib/jekyll/renderer.rb b/lib/jekyll/renderer.rb index 44f3fb5e..b1177b60 100644 --- a/lib/jekyll/renderer.rb +++ b/lib/jekyll/renderer.rb @@ -126,7 +126,7 @@ module Jekyll # # Returns true if the layout is invalid, false if otherwise def invalid_layout?(layout) - !document.data["layout"].nil? && layout.nil? + !document.data["layout"].nil? && layout.nil? && !(document.is_a? Jekyll::Excerpt) end # Render layouts and place given content inside.