Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 9d3ea0a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion nikola/nikola.py
Expand Up @@ -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': "",
Expand Down Expand Up @@ -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).
Expand Down

0 comments on commit 9d3ea0a

Please sign in to comment.