Skip to content

Commit f1c8cb1

Browse files
authored
Merge pull request #840 from krinsman/master
Make NBViewer configurable class with 'nbviewer_config.py' file
2 parents d06a9b6 + 6f52c5d commit f1c8cb1

File tree

10 files changed

+215
-246
lines changed

10 files changed

+215
-246
lines changed

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ node_js:
44
- 6
55

66
python:
7-
- 2.7
87
- 3.5
98
- 3.6
109

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,12 @@ If you'd like to write a new format, open a ticket, or speak up on [gitter][]!
185185
We have some work yet to do to support your next big thing in notebook
186186
publishing, and we'd love to here from you.
187187

188+
#### Config file
189+
190+
Newer versions of NBViewer will be configurable using a config file, `nbviewer_config.py`. In the directory where you run the command `python -m nbviewer` to start NBViewer, also add a file `nbviewer_config.py` which uses [the standard configuration syntax for Jupyter projects](https://traitlets.readthedocs.io/en/stable/config.html).
191+
192+
For example, to configure the value of a configurable `foo`, add the line `c.NBViewer.foo = 'bar'` to the `nbviewer_config.py` file located where you run `python -m nbviewer`. Again, currently very few features of NBViewer are configurable this way, but we hope to steadily increase the number of configurable characteristics of NBViewer in future releases.
193+
188194
## Securing the Notebook Viewer
189195

190196
You can run the viewer as a [JupyterHub 0.7+ service](https://jupyterhub.readthedocs.io/en/latest/reference/services.html). Running the viewer as a service prevents users who have not authenticated with the Hub from acccessing the nbviewer instance. This setup can be useful for protecting access to local notebooks rendered with the `--localfiles` option.

0 commit comments

Comments
 (0)