From d57c4f1c01b91c066bcd73512c397e8249f73cf2 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Tue, 12 Aug 2014 11:25:22 -0400 Subject: [PATCH 1/2] Document#to_s should produce just the content of the document. Fixes #2655 --- lib/jekyll/document.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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. From db34c48927f1bbdaeb0fbda3a445df379fb83402 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Tue, 12 Aug 2014 12:52:38 -0400 Subject: [PATCH 2/2] Just like for Convertible, place the un-layouted content in document.content. --- lib/jekyll/renderer.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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