Testing your changes
Requirement
The repository was already correctly setup following the setup guide found in this documentation.
After setting up the environment (see installation instructions) you have two ways to test your local changes to the documentation.
1. Testing your changes locally with mkdocs
MkDocs comes with a built-in dev-server that lets you preview your documentation as you work on it. Make sure you're in the same directory as the mkdocs.yml
configuration file and you have activated the Python virtual environment, then start the server by running:
Open up http://127.0.0.1:8000/ in your browser, and you'll see the docs built from your current sources.
The MkDocs dev-server also supports auto-reloading, and will rebuild your documentation whenever anything in the configuration file, documentation directory, or theme directory changes.
Tip
The mkdocs serve
command should satisfy 99% of your testing needs. If you need to test versioning features take a look at the following paragraph.
2. Testing your changes locally with mike
mike
is the tool to use for building and versioning the documentation. To build the documentation and see the changes on your local machine, make sure you're in the same directory as the mkdocs.yml
configuration file, then activate the Python virtual environment and run the following:
Usually [version]
should match the branch you're on. Let's say you're updating the documentation for docs-develop
you'll the need to run mike deploy docs-develop
. This command will create a folder in you current path named site
, here you'll find the built documentation sources. You can serve them through a local webserver using: