Skip to content
Permalink
Browse files

Make sure that empty archive pages are not generated except for the m…

…ain archive page.
  • Loading branch information
felixfontein committed Oct 20, 2016
1 parent fc8d6f3 commit 7b4d25ceb02277c1c5fc3379491a6a9eaed60918
Showing with 4 additions and 0 deletions.
  1. +4 −0 nikola/plugins/task/archive.py
@@ -164,3 +164,7 @@ def provide_context_and_uptodate(self, classification, lang):
context["is_feed_stale"] = kw["is_feed_stale"]
kw.update(context)
return context, kw

def should_generate_classification_list(self, classification, post_list, lang):
"""Only generates list of posts for classification if this function returns True."""
return classification == "" or len(post_list) > 0

0 comments on commit 7b4d25c

Please sign in to comment.