lib/jekyll-paginate/pagination.rb in jekyll-paginate-1.0.0 vs lib/jekyll-paginate/pagination.rb in jekyll-paginate-1.1.0

- old
+ new

@@ -37,9 +37,10 @@ # "total_pages" => <Number>, # "previous_page" => <Number>, # "next_page" => <Number> }} def paginate(site, page) all_posts = site.site_payload['site']['posts'] + all_posts = all_posts.reject { |p| p['hidden'] } pages = Pager.calculate_pages(all_posts, site.config['paginate'].to_i) (1..pages).each do |num_page| pager = Pager.new(site, num_page, all_posts, pages) if num_page > 1 newpage = Page.new(site, site.source, page.dir, page.name)