mike

2.1.4 · active · verified Sat Apr 11

mike is a Python utility designed to simplify the deployment of multiple versions of your MkDocs-powered documentation to a Git branch, commonly `gh-pages`. This approach allows you to archive older documentation versions, ensuring they remain accessible even if future MkDocs updates introduce breaking changes. The current version is 2.1.4, with a release cadence that includes frequent bug fixes and less frequent but consistent minor/major feature releases.

Warnings

Install

Imports

Quickstart

This quickstart demonstrates the core `mike` commands for setting up, deploying, and serving versioned MkDocs documentation. It includes creating a new MkDocs project, deploying initial versions with aliases, setting a default version, and viewing the documentation locally.

mkdocs new my-docs
cd my-docs
# Add some content or configure mkdocs.yml
echo 'theme: readthedocs' >> mkdocs.yml

# Deploy the initial version and an alias
mike deploy 1.0 latest

# Set the default version to 'latest'
mike set-default latest

# Serve the documentation locally (includes version selector)
mike serve

# To add another version later:
mike deploy 2.0

# To update an existing alias:
mike alias 2.0 stable --update-aliases

# To list deployed versions:
mike list

view raw JSON →