From ac6bbc190690fcb4c4ec4e9b821ac8fd922cbd88 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Tue, 30 Aug 2016 14:14:52 -0700 Subject: [PATCH] Renderer#invalid_layout? should check if document is an excerpt --- lib/jekyll/renderer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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.