Skip to content

Commit

Permalink
Make sure that empty archive pages are not generated except for the m…
Browse files Browse the repository at this point in the history
…ain archive page.
  • Loading branch information
felixfontein committed Oct 20, 2016
1 parent fc8d6f3 commit 7b4d25c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions nikola/plugins/task/archive.py
Expand Up @@ -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.