Skip to content

mkdocs-d2-plugin

A plugin for embedding D2 diagrams in MkDocs.

Flow

MkDocsmkdocs-d2-pluginD2subprocess build/serve diagram definition compile svg svg
MkDocsmkdocs-d2-pluginD2subprocess build/serve diagram definition compile svg svg

Requirements

Installation

Install the plugin using pip:

pip install mkdocs-d2-plugin

And add it to your mkdocs.yml:

plugins:
  - d2

The plugin will automatically add pymdownx.superfences and attr_list to the list of enabled markdown extensions.