To add a new page to the docs site:
- Create a
.mdfile in theregula/docs/srcdirectory - Add the filename to
regula/mkdocs.yml
To link to other pages on the docs site, use relative links and specify the .md filename, not .html
Examples:
getting-started.md../getting-started.md../getting-started.md#installation
For more information about working with our static site generator, see MkDocs. For more info about the theme (including how to use features like admonitions, code highlighting, emoji, etc.), see Material for MkDocs.
Here's how to preview the docs site.
- Create a virtual environment:
python3 -m venv venv
- Activate the virtual environment:
. venv/bin/activate
- Install MkDocs and dependencies (from the root of the
regularepo):
pip install -r docs/requirements.txt
Use this for local development. This step kicks off a development server with live reload. Whenever you make changes to a file, MkDocs will automatically regenerate the file and refresh the site.
- If you're not already in the virtual environment, activate it:
. venv/bin/activate
- From the root of the
regularepo, start the server:
mkdocs serve
You can view the site at http://127.0.0.1:8000
If you only need the generated site files and not a live preview (e.g., if you're manually deploying the site), run this command:
mkdocs build
MkDocs generates the site in the site directory.
- If you're not already in the virtual environment, activate it:
. venv/bin/activate
- From the root of the
regularepo, run therules_tablescript with the--providerargument. Example:
python docs/scripts/rules_tables.py --provider k8s
Providers: aws, azurerm, google, cfn, arm, k8s, all (default)