Skip to content

ITopiaJesseGoerzen/mkdocs-kroki-plugin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.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
  • 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 svg images in, default: images/kroki_generated

Usage

Use code-fences with a tag of kroki-<Module> to replace the code with the wanted diagram.

Example for BlockDiag:

```kroki-blockdiag
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

About

MkDocs plugin for Kroki-Diagrams

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%