Skip to content
Permalink
Browse files
Improve style for 9ed0cfa/#3081
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed May 9, 2018
1 parent 9ed0cfa commit 26c8f2b51e66020ff194085bba168218540b8b50
Showing with 2 additions and 3 deletions.
  1. +2 −3 nikola/plugins/task/categories.py
@@ -127,16 +127,15 @@ def get_path(self, classification, lang, dest_type='page'):
cat_string = '/'.join(classification)
if self.site.config['CATEGORY_PAGES_FOLLOW_DESTPATH']:
base_dir = None
sub_dir = []
for post in self.site.posts_per_category[cat_string]:
if post.category_from_destpath:
base_dir = post.folder_base(lang) + os.sep + os.sep.join(classification)
base_dir = post.folder_base(lang)
break
# fallback: first POSTS entry + classification
if base_dir is None:
base_dir = self.site.config['POSTS'][0][1]
sub_dir = [self.slugify_tag_name(part, lang) for part in classification]
base_dir_list = base_dir.split(os.sep)
sub_dir = [self.slugify_tag_name(part, lang) for part in classification]
return [_f for _f in (base_dir_list + sub_dir) if _f], 'auto'
else:
return [_f for _f in [self.site.config['CATEGORY_PATH'](lang)] if _f] + self.slugify_category_name(

0 comments on commit 26c8f2b

Please sign in to comment.