Mkdocs v1.0¶
The mkdocs flow installs Mkdocs in a python venvironment in the build folder and offers targets to serve or build the site.
It also offers extra targets to publish the site to:
- Netlify (link the site to your account, publish to preview and prod)
To load the flow in your build file:
Make sure that your local folder has a properly configured Mkdocs project, then:
Flow Variables¶
Before or after Loading the flow, you can set configuration variables:
| Variable | Description | Default Value | Env. Override |
|---|---|---|---|
| flow.mkdocs.presets | A list containing some mkdocs requirements presets from KISSB | FLOW_MKDOCS_PRESETS |
Python Plugin installation¶
To install mkdocs plugins or python packages, create a requirements.txt file and add packages.
When running mkdocs, the packages will be installed.
This method can be used to install for example the popular Material for Mkdocs Theme
Enable Netlify¶
To deploy your mkdocs site to netlify, enable the netlify target using the flow.enableNetlify command:
You can then use the configure,deploy and deploy.prod targets: