MkDocs plugin for embedding Drawio files
Project description
MkDocs Plugin for embedding Drawio files
Features
This plugin enables you to embed interactive drawio diagrams in your documentation. Simply add your files like you would any other image:
![](my-diagram.drawio)
Additionally this plugin supports multi page diagrams by using the alt
text to select the pages by name:
![Page-2](my-diagram.drawio)
![my-custom-page-name](my-diagram.drawio)
Setup
Install plugin using pip:
pip install mkdocs-drawio
Add the plugin to your mkdocs.yml
plugins:
- drawio
Configuration
To use a custom source for the drawio viewer JavaScript file you can overwritte the url.
plugins:
- drawio:
viewer_js: "https://viewer.diagrams.net/js/viewer-static.min.js"
How it works
After mkdocs has generated the html for your documentation, this plugin adds the necessary drawio javascript library. Searches for img
tags with a file ending of *.drawio
and replaces them with the appropiate mxgraph
html block. For further details, please have a look at the official drawio.com documentation.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for mkdocs_drawio-1.5.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32d4b14bd6f47f7d9bcd84560d63f8248e22ec48d171da4e4fcd1036f1a10b58 |
|
MD5 | c4e506f28aa3fa690740e2cbca3153ae |
|
BLAKE2b-256 | 43b144748702e1c9080dab990f26e3299dbd92ff0062d0d143c9719f6738cc42 |