avoiding to call site_payload one time per each post and page. Speed site creation up of a 20%.

This commit is contained in:
Luca Grulla 2012-03-03 17:15:08 +00:00 committed by Aman Gupta
parent 305695398c
commit 7d88f72409
1 changed files with 3 additions and 2 deletions

View File

@ -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 } }