Skip to content
Permalink
Browse files
Don't put stuff into metadata and use correct mechanism to get tags f…
…or post.
  • Loading branch information
felixfontein committed Dec 3, 2016
1 parent b5bfd49 commit 093f5bf6fee69681bad6936517a7ef2899cd9491
Showing with 4 additions and 6 deletions.
  1. +1 −1 nikola/plugins/task/categories.py
  2. +3 −5 nikola/plugins/task/tags.py
@@ -42,7 +42,7 @@ class ClassifyCategories(Taxonomy):
name = "classify_categories"

classification_name = "category"
metadata_name = "category"
metadata_name = None
overview_page_variable_name = "categories"
overview_page_items_variable_name = "cat_items"
overview_page_hierarchy_variable_name = "cat_hierarchy"
@@ -42,8 +42,8 @@ class ClassifyTags(Taxonomy):
name = "classify_tags"

classification_name = "tag"
metadata_name = "tags"
overview_page_variable_name = "tags"
metadata_name = None
overview_page_variable_name = None
overview_page_items_variable_name = "items"
more_than_one_classifications_per_post = True
has_hierarchy = False
@@ -69,9 +69,7 @@ def is_enabled(self, lang=None):

def classify(self, post, lang):
"""Classify the given post for the given language."""
if lang not in post._tags and self.site.config["SHOW_UNTRANSLATED_POSTS"]:
lang = self.site.config['DEFAULT_LANG']
return post._tags.get(lang, [])
return post.tags_for_language(lang)

def get_classification_friendly_name(self, classification, lang, only_last_component=False):
"""Extract a friendly name from the classification."""

0 comments on commit 093f5bf

Please sign in to comment.