Skip to content

Commit 58469f6

Browse files
committed
docs(readme): install jupyter-book in a venv
1 parent d6a34c2 commit 58469f6

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

README.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,30 @@ Built using [Jupyter Book 1](https://jupyterbook.org/). For additional guidance,
1212

1313
## Running locally and on GitHub Pages
1414

15-
To run locally, install Jupyter Book then build:
15+
Requirements:
16+
17+
- Python
18+
19+
To run locally, install Jupyter Book in a virtual environment then build:
20+
1621
```shell
22+
python -m venv venv
23+
source venv/bin/activate
24+
pip install --upgrade pip
1725
pip install -U jupyter-book
1826
jupyter-book build TeSS_docs/
1927
```
2028

29+
And when you have finished, to quit virtual environment:
30+
31+
```shell
32+
deactivate
33+
```
34+
2135
We are hosting on GitHub Pages (using [Actions](https://github.com/ElixirTeSS/docs/blob/main/.github/workflows/main.yml)), using a different build command that means the `.html` part of the paths are not included. For example, we have page URLs like https://elixirtess.github.io/docs/accounts/user/ instead of ~~https://elixirtess.github.io/docs/accounts/user.html~~ -- this is achieved by rendering each page as a directory with its own `index.html` page. When running locally, this doesn't work so well, so use the default build command shown above.
2236

2337
The build command in the GitHub Action includes:
38+
2439
```shell
2540
jupyter-book build --builder dirhtml TeSS_docs/
2641
```

0 commit comments

Comments
 (0)