Skip to content

Commit

Permalink
remove duplicated render code for posts and pages
Browse files Browse the repository at this point in the history
  • Loading branch information
maul.esel committed Oct 17, 2013
1 parent 7232948 commit f0aac30
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions lib/jekyll/site.rb
Original file line number Diff line number Diff line change
Expand Up @@ -234,12 +234,8 @@ def render
relative_permalinks_deprecation_method

payload = site_payload
self.posts.each do |post|
post.render(self.layouts, payload)
end

self.pages.each do |page|
page.render(self.layouts, payload)
[self.posts, self.pages].flatten.each do |page_or_post|
page_or_post.render(self.layouts, payload)
end

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

0 comments on commit f0aac30

Please sign in to comment.