Skip to content
Permalink
Browse files
Fixing configurations relying on buggy behavior.
  • Loading branch information
felixfontein committed Feb 1, 2017
1 parent d4c0f3a commit 590736c18efb1f4ffdf5fbb8ae342d630b791811
Showing with 10 additions and 2 deletions.
  1. +5 −1 nikola/plugins/task/categories.py
  2. +5 −1 nikola/plugins/task/tags.py
@@ -100,7 +100,11 @@ def get_classification_friendly_name(self, classification, lang, only_last_compo
def get_overview_path(self, lang, dest_type='page'):
"""A path handler for the list of all classifications."""
if self.site.config['CATEGORIES_INDEX_PATH'](lang):
return [_f for _f in [self.site.config['CATEGORIES_INDEX_PATH'](lang)] if _f], 'never'
path = self.site.config['CATEGORIES_INDEX_PATH'](lang)
if path.endswith('/index'): # TODO: remove in v8
utils.LOGGER.warn("CATEGORIES_INDEX_PATH for language {0} is missing a .html extension. Please update your configuration!".format(lang))
path += '.html'
return [_f for _f in [path] if _f], 'never'
else:
return [_f for _f in [self.site.config['CATEGORY_PATH'](lang)] if _f], 'always'

@@ -104,7 +104,11 @@ def slugify_tag_name(self, name, lang):
def get_overview_path(self, lang, dest_type='page'):
"""A path handler for the list of all classifications."""
if self.site.config['TAGS_INDEX_PATH'](lang):
return [_f for _f in [self.site.config['TAGS_INDEX_PATH'](lang)] if _f], 'never'
path = self.site.config['TAGS_INDEX_PATH'](lang)
if path.endswith('/index'): # TODO: remove in v8
utils.LOGGER.warn("TAGS_INDEX_PATH for language {0} is missing a .html extension. Please update your configuration!".format(lang))
path += '.html'
return [_f for _f in [path] if _f], 'never'
else:
return [_f for _f in [self.site.config['TAG_PATH'](lang)] if _f], 'always'

0 comments on commit 590736c

Please sign in to comment.