sort posts before rendering so next and previous posts work

Signed-off-by: Nick Quaranto <nick@quaran.to>
This commit is contained in:
Thomas Jack 2009-04-22 20:51:49 -05:00 committed by Nick Quaranto
parent 45b46722bf
commit dd268fae95
1 changed files with 2 additions and 1 deletions

View File

@ -130,12 +130,13 @@ module Jekyll
end
end
self.posts.sort!
# second pass renders each post now that full site payload is available
self.posts.each do |post|
post.render(self.layouts, site_payload)
end
self.posts.sort!
self.categories.values.map { |cats| cats.sort! { |a, b| b <=> a} }
rescue Errno::ENOENT => e
# ignore missing layout dir