Permalink
Browse files

New option TAGS_INDEX_PATH for overwriting said path

  • Loading branch information...
da2x committed Oct 21, 2015
1 parent ddcd9e9 commit 0c1c59b2199cd75327374a305d2017fc9d555dbc
Showing with 17 additions and 3 deletions.
  1. +2 −0 CHANGES.txt
  2. +5 −0 nikola/conf.py.in
  3. +2 −0 nikola/nikola.py
  4. +8 −3 nikola/plugins/task/tags.py
@@ -4,6 +4,8 @@ New in master
Features
--------

* New ``TAGS_INDEX_PATH`` option for overwriting the path
of the tag index list page.
* Support for ``~~strikethrough~~`` in Markdown (Issue #2149)
* Hungarian translation (by Baptiste Darthenay)
* ``serve`` and ``auto`` publishes DNS Service Discovery records
@@ -274,6 +274,11 @@ POSTS_SECTIONS = True
# (translatable)
# TAG_PATH = "categories"

# See TAG_PATH's "list of tags" for the default setting value. Can be overwritten
# here any path relative to the output directory.
# (translatable)
# TAGS_INDEX_PATH = "tags.html"

# If TAG_PAGES_ARE_INDEXES is set to True, each tag's page will contain
# the posts themselves. If set to False, it will be just a list of links.
# TAG_PAGES_ARE_INDEXES = False
@@ -482,6 +482,7 @@ def __init__(self, **config):
'TAG_PAGES_ARE_INDEXES': False,
'TAG_PAGES_DESCRIPTIONS': {},
'TAG_PAGES_TITLES': {},
'TAGS_INDEX_PATH': '',
'TAGLIST_MINIMUM_POSTS': 1,
'TEMPLATE_FILTERS': {},
'THEME': 'bootstrap3',
@@ -558,6 +559,7 @@ def __init__(self, **config):
'INDEXES_PRETTY_PAGE_URL',
# PATH options (Issue #1914)
'TAG_PATH',
'TAGS_INDEX_PATH',
'CATEGORY_PATH',
'DATE_FORMAT',
'JS_DATE_FORMAT',
@@ -399,9 +399,14 @@ def tag_index_path(self, name, lang):
link://tag_index => /tags/index.html
"""
return [_f for _f in [self.site.config['TRANSLATIONS'][lang],
self.site.config['TAG_PATH'][lang],
self.site.config['INDEX_FILE']] if _f]
if self.site.config['TAGS_INDEX_PATH']:
paths = [_f for _f in [self.site.config['TRANSLATIONS'][lang],
self.site.config['TAGS_INDEX_PATH'][lang]] if _f]
else:
paths = [_f for _f in [self.site.config['TRANSLATIONS'][lang],
self.site.config['TAG_PATH'][lang],
self.site.config['INDEX_FILE']] if _f]
return paths

def category_index_path(self, name, lang):
"""A link to the category index.

0 comments on commit 0c1c59b

Please sign in to comment.