Skip to content

Commit

Permalink
Improve build instructions (#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
alanocallaghan authored Apr 15, 2024
1 parent 61a7dc4 commit e2f988e
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@

_build/**
venv
docs/_build/
37 changes: 30 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,40 @@ This contains the source for QuPath's documentation, hosted at https://qupath.re

## Building locally

To build this locally, you should first install (possibly in a [venv](https://docs.python.org/3/library/venv.html)):
- `sphinx-build`
- `sphinx_rtd_theme`
- `myst_parser`
- `readthedocs-sphinx-search`
To build this locally, create a virtual environment, eg:

As well as the command line tool `Make` (e.g., [GNU Make](https://www.gnu.org/software/make/)).
```bash
python -m venv ./venv
. ./venv/bin/activate
```

or using conda/mamba:

```bash
conda env create -n qupath-docs python=3.12
conda activate qupath-docs
```

Then install the requirements for this repo:

```bash
pip install -r requirements.txt
```

You'll also need the command line tool `Make` (e.g., [GNU Make](https://www.gnu.org/software/make/)).

Then, you can run `make` to see available build options.
`make html` will make the HTML version of the website, which is probably the
most useful option.
most useful option. The built HTML files will be in `_build/html`, and can
be opened in a web browser without running a local HTTP server.

Alternatively, you can install `sphinx-autobuild` and `watchfiles`
into your virtual environment to run a HTTP server and have the HTML files
automatically rebuilt when any changes are made:

```bash
sphinx-autobuild . _build/html
```

## License

Expand Down

0 comments on commit e2f988e

Please sign in to comment.