diff --git a/lib/jekyll/document.rb b/lib/jekyll/document.rb index 3840375c..5ba740a1 100644 --- a/lib/jekyll/document.rb +++ b/lib/jekyll/document.rb @@ -246,7 +246,7 @@ module Jekyll # # Returns the content of the document def to_s - output || content + content || '' end # Compare this document against another document. diff --git a/lib/jekyll/renderer.rb b/lib/jekyll/renderer.rb index f5d30133..b105093d 100644 --- a/lib/jekyll/renderer.rb +++ b/lib/jekyll/renderer.rb @@ -49,14 +49,17 @@ module Jekyll output = render_liquid(output, payload, info) end + output = convert(output) + document.content = output + if document.place_in_layout? place_in_layouts( - convert(output), + output, payload, info ) else - convert(output) + output end end