The Sphinx extension allows you to embed diagrams.net(drawio) format into a document.
.. image:: example.drawio
.. figure:: example.drawio caption of figure
$ pip install sphinxcontrib-diagrams
This extension requires draw.io-export.
https://www.npmjs.com/package/draw.io-export
Add sphinxcontrib.diagrams
to extensions
at conf.py:
extensions += ['sphinxcontrib.diagrams']
And set your draw.io-export path to diagrams_exporter_path
(default: drawio
):
diagrams_exporter_path = 'your draw.io-export path'
.. image:: example.drawio
.. figure:: example.drawio caption of figure