avoiding to call site_payload one time per each post and page. Speed site creation up of a 20%.
This commit is contained in:
parent
305695398c
commit
7d88f72409
|
@ -195,12 +195,13 @@ module Jekyll
|
||||||
#
|
#
|
||||||
# Returns nothing.
|
# Returns nothing.
|
||||||
def render
|
def render
|
||||||
|
payload = site_payload
|
||||||
self.posts.each do |post|
|
self.posts.each do |post|
|
||||||
post.render(self.layouts, site_payload)
|
post.render(self.layouts, payload)
|
||||||
end
|
end
|
||||||
|
|
||||||
self.pages.each do |page|
|
self.pages.each do |page|
|
||||||
page.render(self.layouts, site_payload)
|
page.render(self.layouts, payload)
|
||||||
end
|
end
|
||||||
|
|
||||||
self.categories.values.map { |ps| ps.sort! { |a, b| b <=> a } }
|
self.categories.values.map { |ps| ps.sort! { |a, b| b <=> a } }
|
||||||
|
|
Loading…
Reference in New Issue