As we are couting the pages from 1 we have to continue until pages+1

This commit is contained in:
Urban Hafner 2009-06-02 10:44:34 +03:00
parent d79d94277b
commit a116eaf0ee
1 changed files with 2 additions and 1 deletions

View File

@ -252,8 +252,9 @@ module Jekyll
all_posts = self.posts.sort { |a,b| b <=> a }
pages = Pager.calculate_pages(all_posts, self.config['paginate'].to_i)
pages += 1
(1..pages).each do |num_page|
pager = Pager.new(self.config, num_page, all_posts, pages)
page = Page.new(self, self.source, dir, file)
page.render(self.layouts, site_payload.merge({'paginator' => pager.to_hash}))