Skip to content

mkdocs-material/example-versioning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

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