Skip to content

Commit

Permalink
Add option to select theme
Browse files Browse the repository at this point in the history
  • Loading branch information
SylvainCorlay committed May 25, 2019
1 parent 8f640c4 commit 1d7b66e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion nbconvert/preprocessors/csshtmlheader.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ class CSSHTMLHeaderPreprocessor(Preprocessor):
help='Name of the pygments style to use'
).tag(config=True)

theme = Unicode('light',
help='JupyterLab CSS theme'
).tag(config=True)

def __init__(self, *pargs, **kwargs):
Preprocessor.__init__(self, *pargs, **kwargs)
self._default_css_hash = None
Expand Down Expand Up @@ -76,7 +80,7 @@ def _generate_header(self, resources):
# Construct path to theme CSS
theme_filename = os.path.join(
os.path.dirname(nbconvert.resources.__file__),
'theme-light.css',
'theme-%s.css' % self.theme,
)

# Load style theme file.
Expand Down

0 comments on commit 1d7b66e

Please sign in to comment.