Skip to content

Commit 0f3c77f

Browse files
authored
Merge pull request #2769 from jtpio/patch-1
Update the docs for building the documentation
2 parents 7258f03 + 1672449 commit 0f3c77f

File tree

1 file changed

+21
-16
lines changed

1 file changed

+21
-16
lines changed

docs/source/dev_docs.md

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,36 @@ Building the Documentation
44
To build the documentation you'll need [Sphinx](http://www.sphinx-doc.org/), [pandoc](http://pandoc.org/)
55
and a few other packages.
66

7-
To install (and activate) a [conda environment](http://conda.pydata.org/docs/using/envs.html#use-environment-from-file) named `notebook_docs`
8-
containing all the necessary packages (except pandoc), use:
7+
First create a [conda environment](http://conda.pydata.org/docs/using/envs.html#use-environment-from-file) named `ipywidgets_docs` to install all the necessary packages:
98

9+
```bash
10+
# create the environment
11+
conda env create -n ipywidgets_docs -c conda-forge python pip
12+
13+
# activate the environment
14+
conda activate ipywidgets_docs # Linux and OS X
15+
activate ipywidgets_docs # Windows
1016
```
11-
conda env create -f docs/environment.yml
12-
source activate ipywidget_docs # Linux and OS X
13-
activate ipywidget_docs # Windows
14-
```
1517

16-
If you want to install the necessary packages with `pip` instead, use
17-
(omitting `--user` if working in a virtual environment):
18+
Alternatively, it is also possible to create a virtual environment and activate it with the following commands:
19+
20+
```bash
21+
# create the environment
22+
python -m venv .
1823

24+
# activate the environment
25+
source bin/activate
1926
```
20-
pip install -r docs/requirements.txt --user
27+
28+
In the environment, install the packages:
29+
30+
```bash
31+
python -m pip install -r docs/requirements.txt
2132
```
2233

2334
Once you have installed the required packages, you can build the docs with:
2435

25-
```
36+
```bash
2637
cd docs
2738
make clean
2839
make html
@@ -31,12 +42,6 @@ make html
3142
After that, the generated HTML files will be available at
3243
`build/html/index.html`. You may view the docs in your browser.
3344

34-
You can automatically check if all hyperlinks are still valid::
35-
36-
```
37-
make linkcheck
38-
```
39-
4045
Windows users can find `make.bat` in the `docs` folder.
4146

4247
You should also have a look at the [Project Jupyter Documentation Guide](https://jupyter.readthedocs.io/en/latest/contrib_docs/index.html).

0 commit comments

Comments
 (0)