Skip to content

Commit 79ffe7f

Browse files
committed
DOC: Add quickstart for using jb2.
1 parent f356fa3 commit 79ffe7f

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

site/contributing.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,41 @@ Images and real-life data make text more engaging and powerful, but be sure what
1212
you use is appropriately licensed and available. Here again, even a rough idea
1313
for artwork can be polished by others.
1414

15+
## Building the website
16+
17+
```{note}
18+
The NumPy tutorials are powered by [`jupyter-book`][jb-docs] and the
19+
[`MyST` document engine][mystmd].
20+
See the linked documentation for further details.
21+
```
22+
23+
[jb-docs]: https://jupyterbook.org/stable/
24+
[mystmd]:
25+
26+
### Quickstart
27+
28+
Set up a development environment with the dependencies listed in
29+
`requirements.txt` and `site/requirements.txt`.
30+
For example, using the built-in [`venv`][venv] module:
31+
32+
```bash
33+
python -m venv np-tutorials
34+
source np-tutorials/bin/activate
35+
python -m pip install -r requirements.txt -r site/requirements.txt
36+
```
37+
38+
[venv]: https://docs.python.org/3/library/venv.html
39+
40+
The site can then be built with:
41+
42+
```bash
43+
jupyter-book start --execute
44+
```
45+
46+
This will execute all the notebooks and start a web server to view the rendered
47+
content locally.
48+
View the rendered site by opening the ``localhost:3000`` in your preferred browser.
49+
1550
## Adding your own tutorials
1651

1752
If you have your own tutorial in the form of a Jupyter notebook (an `.ipynb`

0 commit comments

Comments
 (0)