diff --git a/lib/jekyll/generators/pagination.rb b/lib/jekyll/generators/pagination.rb index 6599aa4c..daded7b1 100644 --- a/lib/jekyll/generators/pagination.rb +++ b/lib/jekyll/generators/pagination.rb @@ -10,7 +10,14 @@ module Jekyll # # Returns nothing. def generate(site) - paginate(site, template_page(site)) if Pager.pagination_enabled?(site) + if Pager.pagination_enabled?(site) + if template = template_page(site) + paginate(site, template) + else + Jekyll.logger.warn "Pagination:", "Pagination is enabled, but I couldn't find" + + "an index.html page to use as the pagination template. Skipping pagination." + end + end end # Paginates the blog's posts. Renders the index.html file into paginated