Skip to content

Commit d6e2ffb

Browse files
committed
Add instructions for building the docs locally
1 parent 2811484 commit d6e2ffb

File tree

1 file changed

+29
-4
lines changed

1 file changed

+29
-4
lines changed

docs/README.md

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,41 @@
1-
# Adding a new ReadTheDocs page for a project in this repository
1+
This directory houses the online docs for core SciJava components. Each subfolder is its own ReadTheDocs site.
2+
3+
## Building the docs
4+
5+
If this is your first time building the docs on this machine, create the needed environment with:
6+
7+
```shell
8+
mamba env create -f environment.yml
9+
```
10+
11+
Subsequently, every time you want to build, run the following commands:
12+
13+
```
14+
mamba activate scijava-docs
15+
make clean html && python -m http.server
16+
```
17+
18+
If all goes well, you'll see output ending like:
19+
```
20+
The HTML pages are in _build/scijava-ops/html.
21+
Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ...
22+
```
23+
24+
To view the built site, open the HTTP link in your browser of choice, then navigate to the stated subdirectory.
25+
26+
## Adding a new ReadTheDocs page for a project in this repository
227

328
We use [`sphinx-multiproject`](https://sphinx-multiproject.readthedocs.io/en/latest/index.html) to build multiple RTD sites from within a single repository. To add a new site within this repository, take the following steps:
429

5-
## Create a new subfolder for the site's documents
30+
### Create a new subfolder for the site's documents
631

732
See the existing `ops` folder for a template.
833

9-
## Add relevant sections to this folder's `conf.py`
34+
### Add relevant sections to this folder's `conf.py`
1035

1136
Specifically, you'll want to add an entry to the `multiproject_projects` dictionary. Again, you can copy and edit the `ops` entry.
1237

13-
## Create a new project on `ReadTheDocs`
38+
### Create a new project on `ReadTheDocs`
1439

1540
You'll want to take the following steps:
1641
1. Choose to import a project manually

0 commit comments

Comments
 (0)