Building documentation

Important

Ensure nox is installed. If you executed the first steps in some way, you should be all set.

Prerequisites

On some systems (macOS, WSL, and certain Linux distributions), you must install the enchant library to build the documentation.

sudo apt-get install -y enchant
brew install -y enchant

Important

On Apple Silicon, you might need to ensure your environment points to the correct library location:

export PYENCHANT_LIBRARY_PATH=/opt/homebrew/lib/libenchant-2.2.dylib

Build once

To build your documentation once:

nox -e docs

The rendered documentation will be located in docs/_build/html.

Live preview

For continuous development, you can start a live preview that automatically reloads when changes are made:

nox -e docs-dev

This command builds the documentation, starts an HTTP server, opens your default browser, and watches for changes.

Note

If building on a remote system, override the default localhost host with:

nox -e docs-dev -- --host=1.2.3.4