MkDocs plugin for Kroki-Diagrams
Project description
mkdocs-kroki-plugin
This is a MkDocs plugin to embed Kroki-Diagrams into your documentation.
Setup
Install the plugin using pip:
pip install mkdocs-kroki-plugin
Activate the plugin in mkdocs.yml
:
plugins:
...
- kroki:
Config
ServerURL
- URL of your kroki-Server, default: https://kroki.ioFencePrefix
- Diagram prefix, default:kroki-
EnableBlockDiag
- Enable BlockDiag (and the related Diagrams), default: TrueEnablebpmn
- Enable BPMN, default: TrueEnableExcalidraw
- Enable Excalidraw, default: TrueEnableMermaid
- Enable Mermaid, default: TrueEnableDiagramsnet
- Enable diagrams.net (draw.io), default: FalseHttpMethod
- Http method to use (GET
orPOST
), default:GET
(Note: you have to enableDownloadImages
if you want to usePOST
!)DownloadImages
- Download diagrams from kroki as static assets instead of just creating kroki links, default: FalseDownloadDir
- The asset directory to place downloaded images in, default: images/kroki_generatedFileTypes
- File types you want to use, default: [svg], (Note: not all file formats works with all diagram types https://kroki.io/#support)
- kroki:
FileTypes:
- png
- svg
FileTypeOverrides
- Overrides for specific diagrams to set the desired file type default: None,
- kroki:
FileTypeOverrides:
mermaid: png
Usage
Use code-fences with a tag of kroki-<Module>
to replace the code with the wanted diagram.
Diagram options can be set as well.
Example for BlockDiag:
```kroki-blockdiag no-transparency=false
blockdiag {
blockdiag -> generates -> "block-diagrams";
blockdiag -> is -> "very easy!";
blockdiag [color = "greenyellow"];
"block-diagrams" [color = "pink"];
"very easy!" [color = "orange"];
}
```
See Also
Diagram examples can be found here.
More information about installing a self-manged Kroki-Service here.
More Plugins for MkDocs can be found here
Pre-Release-Versions
Install the newest pre-release version using pip:
pip install -i https://test.pypi.org/simple/ mkdocs-kroki-plugin
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for mkdocs-kroki-plugin-0.5.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a0f18a236ace59dc416718aa59c7bc05eb048b034179f05dbee89c47622025af |
|
MD5 | 33edc2853efee022d84fb70f1e183d9f |
|
BLAKE2b-256 | ff660cd6300c184dc5079678af0dffbed4acbc5a11ec68d27eab23f82230531f |
Close
Hashes for mkdocs_kroki_plugin-0.5.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b1eaedb3c6a30afec6705aed8f0ca674f3973736f43487688c20d0e5690d24fd |
|
MD5 | c8ffbc298dade4ed775ef34fd6bca1a2 |
|
BLAKE2b-256 | dbeab809c575726ec25f17c065ce088c0e1459dbe0eaba5a0a5aa1ee8fc6f3a5 |