Building documentation locally¶
To build the documentation, you can use the main Makefile target
# in the project root directory make doc-html
The documentation is built by Sphinx, and uses the Read The Docs theme.
Dependencies to build the documentation should be obtained with
poetry. For instruction on how to
obtain python and poetry, see
Once this is done,
you can install the needed dependencies:
# in the "docs" directory poetry install
The HTML pages generated by
make doc-html will be available in docs/_build.
Some ad-hoc reference kinds are supported.
:package-src:`text<name>`points to the gitlab source tree viewer where the .opam for the package is located
:package:`text<name>`now points either to the odoc page, or if it doesn’t exist, to the gitlab source tree viewer
:package-name:`text<name>`just displays the package name (no link), checking that the package exists
:src:`text</path/to/file/or/dir>`points to the gitlab source tree viewer
:opam:`text<package>`points to the package page on
opam.ocaml.org, version number is supported (
Odoc is used for OCaml API generation, that you can install with:
opam install odoc
Tezos generates the API documentation for all libraries in HTML format. The
generated HTML pages in
_build/<context>/_doc. It creates one sub-directory
per public library and generates an
index.html file in each sub-directory.
The documentation is not installed on the system by Tezos. It is meant to be read locally while developing and then published on the www when releasing packages.