This file defines the process for building, validating, and publishing project documentation.
The documentation stack is based on Material for MkDocs. Two MkDocs configuration files are maintained:
- mkdocs.yml: primary project configuration.
- mkdocs-github.yml: CI-oriented configuration used by GitHub Actions.
All commands below are intended to be executed from the repository root.
Install documentation dependencies in the project virtual environment:
python -m venv .venv
source .venv/bin/activate
pip install -r script/docs/mkdocs-requirements.txt
# On Windows pdf converter is not available, use
pip install -r script/docs/mkdocs-requirements-github.txtFetch Git LFS-managed documentation assets before previewing or building the site:
git lfs install
git lfs pull --include="docs/**"If Git LFS assets are not fetched, MkDocs now aborts the build instead of
copying pointer files into site/.
The repository uses markdown linting to enforce formatting consistency.
npx markdownlint-cli docs/**/*.mdAny lint findings should be resolved prior to committing documentation changes.
Uneven table formatting can cause quality gate failures. The table formatter can be run as follows:
python script/docs/format_tables.py#On Linux
mkdocs serve -f mkdocs.yml
# On Windows
mkdocs serve -f mkdocs-github.ymlmkdocs build -f mkdocs-github.ymlFor full configuration validation (including optional PDF plugin wiring), run:
# On Linux
export MKDOCS_ENABLE_PDF_EXPORT=0
mkdocs build -f mkdocs.yml
# On Windows
set MKDOCS_ENABLE_PDF_EXPORT=0
mkdocs build -f mkdocs-github.ymlMkDocs can produce HTML and, where enabled, PDF output. The PDF output generation is supported only on Linux.
PDF generation is controlled by the MKDOCS_ENABLE_PDF_EXPORT environment
variable:
export MKDOCS_ENABLE_PDF_EXPORT=0
export MKDOCS_ENABLE_PDF_EXPORT=1To publish documentation content to the webpage-docs branch:
export MKDOCS_ENABLE_PDF_EXPORT=1
script\docs.sh [version]
git push webpage-docsThe published site is served via GitHub Pages at https://into-cps-association.github.io/DTaaS/.