mongo-c-driver Documentation Pages#
Poetry itself may be installed externally, but can also be automatically
managed using the included wrapping scripts for Bash (At
or PowerShell (at
tools/poetry.ps1). These scripts can stand in for
poetry in any command written below.
Setting Up the Environment#
To install the required tooling, use the
poetry install command, enabling
$ poetry install --with=docs
This will create a user-local Python virtualenv that contains the necessary
tools for building this documentation. The
poetry install command only needs
to be run when the
pyproject.toml file is changed.
Poetry can be used to execute the sphinx-build command:
$ poetry run sphinx-build -b dirhtml "./src/libmongoc/doc" "./_build/docs/html"
This command will generate the HTML documentation in the
Viewing the Documentation#
To quickly view the rendered HTML pages, a simple local HTTP server can be
spawned on the command line by using Python’s built-in
$ poetry run python -m http.server --directory=_build/docs/html
By default, this will serve the documentation at http://127.0.0.1:8000, which you can open in any web browser to see the rendered pages.