Skip to content

Commit 75e2554

Browse files
authored
Merge pull request #13 from kennethrioja/readme
[README.md] Install jupyter-book in a venv
2 parents d6a34c2 + 110924d commit 75e2554

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

README.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,31 @@ 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
25+
pip install -r requirements.txt
1726
pip install -U jupyter-book
1827
jupyter-book build TeSS_docs/
1928
```
2029

30+
And when you have finished, to quit virtual environment:
31+
32+
```shell
33+
deactivate
34+
```
35+
2136
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.
2237

2338
The build command in the GitHub Action includes:
39+
2440
```shell
2541
jupyter-book build --builder dirhtml TeSS_docs/
2642
```

0 commit comments

Comments
 (0)