# 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`:
```yaml
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` <br>(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>) |
```yaml
- kroki:
FileTypes:
- png
- svg
```
* `FileTypeOverrides` - Overrides for specific diagrams to set the desired file type default: None,
```yaml
- kroki:
FileTypeOverrides:
mermaid: png
```
## Usage
Use code-fences with a tag of kroki-`<Module>` to replace the code with the wanted diagram.
[Diagram options](https://docs.kroki.io/kroki/setup/diagram-options/) can be set as well.
Example for BlockDiag:
````markdown
```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:
````markdown
```kroki-bpmn
@from_file:path/to/diagram.bpmn
```
````
## See Also
Diagram examples can be found [here](https://kroki.io/examples.html).
More information about installing a self-manged Kroki-Service [here](https://docs.kroki.io/kroki/setup/install/).
More Plugins for MkDocs can be found [here](http://www.mkdocs.org/user-guide/plugins/)
## Pre-Release-Versions
Install the newest pre-release version using pip:
`pip install -i https://test.pypi.org/simple/ mkdocs-kroki-plugin`
Raw data
{
"_id": null,
"home_page": "https://github.com/AVATEAM-IT-SYSTEMHAUS/mkdocs-kroki-plugin",
"name": "mkdocs-kroki-plugin",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": "",
"keywords": "mkdocs python markdown kroi diagram",
"author": "Benjamin Bittner",
"author_email": "benjamin.bittner@avateam.com",
"download_url": "https://files.pythonhosted.org/packages/ca/52/05f5acc136d70b0f1754571869581f1cd3400c05faf475acdb0b3b53d938/mkdocs-kroki-plugin-0.7.1.tar.gz",
"platform": null,
"description": "# mkdocs-kroki-plugin\n\nThis is a MkDocs plugin to embed Kroki-Diagrams into your documentation.\n\n## Setup\n\nInstall the plugin using pip:\n\n`pip install mkdocs-kroki-plugin`\n\nActivate the plugin in `mkdocs.yml`:\n\n```yaml\nplugins:\n ...\n - kroki:\n```\n\n## Config\n\n| Key | Description |\n|---|---|\n| `ServerURL` | URL of your kroki-Server, default: `https://kroki.io` |\n| `FencePrefix` | Diagram prefix, default: `kroki-` |\n| `EnableBlockDiag` | Enable BlockDiag (and the related Diagrams), default: `True` |\n| `Enablebpmn` | Enable BPMN, default: `True` |\n| `EnableExcalidraw` | Enable Excalidraw, default: `True` |\n| `EnableMermaid` | Enable Mermaid, default: `True` |\n| `EnableDiagramsnet` | Enable diagrams.net (draw.io), default: `False` |\n| `HttpMethod` | Http method to use (`GET` or `POST`), default: `GET` <br>(Note: On `POST` the retrieved images are stored next to the including page in the build directory) |\n| `FileTypes` | File types you want to use, default: `[svg]`, (Note: not all file formats work with all diagram types <https://kroki.io/#support>) |\n\n```yaml\n - kroki:\n FileTypes:\n - png\n - svg\n```\n\n* `FileTypeOverrides` - Overrides for specific diagrams to set the desired file type default: None,\n\n```yaml\n - kroki:\n FileTypeOverrides:\n mermaid: png\n```\n\n## Usage\n\nUse code-fences with a tag of kroki-`<Module>` to replace the code with the wanted diagram.\n\n[Diagram options](https://docs.kroki.io/kroki/setup/diagram-options/) can be set as well.\n\nExample for BlockDiag:\n\n````markdown\n```kroki-blockdiag no-transparency=false\nblockdiag {\n blockdiag -> generates -> \"block-diagrams\";\n blockdiag -> is -> \"very easy!\";\n\n blockdiag [color = \"greenyellow\"];\n \"block-diagrams\" [color = \"pink\"];\n \"very easy!\" [color = \"orange\"];\n}\n```\n````\n\nYou can render diagram from file with `@from_file:` directive:\n\n````markdown\n```kroki-bpmn\n@from_file:path/to/diagram.bpmn\n```\n````\n\n## See Also\n\nDiagram examples can be found [here](https://kroki.io/examples.html).\n\nMore information about installing a self-manged Kroki-Service [here](https://docs.kroki.io/kroki/setup/install/).\n\nMore Plugins for MkDocs can be found [here](http://www.mkdocs.org/user-guide/plugins/)\n\n## Pre-Release-Versions\n\nInstall the newest pre-release version using pip:\n\n`pip install -i https://test.pypi.org/simple/ mkdocs-kroki-plugin`\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "MkDocs plugin for Kroki-Diagrams",
"version": "0.7.1",
"project_urls": {
"Homepage": "https://github.com/AVATEAM-IT-SYSTEMHAUS/mkdocs-kroki-plugin"
},
"split_keywords": [
"mkdocs",
"python",
"markdown",
"kroi",
"diagram"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "f7e806f14fef204b4639d8dbd0b441747cf1d1984895e3c49125515c26e8eb26",
"md5": "1bb8ab70dc5f5a24a188db8f925fc0b8",
"sha256": "e6731592469717dc77d704e6a8f8773d3d9423e5e7690411ad2422ad2b0a403b"
},
"downloads": -1,
"filename": "mkdocs_kroki_plugin-0.7.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "1bb8ab70dc5f5a24a188db8f925fc0b8",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 8384,
"upload_time": "2024-01-21T15:26:25",
"upload_time_iso_8601": "2024-01-21T15:26:25.569541Z",
"url": "https://files.pythonhosted.org/packages/f7/e8/06f14fef204b4639d8dbd0b441747cf1d1984895e3c49125515c26e8eb26/mkdocs_kroki_plugin-0.7.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "ca5205f5acc136d70b0f1754571869581f1cd3400c05faf475acdb0b3b53d938",
"md5": "63a1db7db05625615fde6cbfbc259c1a",
"sha256": "5ad7b07384a90151f0b8f0dc64c43691ea017994221bccd3431c9f278d61055e"
},
"downloads": -1,
"filename": "mkdocs-kroki-plugin-0.7.1.tar.gz",
"has_sig": false,
"md5_digest": "63a1db7db05625615fde6cbfbc259c1a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 7333,
"upload_time": "2024-01-21T15:26:27",
"upload_time_iso_8601": "2024-01-21T15:26:27.381887Z",
"url": "https://files.pythonhosted.org/packages/ca/52/05f5acc136d70b0f1754571869581f1cd3400c05faf475acdb0b3b53d938/mkdocs-kroki-plugin-0.7.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-01-21 15:26:27",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "AVATEAM-IT-SYSTEMHAUS",
"github_project": "mkdocs-kroki-plugin",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "mkdocs-kroki-plugin"
}