We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1870328 commit c3d5a4eCopy full SHA for c3d5a4e
nikola/nikola.py
@@ -796,6 +796,16 @@ def __init__(self, **config):
796
self._GLOBAL_CONTEXT['hidden_categories'] = self.config.get('HIDDEN_CATEGORIES')
797
self._GLOBAL_CONTEXT['url_replacer'] = self.url_replacer
798
799
+ # IPython theme configuration. If a website can potentially have ipynb
800
+ # posts (as determined by checking POSTS/PAGES against ipynb
801
+ # extensions), we should enable the IPython CSS (leaving that up to the
802
+ # theme itself).
803
+
804
+ self._GLOBAL_CONTEXT['needs_ipython_css'] = False
805
+ for i in self.config['post_pages']:
806
+ if os.path.splitext(i[0])[0] in self.config['COMPILERS'].get('ipynb', []):
807
+ self._GLOBAL_CONTEXT['needs_ipython_css'] = True
808
809
self._GLOBAL_CONTEXT.update(self.config.get('GLOBAL_CONTEXT', {}))
810
811
# Load compiler plugins
0 commit comments