Skip to content
Permalink
Browse files

Need to move part of global context setup to after plugin loading.

  • Loading branch information
felixfontein committed Mar 12, 2017
1 parent 41659ae commit bb0639fbe72d7390f890b39121c3309b6b4b7fc0
Showing with 6 additions and 5 deletions.
  1. +6 −5 nikola/nikola.py
@@ -1117,6 +1117,12 @@ def init_plugins(self, commands_only=False, load_all=False):
self.plugin_manager._candidates = self._filter_duplicate_plugins(to_add)
self.plugin_manager.loadPlugins()


# 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).
if 'needs_ipython_css' not in self._GLOBAL_CONTEXT:
self._GLOBAL_CONTEXT['needs_ipython_css'] = 'ipynb' in self.config['COMPILERS']

self._activate_plugins_of_category("Taxonomy")
self.taxonomy_plugins = {}
for taxonomy in [p.plugin_object for p in self.plugin_manager.getPluginsOfCategory('Taxonomy')]:
@@ -1258,11 +1264,6 @@ def _set_global_context_from_config(self):
self._GLOBAL_CONTEXT['sort_posts'] = utils.sort_posts
self._GLOBAL_CONTEXT['meta_generator_tag'] = self.config.get('META_GENERATOR_TAG')

# 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).

self._GLOBAL_CONTEXT['needs_ipython_css'] = 'ipynb' in self.config['COMPILERS']

self._GLOBAL_CONTEXT.update(self.config.get('GLOBAL_CONTEXT', {}))

def _set_global_context_from_data(self):

0 comments on commit bb0639f

Please sign in to comment.
You can’t perform that action at this time.