Skip to content

Commit 0c1c59b

Browse files
committedOct 21, 2015
New option TAGS_INDEX_PATH for overwriting said path
1 parent ddcd9e9 commit 0c1c59b

File tree

4 files changed

+17
-3
lines changed

4 files changed

+17
-3
lines changed
 

‎CHANGES.txt

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ New in master
44
Features
55
--------
66

7+
* New ``TAGS_INDEX_PATH`` option for overwriting the path
8+
of the tag index list page.
79
* Support for ``~~strikethrough~~`` in Markdown (Issue #2149)
810
* Hungarian translation (by Baptiste Darthenay)
911
* ``serve`` and ``auto`` publishes DNS Service Discovery records

‎nikola/conf.py.in

+5
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,11 @@ POSTS_SECTIONS = True
274274
# (translatable)
275275
# TAG_PATH = "categories"
276276

277+
# See TAG_PATH's "list of tags" for the default setting value. Can be overwritten
278+
# here any path relative to the output directory.
279+
# (translatable)
280+
# TAGS_INDEX_PATH = "tags.html"
281+
277282
# If TAG_PAGES_ARE_INDEXES is set to True, each tag's page will contain
278283
# the posts themselves. If set to False, it will be just a list of links.
279284
# TAG_PAGES_ARE_INDEXES = False

‎nikola/nikola.py

+2
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,7 @@ def __init__(self, **config):
482482
'TAG_PAGES_ARE_INDEXES': False,
483483
'TAG_PAGES_DESCRIPTIONS': {},
484484
'TAG_PAGES_TITLES': {},
485+
'TAGS_INDEX_PATH': '',
485486
'TAGLIST_MINIMUM_POSTS': 1,
486487
'TEMPLATE_FILTERS': {},
487488
'THEME': 'bootstrap3',
@@ -558,6 +559,7 @@ def __init__(self, **config):
558559
'INDEXES_PRETTY_PAGE_URL',
559560
# PATH options (Issue #1914)
560561
'TAG_PATH',
562+
'TAGS_INDEX_PATH',
561563
'CATEGORY_PATH',
562564
'DATE_FORMAT',
563565
'JS_DATE_FORMAT',

‎nikola/plugins/task/tags.py

+8-3
Original file line numberDiff line numberDiff line change
@@ -399,9 +399,14 @@ def tag_index_path(self, name, lang):
399399
400400
link://tag_index => /tags/index.html
401401
"""
402-
return [_f for _f in [self.site.config['TRANSLATIONS'][lang],
403-
self.site.config['TAG_PATH'][lang],
404-
self.site.config['INDEX_FILE']] if _f]
402+
if self.site.config['TAGS_INDEX_PATH']:
403+
paths = [_f for _f in [self.site.config['TRANSLATIONS'][lang],
404+
self.site.config['TAGS_INDEX_PATH'][lang]] if _f]
405+
else:
406+
paths = [_f for _f in [self.site.config['TRANSLATIONS'][lang],
407+
self.site.config['TAG_PATH'][lang],
408+
self.site.config['INDEX_FILE']] if _f]
409+
return paths
405410

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

0 commit comments

Comments
 (0)
Please sign in to comment.