Skip to content
Permalink
Browse files
FEED_EXTENSION -> ATOM_EXTENSION; adding extensions to global context…
… and documenting them.
  • Loading branch information
felixfontein committed Apr 15, 2018
1 parent 0f3f219 commit d0bb8b0bd02cf00b9bc94eb96ef404c6455873d8
Showing with 8 additions and 3 deletions.
  1. +3 −0 docs/template-variables.rst
  2. +1 −1 nikola/conf.py.in
  3. +3 −1 nikola/nikola.py
  4. +1 −1 nikola/plugins/misc/taxonomies_classifier.py
@@ -40,6 +40,7 @@ Name Type Descript
``_link`` function ``Nikola.link`` function
``abs_link`` function ``Nikola.abs_link`` function
``author_pages_generated`` bool False
``atom_extension`` str ``ATOM_EXTENSION`` setting
``blog_author`` TranslatableSetting<str> ``BLOG_AUTHOR`` setting
``blog_email`` str ``BLOG_EMAIL`` setting
``blog_description`` TranslatableSetting<str> ``BLOG_DESCRIPTION`` setting
@@ -87,6 +88,8 @@ Name Type Descript
``posts_section_name`` TranslatableSetting<str> ``POSTS_SECTION_NAME`` setting
``posts_section_title`` TranslatableSetting<str> ``POSTS_SECTION_TITLE`` setting
``rel_link`` function ``Nikola.rel_link`` function
``rss_extension`` str ``RSS_EXTENSION`` setting
``rss_filename_base`` TranslatableSetting<str> ``RSS_FILENAME_BASE`` setting
``rss_link`` str ``RSS_LINK`` setting
``rss_path`` TranslatableSetting<str> ``RSS_PATH`` setting
``search_form`` TranslatableSetting<str> ``SEARCH_FORM`` setting
@@ -1067,7 +1067,7 @@ MARKDOWN_EXTENSIONS = ['markdown.extensions.fenced_code', 'markdown.extensions.c
# GENERATE_ATOM = False

# Extension for Atom feed files
# FEED_EXTENSION = ".atom"
# ATOM_EXTENSION = ".atom"

# Only include teasers in Atom and RSS feeds. Disabling include the full
# content. Defaults to True.
@@ -538,7 +538,7 @@ def __init__(self, **config):
'REDIRECTIONS': [],
'ROBOTS_EXCLUSIONS': [],
'GENERATE_ATOM': False,
'FEED_EXTENSION': '.atom',
'ATOM_EXTENSION': '.atom',
'FEED_TEASERS': True,
'FEED_PLAIN': False,
'FEED_PREVIEWIMAGE': True,
@@ -1121,6 +1121,8 @@ def _set_global_context_from_config(self):
'CONTENT_FOOTER')
self._GLOBAL_CONTEXT['generate_atom'] = self.config.get('GENERATE_ATOM')
self._GLOBAL_CONTEXT['generate_rss'] = self.config.get('GENERATE_RSS')
self._GLOBAL_CONTEXT['atom_extension'] = self.config.get('ATOM_EXTENSION')
self._GLOBAL_CONTEXT['rss_extension'] = self.config.get('RSS_EXTENSION')
self._GLOBAL_CONTEXT['rss_path'] = self.config.get('RSS_PATH')
self._GLOBAL_CONTEXT['rss_filename_base'] = self.config.get('RSS_FILENAME_BASE')
self._GLOBAL_CONTEXT['rss_link'] = self.config.get('RSS_LINK')
@@ -233,7 +233,7 @@ def _postprocess_path(self, path, lang, append_index='auto', dest_type='page', p
# Forcing extension for Atom feeds and RSS feeds
force_extension = None
if dest_type == 'feed':
force_extension = self.site.config['FEED_EXTENSION']
force_extension = self.site.config['ATOM_EXTENSION']
elif dest_type == 'rss':
force_extension = '.xml'
# Determine how to extend path

0 comments on commit d0bb8b0

Please sign in to comment.