Skip to content
Browse files
Fix a nasty index rebuild bug.
Seemingly caused by manipulating kw[] on the fly, and not translating some
variables properly.

(cc @Aeyoun?)

Signed-off-by: Chris Warrick <>
  • Loading branch information
Kwpolska committed Feb 11, 2016
1 parent 910a52e commit a0f7ecd1dd5728780095ee3df8b4c10640acc21e
Showing with 12 additions and 9 deletions.
  1. +6 −1 nikola/
  2. +6 −8 nikola/plugins/task/
@@ -581,7 +581,12 @@ def __init__(self, **config):
# WARNING: navigation_links SHOULD NOT be added to the list above.
# Themes ask for [lang] there and we should provide it.

@@ -110,8 +110,6 @@ def page_path(i, displayed_i, num_pages, force_addition, extension=None):
yield, filtered_posts, indexes_title, template_name, context, kw, 'render_indexes', page_link, page_path)


kw["posts_section_are_indexes"] =['POSTS_SECTION_ARE_INDEXES']
index_len = len(kw['index_file'])

groups = defaultdict(list)
@@ -147,14 +145,14 @@ def cat_path(i, displayed_i, num_pages, force_addition, extension=None):

if kw["posts_section_are_indexes"]:
kw["posts_section_title"] =['POSTS_SECTION_TITLE'](lang)
posts_section_title =['POSTS_SECTION_TITLE'](lang)

section_title = None
if type(kw["posts_section_title"]) is dict:
if section_slug in kw["posts_section_title"]:
section_title = kw["posts_section_title"][section_slug]
elif type(kw["posts_section_title"]) is str:
section_title = kw["posts_section_title"]
if type(posts_section_title) is dict:
if section_slug in posts_section_title:
section_title = posts_section_title[section_slug]
elif type(posts_section_title) is str:
section_title = posts_section_title
if not section_title:
section_title = post_list[0].section_name(lang)
section_title = section_title.format(name=post_list[0].section_name(lang))

0 comments on commit a0f7ecd

Please sign in to comment.