Skip to content

Commit

Permalink
Removing metadata updating.
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfontein committed Dec 3, 2016
1 parent 093f5bf commit 8291489
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
10 changes: 0 additions & 10 deletions nikola/plugin_categories.py
Expand Up @@ -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
Expand Down
12 changes: 0 additions & 12 deletions nikola/plugins/misc/taxonomies_classifier.py
Expand Up @@ -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:
Expand Down

0 comments on commit 8291489

Please sign in to comment.