Skip to content
Permalink
Browse files

Fixing two bugs.

  • Loading branch information
felixfontein committed Oct 17, 2016
1 parent 9effcfa commit c15e75e7ee835693942ea1b19870463083c4f288
Showing with 8 additions and 0 deletions.
  1. +2 −0 nikola/plugins/misc/taxonomies_classifier.py
  2. +6 −0 nikola/plugins/task/indexes.py
@@ -55,6 +55,8 @@ def _do_classification(self, site):

# Classify posts
for post in site.timeline:
if not post.use_in_feeds:
continue
for taxonomy in taxonomies:
if taxonomy.apply_to_posts if post.is_post else taxonomy.apply_to_pages:
classifications = {}
@@ -85,3 +85,9 @@ def provide_context_and_uptodate(self, classification, lang):
}
kw.update(context)
return context, kw

def postprocess_posts_per_classification(self, posts_per_classification_per_language, flat_hierarchy_per_lang=None, hierarchy_lookup_per_lang=None):
"""Rearrange, modify or otherwise use the list of posts per classification and per language."""
for lang, posts_per_classification in posts_per_classification_per_language.items():
if len(posts_per_classification) == 0:
posts_per_classification[""] = []

0 comments on commit c15e75e

Please sign in to comment.