Skip to content
Permalink
Browse files
Removing metadata updating.
  • Loading branch information
felixfontein committed Dec 3, 2016
1 parent 093f5bf commit 8291489473dd83ab08b53881b979001a763550c5
Showing with 0 additions and 22 deletions.
  1. +0 −10 nikola/plugin_categories.py
  2. +0 −12 nikola/plugins/misc/taxonomies_classifier.py
@@ -488,16 +488,6 @@ class Taxonomy(BasePlugin):
classification_name = "taxonomy":
The classification name to be used for path handlers.
metadata_name = "taxonomy":
The classification name to be used when storing the classification
in the metadata. If set to None, the classification won't be stored
in the metadata.
metadata_friendly_name = None:
The name to be used when storing the friendly names of the classification
in the metadata. If set to None, the friendly names won't be stored
in the metadata.
overview_page_items_variable_name = "items":
When rendering the overview page, its template will have a list
of pairs
@@ -67,18 +67,6 @@ def _do_classification(self, site):
# Extract classifications for this language
classifications[lang] = taxonomy.classify(post, lang)
assert taxonomy.more_than_one_classifications_per_post or len(classifications[lang]) <= 1
# Store in metadata
if taxonomy.metadata_name is not None:
if taxonomy.more_than_one_classifications_per_post:
post.meta[lang][taxonomy.metadata_name] = classifications[lang]
else:
post.meta[lang][taxonomy.metadata_name] = classifications[lang][0] if len(classifications[lang]) > 0 else None
if taxonomy.metadata_friendly_name is not None:
friendly_names = [taxonomy.get_classification_friendly_name(classification, lang) for classification in classifications[lang]]
if taxonomy.more_than_one_classifications_per_post:
post.meta[lang][taxonomy.metadata_friendly_name] = friendly_names
else:
post.meta[lang][taxonomy.metadata_friendly_name] = friendly_names[0] if len(friendly_names) > 0 else None
# Add post to sets
for classification in classifications[lang]:
while True:

0 comments on commit 8291489

Please sign in to comment.