Skip to content

mkdocs-material/example-versioning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

12de522 · Sep 18, 2024

History

15 Commits
Sep 18, 2024
May 30, 2021
Oct 25, 2020
Apr 22, 2021
Sep 18, 2024

Repository files navigation

This is an example of the new versioning feature of Material for MkDocs.

How to set up versioning

First, install Material for MkDocs and mike:

pip install mkdocs-material
pip install mike

Next, set up your documentation project:

mkdocs new .

Update mkdocs.yml:

site_name: My Docs
theme:
  name: material
extra:
  version:
    provider: mike

Make a change to docs/index.md, and publish the first version:

mike deploy --push --update-aliases 0.1 latest

Set the default version to latest

mike set-default --push latest

Now, make another change and publish a new version:

mike deploy --push --update-aliases 0.2 latest