diff --git a/lib/jekyll/site.rb b/lib/jekyll/site.rb index eaba3d48..622f49ca 100644 --- a/lib/jekyll/site.rb +++ b/lib/jekyll/site.rb @@ -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