Skip to main content

MkDocs plugin for Kroki-Diagrams

Project description


This is a MkDocs plugin to embed Kroki-Diagrams into your documentation.


Install the plugin using pip:

pip install mkdocs-kroki-plugin

Activate the plugin in mkdocs.yml:

  - kroki:


  • ServerURL - URL of your kroki-Server, default:
  • 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 (, default: False
  • HttpMethod - Http method to use (GET or POST), default: GET (Note: you have to enable DownloadImages if you want to use POST!)
  • DownloadImages - Download diagrams from kroki as static assets instead of just creating kroki links, default: False
  • DownloadDir - The asset directory to place downloaded images in, default: images/kroki_generated
  • FileTypes - File types you want to use, default: [svg], (Note: not all file formats works with all diagram types
  - kroki:
        - png
        - svg
  • FileTypeOverrides - Overrides for specific diagrams to set the desired file type default: None,
  - kroki:
        mermaid: png


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


Install the newest pre-release version using pip:

pip install -i mkdocs-kroki-plugin

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mkdocs-kroki-plugin-0.5.1.tar.gz (6.2 kB view hashes)

Uploaded Source

Built Distribution

mkdocs_kroki_plugin-0.5.1-py3-none-any.whl (7.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page