move related_posts into site data
This commit is contained in:
parent
0c270cb1e5
commit
d48157cf33
|
@ -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
|
||||
|
|
|
@ -121,8 +121,8 @@ module Jekyll
|
|||
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.
|
||||
|
|
Loading…
Reference in New Issue