MkDocs plugin for embedding Drawio files
Maintained. Last release 4 months ago, commits in 3 of the last 26 weeks. Weaker on commit activity.
pip install mkdocs-drawioMkDocs Plugin for embedding Drawio files
See the official docs and the live example page.
Features
This plugin enables you to embed interactive drawio diagrams in your documentation. Simply add your diagrams like you would any other image:
You can either use diagrams hosted within your own docs. Absolute as well as relative paths are allowed:
Absolute path:

Same directory as the markdown file:

Relative directory to the markdown file:

Or you can use external urls:

Additionally this plugin supports multi page diagrams by using either the page or alt property. To use the page property, you need to use the markdown extension attr_list.
Either use the alt text:


Or use the page attribute:
{ page="Page-2" }
{ page="my-custom-page-name" }
Setup
Install the plugin with pip:
pip install mkdocs-drawio
If you are managing your MkDocs project with uv, use:
uv add mkdocs-drawio
Add the plugin to your mkdocs.yml
plugins:
- drawio
Configuration Options
Full documentation of the configuration options and examples can be found in the official documentation
By default the plugin uses the official url for the minified drawio javascript library. To use a custom source for the drawio viewer you can overwritte the url. This might be useful in airlocked environments.