Skip to content
Permalink
Browse files
Really fix #2066
* add POSTS_SECTION_COLORS to default settings
* add all postS_section* settings to global context
* fix typo in existing global setting

Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Sep 15, 2015
1 parent 18761c9 commit 9d3ea0ab456ee53d5488e9ab8f72f53c43937650
Showing with 8 additions and 1 deletion.
  1. +8 −1 nikola/nikola.py
@@ -441,6 +441,7 @@ def __init__(self, **config):
'POSTS': (("posts/*.txt", "posts", "post.tmpl"),),
'POSTS_SECTIONS': True,
'POSTS_SECTION_ARE_INDEXES': True,
'POSTS_SECTION_COLORS': {},
'POSTS_SECTION_DESCRIPTIONS': "",
'POSTS_SECTION_FROM_META': False,
'POSTS_SECTION_NAME': "",
@@ -945,7 +946,13 @@ def _set_global_context(self):
self._GLOBAL_CONTEXT['hidden_categories'] = self.config.get('HIDDEN_CATEGORIES')
self._GLOBAL_CONTEXT['hidden_authors'] = self.config.get('HIDDEN_AUTHORS')
self._GLOBAL_CONTEXT['url_replacer'] = self.url_replacer
self._GLOBAL_CONTEXT['post_section_colors'] = self.config.get('POST_SECTION_COLORS')
self._GLOBAL_CONTEXT['posts_sections'] = self.config.get('POSTS_SECTIONS')
self._GLOBAL_CONTEXT['posts_section_are_indexes'] = self.config.get('POSTS_SECTION_ARE_INDEXES')
self._GLOBAL_CONTEXT['posts_section_colors'] = self.config.get('POSTS_SECTION_COLORS')
self._GLOBAL_CONTEXT['posts_section_descriptions'] = self.config.get('POSTS_SECTION_DESCRIPTIONS')
self._GLOBAL_CONTEXT['posts_section_from_meta'] = self.config.get('POSTS_SECTION_FROM_META')
self._GLOBAL_CONTEXT['posts_section_name'] = self.config.get('POSTS_SECTION_NAME')
self._GLOBAL_CONTEXT['posts_section_title'] = self.config.get('POSTS_SECTION_TITLE')

# IPython theme configuration. If a website has ipynb enabled in post_pages
# we should enable the IPython CSS (leaving that up to the theme itself).

0 comments on commit 9d3ea0a

Please sign in to comment.