We use Material for MkDocs for our documentation. See https://squidfunk.github.io/mkdocs-material/getting-started/.
- Python3
- pip
pip3 install mkdocs
pip3 install mkdocs-material
pip3 install mkdocs-git-revision-date-localized-plugin
pip3 install mkdocs-redirects
pip3 install mikemkdocs buildmkdocs serveTo preview the versioned site (with the version selector), use mike instead:
mike serveThe published documentation is versioned with
mike. Each version lives in its own
subdirectory on the gh-pages branch:
dev— the latestdevelopbranch.X.Y— a published stable release (e.g.1.5), with thelatestalias pointing at the most recent one.latestis also the default version users land on.
The documentation is built and deployed automatically by GitHub Actions:
pushes to develop publish the dev version, and pushing a vX.Y.Z tag
publishes the matching X.Y version and updates latest.
Warning: Do not run
mkdocs gh-deploy. It overwrites the root of thegh-pagesbranch and would destroy the versioned structure managed by mike.
If you need to deploy manually, use mike. For example, to publish a stable
release and point latest at it:
mike deploy --push --update-aliases X.Y latest
mike set-default --push latestOr to (re)publish the development docs:
mike deploy --push dev