Permalink
Browse files

move related_posts into site data

  • Loading branch information...
1 parent 0c270cb commit d48157cf33ac06b5a5466b75c3d759d09f7d5a38 @mojombo mojombo committed Dec 14, 2008
Showing with 7 additions and 7 deletions.
  1. +5 −5 README.textile
  2. +2 −2 lib/jekyll/post.rb
View
@@ -76,11 +76,6 @@ h3. Global
In layout files, this contains the content of the subview(s). In Posts or
pages, this is undefined.
- related_posts
- If the page being processed is a Post, this contains a list of up to ten
- related Posts. For high quality results be sure to run the jekyll command
- with the --lsi option.
-
h3. Site
site.time
@@ -89,6 +84,11 @@ h3. Site
site.posts
A reverse chronological list of Posts
+ site.related_posts
+ If the page being processed is a Post, this contains a list of up to ten
+ related Posts. For high quality results be sure to run the jekyll command
+ with the --lsi option.
+
h3. Post
post.title
View
@@ -121,8 +121,8 @@ def related_posts(posts)
def add_layout(layouts, site_payload)
# construct post payload
related = related_posts(site_payload["site"]["posts"])
- payload = {"page" => self.to_liquid.merge(self.data), "related_posts" => related}
- do_layout(payload, layouts, site_payload)
+ payload = {"page" => self.to_liquid.merge(self.data)}
+ do_layout(payload, layouts, site_payload.merge({"site" => {"related_posts" => related}}))
end
# Write the generated post file to the destination directory.

0 comments on commit d48157c

Please sign in to comment.