Skip to content
Browse files

Fixed bug where site_payload would thrown away on posts.

  • Loading branch information...
1 parent cdfca21 commit 2be0b98436c3e0a007219bcce72749d8409ba064 @metajack metajack committed Dec 22, 2008
Showing with 4 additions and 1 deletion.
  1. +1 −0 lib/jekyll/convertible.rb
  2. +3 −1 lib/jekyll/post.rb
View
1 lib/jekyll/convertible.rb
@@ -59,6 +59,7 @@ def transform
def do_layout(payload, layouts, site_payload)
# construct payload
payload = payload.merge(site_payload)
+
# render content
unless self.is_a? Jekyll::Post
self.content = Liquid::Template.parse(self.content).render(payload, [Jekyll::Filters])
View
4 lib/jekyll/post.rb
@@ -124,7 +124,9 @@ def add_layout(layouts, site_payload)
# construct post payload
related = related_posts(site_payload["site"]["posts"])
payload = {"page" => self.to_liquid.merge(self.data)}
- do_layout(payload, layouts, site_payload.merge({"site" => {"related_posts" => related}}))
+
+ site_payload["site"].merge!({"related_posts" => related})
+ do_layout(payload, layouts, site_payload)
end
# Write the generated post file to the destination directory.

0 comments on commit 2be0b98

Please sign in to comment.
Something went wrong with that request. Please try again.