Skip to content

Commit

Permalink
Don't put stuff into metadata and use correct mechanism to get tags f…
Browse files Browse the repository at this point in the history
…or post.
  • Loading branch information
felixfontein committed Dec 3, 2016
1 parent b5bfd49 commit 093f5bf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion nikola/plugins/task/categories.py
Expand Up @@ -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"
Expand Down
8 changes: 3 additions & 5 deletions nikola/plugins/task/tags.py
Expand Up @@ -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
Expand All @@ -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."""
Expand Down

0 comments on commit 093f5bf

Please sign in to comment.