Skip to content
Permalink
Browse files
RSS_PATH_FILENAME_BASE -> RSS_FILENAME_BASE.
  • Loading branch information
felixfontein committed Apr 15, 2018
1 parent a5c8f38 commit 58388b3797dc894b4628328b947b685bd49cf832
Showing with 13 additions and 10 deletions.
  1. +6 −3 nikola/conf.py.in
  2. +4 −4 nikola/nikola.py
  3. +1 −1 nikola/plugins/task/galleries.py
  4. +1 −1 nikola/plugins/task/indexes.py
  5. +1 −1 nikola/plugins/task/sections.py
@@ -249,7 +249,7 @@ POSTS_SECTIONS = True

# Final locations are:
# output / TRANSLATION[lang] / SECTION_PATH / SECTION_NAME / index.html (list of posts for a section)
# output / TRANSLATION[lang] / SECTION_PATH / SECTION_NAME / rss RSS_EXTENSION (RSS feed for a section)
# output / TRANSLATION[lang] / SECTION_PATH / SECTION_NAME / RSS_FILENAME_BASE RSS_EXTENSION (RSS feed for a section)
# (translatable)
# SECTION_PATH = ""

@@ -518,11 +518,14 @@ USE_BASE_TAG = False
# Extension for RSS feed files
# RSS_EXTENSION = ".xml"

# RSS filename base (without extension); used for indexes, sections and galleries.
# (translatable)
# RSS_FILENAME_BASE = "rss"

# Final location for the blog main RSS feed is:
# output / TRANSLATION[lang] / RSS_PATH / RSS_PATH_FILENAME_BASE RSS_EXTENSION
# output / TRANSLATION[lang] / RSS_PATH / RSS_FILENAME_BASE RSS_EXTENSION
# (translatable)
# RSS_PATH = ""
# RSS_PATH_FILENAME_BASE = "rss"

# Slug the Tag URL. Easier for users to type, special characters are
# often removed or replaced as well.
@@ -548,7 +548,7 @@ def __init__(self, **config):
'RSS_EXTENSION': '.xml',
'RSS_LINK': None,
'RSS_PATH': '',
'RSS_PATH_FILENAME_BASE': 'rss',
'RSS_FILENAME_BASE': 'rss',
'SEARCH_FORM': '',
'SHOW_BLOG_TITLE': True,
'SHOW_INDEX_PAGE_NAVIGATION': False,
@@ -656,7 +656,7 @@ def __init__(self, **config):
'SECTION_PATH',
'INDEX_PATH',
'RSS_PATH',
'RSS_PATH_FILENAME_BASE',
'RSS_FILENAME_BASE',
'AUTHOR_PATH',
'DATE_FORMAT',
'JS_DATE_FORMAT',
@@ -683,7 +683,7 @@ def __init__(self, **config):
'posts_section_title',
'front_index_header',
'rss_path',
'rss_path_filename_base',
'rss_filename_base',
)
# WARNING: navigation_links SHOULD NOT be added to the list above.
# Themes ask for [lang] there and we should provide it.
@@ -1122,7 +1122,7 @@ def _set_global_context_from_config(self):
self._GLOBAL_CONTEXT['generate_atom'] = self.config.get('GENERATE_ATOM')
self._GLOBAL_CONTEXT['generate_rss'] = self.config.get('GENERATE_RSS')
self._GLOBAL_CONTEXT['rss_path'] = self.config.get('RSS_PATH')
self._GLOBAL_CONTEXT['rss_path_filename_base'] = self.config.get('RSS_PATH_FILENAME_BASE')
self._GLOBAL_CONTEXT['rss_filename_base'] = self.config.get('RSS_FILENAME_BASE')
self._GLOBAL_CONTEXT['rss_link'] = self.config.get('RSS_LINK')

self._GLOBAL_CONTEXT['navigation_links'] = self.config.get('NAVIGATION_LINKS')
@@ -162,7 +162,7 @@ def gallery_rss_path(self, name, lang):
gallery_path = self._find_gallery_path(name)
return [_f for _f in [self.site.config['TRANSLATIONS'][lang]] +
gallery_path.split(os.sep) +
['rss' + self.site.config['RSS_EXTENSION']] if _f]
[self.site.config['RSS_FILENAME_BASE'](lang) + self.site.config['RSS_EXTENSION']] if _f]

def gen_tasks(self):
"""Render image galleries."""
@@ -93,7 +93,7 @@ def get_path(self, classification, lang, dest_type='page'):
if dest_type == 'rss':
return [
self.site.config['RSS_PATH'](lang),
self.site.config['RSS_PATH_FILENAME_BASE'](lang)
self.site.config['RSS_FILENAME_BASE'](lang)
], 'auto'
# 'page' (index) or 'feed' (Atom)
page_number = None
@@ -100,7 +100,7 @@ def get_path(self, section, lang, dest_type='page'):
"""Return a path for the given classification."""
result = [_f for _f in [self.site.config['SECTION_PATH'](lang), section] if _f]
if dest_type == 'rss':
return result + ['rss' + self.site.config['RSS_EXTENSION']], 'never'
return result + [self.site.config['RSS_FILENAME_BASE'](lang) + self.site.config['RSS_EXTENSION']], 'never'
return result, 'always'

def provide_context_and_uptodate(self, classification, lang, node=None):

0 comments on commit 58388b3

Please sign in to comment.