Skip to content

Commit

Permalink
Named format for name replacement
Browse files Browse the repository at this point in the history
  • Loading branch information
da2x committed Aug 29, 2015
1 parent 63b0d4f commit fb0c454
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion nikola/conf.py.in
Expand Up @@ -254,7 +254,7 @@ POSTS_SECTIONS = True
# },
# }

# Titles for per-section index pages. Can be either one string where "%s"
# Titles for per-section index pages. Can be either one string where "{name}"
# is substituted or the POSTS_SECTION_NAME, or a dict of sections. Note
# that the INDEX_PAGES option is also applied to section page titles.
# POSTS_SECTION_TITLE = {
Expand Down
2 changes: 1 addition & 1 deletion nikola/nikola.py
Expand Up @@ -423,7 +423,7 @@ def __init__(self, **config):
'POSTS_SECTION_DESCRIPTIONS': "",
'POSTS_SECTION_FROM_META': False,
'POSTS_SECTION_NAME': "",
'POSTS_SECTION_TITLE': "%s",
'POSTS_SECTION_TITLE': "{name}",
'PAGES': (("stories/*.txt", "stories", "story.tmpl"),),
'PANDOC_OPTIONS': [],
'PRETTY_URLS': False,
Expand Down
2 changes: 1 addition & 1 deletion nikola/plugins/task/indexes.py
Expand Up @@ -149,7 +149,7 @@ def cat_path(i, displayed_i, num_pages, force_addition, extension=None):
section_title = kw["posts_section_title"]
if not section_title:
section_title = post_list[0].section_name(lang)
section_title = section_title.format(post_list[0].section_name(lang))
section_title = section_title.format(name=post_list[0].section_name(lang))

task = self.site.generic_index_renderer(lang, post_list, section_title, "sectionindex.tmpl", context, kw, self.name, cat_link, cat_path)
else:
Expand Down

0 comments on commit fb0c454

Please sign in to comment.