Skip to content

Build the documentation

The documentation site is built from this README.md (cut into pages), and from the docstrings of the code (the Code reference), with Zensical, which reads the MkDocs configuration. Nothing of it is written twice: change the text here, or a docstring in the code, and the site follows.

  • To change a page of the guide, edit this file. Keep a blank line before a list and four spaces to nest one.
  • The pages of the code reference and the home page are written by docs/build_pages.py (the MODULES list holds one line per module). Write docstrings in the :param x: / :return: style.
  • The menu is made by docs/build_pages.py from docs/mkdocs.template.yml.

To see the site while you write:

pip install -r requirements-docs.txt
cd docs
python build_pages.py
zensical serve

It opens on http://localhost:8000. The site is built and published to GitHub Pages by the github-pages workflow at each push on master that touches the documentation, the README or the code: there is nothing to commit but the sources.