1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
|
# Contribute documentation improvements
Thank you for improving our documentation! Every addition made is read
thousands of times and has a tremendous impact.
These are the sources for the [ITK docs](https://docs.itk.org)
[sphinx](https://www.sphinx-doc.org/) website.
The contribution process generally follows our [contributing
guidelines](./contributing/index.md).
Once merged into `master`, the documentation will be available in the `latest`
version of the ReadTheDocs documentation as https://docs.itk.org/. Note that
`latest` is not the default version (`release` is). To change versions, use the links in the lower
left of the page.
To preview documentation changes, three options are available.
## Option 0: Edit on GitHub, use the pull request preview
If files are edited with GitHub's web user interface, the pull request will
build a preview of changes with a pull request check called `docs/readthedocs.org:itk`.
Click on the *Details* link to view the documentation build preview.
## Option 1: Build and serve locally
To compile the document locally create a python virtual environment and install the required packages.
For example in Linux / macOS:
```bash
cd ITK/Documentation/docs
python -m venv env
source env/bin/activate
pip install -r requirements.txt
```
Use `make html` in this directory to build the documentation.
Open `_build/html/index.html` in your browser to inspect the result.
## Option 2: Autobuild and serve locally
To automatically rebuild the website with any input markdown changes and serve
the result, use [sphinx-autobuild]
```bash
cd ITK/Documentation/docs
pip install -r requirements.txt
pip install sphinx-autobuild
```
```
sphinx-autobuild -a . _build/html
```
This will start a server at [http://127.0.0.1:8000](http://127.0.0.1:8000)
and rebuild whenever the documentation changes.
[sphinx-autobuild]: https://github.com/executablebooks/sphinx-autobuild
|