Add warning when pagination is enabled but no template page has been found

This commit is contained in:
Parker Moore 2013-06-09 21:08:29 +02:00
parent 6e80ba868e
commit 05218711b2
1 changed files with 8 additions and 1 deletions

View File

@ -10,7 +10,14 @@ module Jekyll
# #
# Returns nothing. # Returns nothing.
def generate(site) 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 end
# Paginates the blog's posts. Renders the index.html file into paginated # Paginates the blog's posts. Renders the index.html file into paginated