Skip to content

Latest commit

 

History

History
executable file
·
39 lines (33 loc) · 1.51 KB

generating_documentation.md

File metadata and controls

executable file
·
39 lines (33 loc) · 1.51 KB

Adding and editing documentation

When adding or editing a function, class or a module, please make sure the documentation stays current!

If you wish to just take a look at the documentation, skip to step 2.

0. Make sure your functions have proper docstrings

These are used for autogenerating docs.

1. Get the docs up to date

If you added a module that is not yet referenced in the docs:

  • Add a markdown document for it: docs/<package_name>/<your_new_module.md>.
  • Refer to the new module in the markdown file by adding this somewhere in the file:
::: eis_toolkit.<package_name>.<module_name>
  • You can otherwise edit the markdown files normally.
  • For reference, see the markdown sources of the docs in the docs/ folder.

If you edited something that is already referenced in the docs:

  • Unless you changed a module name (making the reference invalid) you do not need to do anything.

2. Check out the updated docs

  • To serve the docs from the container run:
mkdocs serve --dev-addr=0.0.0.0:8000
  • Check out the docs at http://0.0.0.0:8000/
  • If you are not developing inside a container, a simple mkdocs serve works.

3. Build the docs

  • To build the docs from the container run:
ENABLE_PDF_EXPORT=1 mkdocs build
  • The PDF file is built into site/pdf/ folder.
  • To fix OSError: cannot load library 'pango-1.0-0' run
apt install python3-pip libpango-1.0-0 libharfbuzz0b libpangoft2-1.0-0