sphinxcontrib-d2lang
This is a Sphinx extension for d2lang.
Usage
Install
$ pip install sphinxcontrib-d2lang
Adding the extension
conf.py
extensions = [
"sphinxcontrib.d2lang",
]
Adding a diagram (inline)
You can use d2lang in sphinx directive
source/index.rst
Hello World
===========
.. d2lang::
hello -> world
Adding a diagram (external file)
You can use an external file like this
Hello World
===========
.. d2lang:: helloworld.d2
Options
There is two options you can use
- layout
- filename
Layout engine
You can specify layout engine to use
Hello World
===========
.. d2lang::
:layout: elk
hello -> world
Output filename
Hello World
===========
.. d2lang::
:filename: d2lang_files/helloworld.svg
hello -> world
Release files for sphinxcontrib-d2lang 0.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sphinxcontrib-d2lang-0.0.5.tar.gz | 3.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sphinxcontrib_d2lang-0.0.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.2 kB
Release files / sphinxcontrib-d2lang-0.0.5.tar.gz
| Download URL | sphinxcontrib-d2lang-0.0.5.tar.gz |
|---|---|
| Size | 3.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
26479daf1738d5f8ceafea5c51665a59262f89dc8e726bcdbf1a4384a2b26ac6
|
|
BLAKE2b-256 checksum How to use checksums |
5e5de43c14a2a6628b2773cfab913f204eaee05847b706c35dccafd507b7728d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.2
|
Release files / sphinxcontrib_d2lang-0.0.5-py3-none-any.whl
| Download URL | sphinxcontrib_d2lang-0.0.5-py3-none-any.whl |
|---|---|
| Size | 4.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
791c23669e8879222e614f095afaec85b7596d65831f1fd801c9937fcd9bc58f
|
|
BLAKE2b-256 checksum How to use checksums |
7579b1ca20d0ac54a35a9d3d791ec8c69d58731df2ac4cf2a484969bc51ecf30
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.2
|