A handy navigation pane for Jupyter Notebook. Jupyter-navbar searches for headers written in markdown cells, and displays links to them in the sidebar in a hierarchical fashion. The sidebar is resizable and collapsible.
- Clone or download/extract jupyter-navbar
- Run
python setup.py
from within the directory
Note: if you have any trouble with setup.py
, you may proceed to manual installation.
-
Either clone or download/extract jupyter-navbar
-
Locate the
.jupyter
directory, which should be inside your home directory:- In Linux:
~/.jupyter
- In Windows:
%HOMEPATH%\.jupyter
- In Linux:
-
Copy
navbar.css
andnavbar.js
to.jupyter/custom/jupyter-navbar/
(create directories as needed) -
Copy and paste the following code into
.jupyter/custom/custom.js
(create file if it doesn't exist):$.getScript("/custom/jupyter-navbar/navbar.js");
-
Copy and paste the following code at the very top of
.jupyter/custom/custom.css
(create file if it doesn't exist):@import url("jupyter-navbar/navbar.css");
The code in custom.css
and custom.js
gets automatically executed when a notebook is loaded. In turn, the navbar code gets called.
-
Locate the
.jupyter
directory, which should be inside your home directory:- In Linux:
~/.jupyter
- In Windows:
%HOMEPATH%\.jupyter
- In Linux:
-
Locate and remove the following line from
.jupyter/custom/custom.js
:$.getScript("/custom/jupyter-navbar/navbar.js");
-
Locate and remove the following line from
.jupyter/custom/custom.css
:@import url("jupyter-navbar/navbar.css");
-
Optional: delete the directory
jupyter-navbar
from.jupyter/custom/
The third-party package jupyter-themes changes the design of Jupyter notebooks. It does so by overwriting the contents of custom.css
. When installing jupyter-navbar, you should add the @import
code to the top of the file. When changing a theme, you will need to add it again, since the CSS file gets replaced. This can be done either manually, or by running setup.py
again.