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
Key | Description |
---|---|
ServerURL |
URL of your kroki-Server, default: https://kroki.io |
FencePrefix |
Diagram prefix, default: kroki- |
EnableBlockDiag |
Enable BlockDiag (and the related Diagrams), default: True |
Enablebpmn |
Enable BPMN, default: True |
EnableExcalidraw |
Enable Excalidraw, default: True |
EnableMermaid |
Enable Mermaid, default: True |
EnableDiagramsnet |
Enable diagrams.net (draw.io), default: False |
HttpMethod |
Http method to use (GET or POST ), default: GET (Note: On POST the retrieved images are stored next to the including page in the build directory) |
FileTypes |
File types you want to use, default: [svg] , (Note: not all file formats work 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"];
}
```
You can render diagram from file with @from_file:
directive:
```kroki-bpmn
@from_file:path/to/diagram.bpmn
```
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
Hashes for mkdocs-kroki-plugin-0.7.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 89819b2702b67e8ea7386bd370e73f8482d27215a9b134af92cce74a66fe48e0 |
|
MD5 | 18b8d74e8cc2e8bfc90295a484b0d928 |
|
BLAKE2b-256 | 2a9520157b6b185cf9f9d1c8111ef74bc9f714a24e566b05845f0744fd66e650 |
Hashes for mkdocs_kroki_plugin-0.7.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 19ba1cc4e7c66c3fe33b6d562b2852197d903f3bed9737152c3987b909ee138b |
|
MD5 | dd8cd79fca15d2dd078db6f10904676c |
|
BLAKE2b-256 | b00599634c264e32a840f86479da649abefecae8a25e2d8fede0acd311ae12e6 |