Kroki integration into sphinx
Project description
sphinxcontrib-kroki
Embed PlantUML, DOT, etc. diagrams in your Sphinx-based documentation using kroki.
Instalation
Install this package via pip:
pip install sphinxcontrib-kroki
and enable in project configuration (conf.py
):
extensions = [
'sphinxcontrib.kroki',
]
Usage
Inline diagram, show as svg:
.. kroki::
:caption: Diagram
@startuml
Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response
Alice -> Bob: Another authentication Request
Alice <-- Bob: Another authentication Response
@enduml
Load a diagram from a file and show as png:
.. kroki:: ./path/to/graph.puml png
Options
:align:
The horizontal alignment of the diagram (left, center or right).:caption:
The caption of the diagram.:class:
The class names (a list of class names separeted by spaces).:filename:
The path to the file with the diagram.:format:
The output format of the diagram (default svg).:type:
The type of the diagram (blockdiag, bpmn, bytefield, seqdiag, actdiag, nwdiag, packetdiag, rackdiag, c4plantuml, ditaa, erd, excalidraw, graphviz, mermaid, nomnoml, plantuml, svgbob, umlet, vega, vegalite, wavedrom)
The diagram type can be automatically derived from the file extension (as same as type
).
Additional supported extensions:
Extension | Type |
---|---|
*.bob | svgbob |
*.c4 | c4plantuml |
*.c4puml | c4plantuml |
*.dot | graphviz |
*.er | erd |
*.gv | graphviz |
*.iuml | plantuml |
*.pu | plantuml |
*.puml | plantuml |
*.uxf | umlet |
*.vg | vega |
*.vgl | vegalite |
*.vl | vegalite |
*.wsd | plantuml |
Configuration
kroki_url
(default https://kroki.io).kroki_output_format
(default svg).kroki_inline_svg
(dafault False).
Alternatives
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
Close
Hashes for sphinxcontrib-kroki-1.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5295a66170be517515861c698abb6d9a4bcf76e53ac9f62c3607463ebf5c70c5 |
|
MD5 | 98219ac9a40164ce141d80ca88e31c42 |
|
BLAKE2b-256 | 79f9b9c34778d12c9be976bd169a68ee136427c35c8629628400a9c56f921a21 |