Skip to content

Commit

Permalink
avoiding to call site_payload one time per each post and page. Speed …
Browse files Browse the repository at this point in the history
…site creation up of a 20%.
  • Loading branch information
lucagrulla authored and tmm1 committed Apr 29, 2012
1 parent 3056953 commit 7d88f72
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/jekyll/site.rb
Original file line number Diff line number Diff line change
Expand Up @@ -195,12 +195,13 @@ def generate
#
# Returns nothing.
def render
payload = site_payload
self.posts.each do |post|
post.render(self.layouts, site_payload)
post.render(self.layouts, payload)
end

self.pages.each do |page|
page.render(self.layouts, site_payload)
page.render(self.layouts, payload)
end

self.categories.values.map { |ps| ps.sort! { |a, b| b <=> a } }
Expand Down

0 comments on commit 7d88f72

Please sign in to comment.