Metadata-Version: 2.1
Name: mkdocs-drawio
Version: 1.5.4
Summary: MkDocs plugin for embedding Drawio files
Home-page: https://github.com/tuunit/mkdocs-drawio/
License: MIT
Keywords: mkdocs,plugin,markdown,drawio
Author: Sergey Lukin
Author-email: onixpro@gmail.com
Requires-Python: >=3.7.0,<4.0.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: Jinja2 (>=3.0.3,<4.0.0)
Requires-Dist: beautifulsoup4 (>=4.11.0,<5.0.0)
Requires-Dist: lxml (>=4.9.0,<5.0.0)
Requires-Dist: mkdocs (>=1.4.0,<2.0.0)
Requires-Dist: requests (>=2.27.1,<3.0.0)
Project-URL: Repository, https://github.com/tuunit/mkdocs-drawio/
Description-Content-Type: text/markdown

# MkDocs Plugin for embedding Drawio files
[![Publish Badge](https://github.com/tuunit/mkdocs-drawio/workflows/Publish/badge.svg)](https://github.com/tuunit/mkdocs-drawio/actions)
[![PyPI](https://img.shields.io/pypi/v/mkdocs-drawio)](https://pypi.org/project/mkdocs-drawio/)

[Buy Sergey a 🍜](https://www.buymeacoffee.com/SergeyLukin)

## Features
This plugin enables you to embed interactive drawio diagrams in your documentation. Simply add your files like you would any other image:

```markdown
![](my-diagram.drawio)
```

Additionally this plugin supports multi page diagrams by using the `alt` text to select the pages by name:

```markdown
![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`

```yaml
plugins:
  - drawio
```

### Configuration

To use a custom source for the drawio viewer JavaScript file you can overwritte the url.

```yaml
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](https://www.drawio.com/doc/faq/embed-html).

