Skip to content

Commit

Permalink
Generate at least one page, issue #52
Browse files Browse the repository at this point in the history
  • Loading branch information
ibrado authored and sverrirs committed Dec 2, 2017
1 parent 1651c4b commit 51fdc61
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/jekyll-paginate-v2/generator/paginationModel.rb
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,11 @@ def paginate(template, config, site_title, all_posts, all_tags, all_categories,
indexPageExt = Utils.ensure_leading_dot(config['extension'])
indexPageWithExt = indexPageName + indexPageExt

# In case there are no (visible) posts, generate the index file anyway
if total_pages == 0
total_pages = 1
end

# Now for each pagination page create it and configure the ranges for the collection
# This .pager member is a built in thing in Jekyll and defines the paginator implementation
# Simpy override to use mine
Expand Down

0 comments on commit 51fdc61

Please sign in to comment.