MkDocs plugin for D2
Project description
mkdocs-d2-plugin
A plugin for embedding D2 diagrams in MkDocs.
Documentation and live demo can be found here.
Requirements
Installation
Install the plugin using pip:
pip install mkdocs-d2-plugin
And add it to your mkdocs.yml
:
plugins:
- d2
Usage
Fenced code block
```d2
shape: sequence_diagram
Alice -> John: Hello John, how are you?
Alice -> John.ack: John, can you hear me?
John.ack -> Alice: Hi Alice, I can hear you!
John -> Alice: I feel great!
```
Image tag
![Diagram](diagram.d2)
Demo app
You can find demo app in the docs
directory.
Live version is available here.
To run in locally:
cd docs
python3 -m venv .venv
source .venv/bin/activate
pip install mkdocs-material mkdocs-d2-plugin
mkdocs serve
To run it using Docker:
cd docs
docker build --tag mkdocs-d2-plugin:latest .
docker run --rm -it -p 8000:8000 -v ${PWD}:/docs mkdocs-d2-plugin:latest
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
Close
Hashes for mkdocs_d2_plugin-1.4.0rc1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 19e5d7b4002bc2aeb9468680c06457a9c58252e21b38493cf78fb401e821ecea |
|
MD5 | ceebfc3f6ca13fd088cdc3907b4dbd82 |
|
BLAKE2b-256 | acdce6a38ce6b5db879b9f6f09efa96ef2ce247707e88c96380ce0fc2034e50c |
Close
Hashes for mkdocs_d2_plugin-1.4.0rc1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d0cb46a674f2b1ae3e153913191aabc12120009abd0c8307e15552a9be59ab1 |
|
MD5 | b6f84525c5dd392e3893978901c786e6 |
|
BLAKE2b-256 | 311231c2ed0d3b08acf095d4fb3b47ce849a8dfbfd5d39efa81be312527d4e08 |