Skip to content

Commit 4011cc7

Browse files
docs: explain more on how to add snippets
1 parent cb802b1 commit 4011cc7

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

README.md

+20
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,26 @@ jupyter lab build
2424

2525
Add snippets in `[jupyter_data_dir]/snippets` (see: https://jupyter.readthedocs.io/en/latest/projects/jupyter-directories.html#id2)
2626

27+
To find the Jupyter data directory, run:
28+
```bash
29+
$ jupyter --path
30+
```
31+
This will for example show the following list on macOS:
32+
```
33+
config:
34+
/Users/<username>/.jupyter
35+
...
36+
data:
37+
/Users/<username>/Library/Jupyter
38+
/Users/<username>/miniconda3/envs/<envname>/share/jupyter
39+
...
40+
runtime:
41+
...
42+
```
43+
44+
Use the first directory listed under `data:` to add files to, these become snippets in the menu. Each file contains one
45+
snippet. Directories can be used to organize the snippet files and will become submenu's in the menu.
46+
2747
In JupyterLab, use the "Snippets" menu to select the snippet:
2848

2949
<img width="570" alt="Schermafbeelding 2020-03-30 om 17 25 31" src="https://user-images.githubusercontent.com/46192475/77930697-8257fd00-72ab-11ea-8a77-36f45d6442d9.png">

0 commit comments

Comments
 (0)