Writing docs for TTP Templates¶
TTP Templates have <doc> tag that can be used to embed documentation strings into the templates.
Templates <doc> tags content is just a text, but TTP Templates documentation assumes markdown
syntaxes used to populate docs.
TTP Templates use mkdocs with material theme to produce documentation.
TTP Templates Collection comes with an Invoke docs task. This task iterates over all
folders within ttp_templates repository, loads templates and extracts <doc> tags content
to form .md files, saves .md files in docs/ttp_templates folder and construct navigation tree
within mkdocs.yml file.
Generating Documentation¶
First, need to write docs within the templates.
Next, generate .md doc files out of TTP templates:
poetry run inv docs
Finally, use mkdocs to serve, build, or deploy docs using these commands:
poetry run mkdocs serve– serve docs locally to view content via browserpoetry run mkdocs build– build docs into thesite/directorypoetry run mkdocs gh-deploy– deploy docs to GitHub Pages