Documentation Workflow¶
This project uses MkDocs with the Material theme plus the mkdocs-encryptcontent-plugin to build the public "gh-doc" site. All editable markdown lives under the docs/ folder and the navigation menu is defined in mkdocs.yml.
1. Update the content¶
- In the
Sanevec-docsrepo, make all the modifications under themainbranch or create a feature branch off fom it. - Edit existing markdown files in
docs/or add a new file (keep names short and URL friendly). - When adding a new page, list it inside the
nav:section ofmkdocs.ymlso it shows up in the sidebar. - Avoid committing the generated
site/folder; the build step recreates it automatically.
2. Preview locally (optional but recommended)¶
- Create or activate a Python environment.
- Install the required packages:
OR
pip install -r requirements.txtpip install mkdocs mkdocs-material mkdocs-encryptcontent-plugin - Serve the site locally and browse to http://127.0.0.1:8000/:
MkDocs rebuilds on every save, so you can iterate quickly.
mkdocs serve
3. Publish via GitHub Actions¶
- Push or merge your changes into the
documentationbranch. - The
Build and Deploy MkDocsworkflow (.github/workflows/gh-pages.yml) installs MkDocs and runsmkdocs gh-deploy --force --no-history. - On success the static site is published to the
gh-pagesbranch, updating the GitHub Pages site automatically. - You can monitor progress and logs in the Actions tab; the run kicks off on every push to
documentationor via a manual dispatch.
4. Quick checklist¶
- Markdown updated under
docs/ - Navigation updated in
mkdocs.yml - Local preview (optional) looks correct
- Changes committed and pushed to
main - GitHub Action completes successfully and the public site reflects the update