Skip to main content

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)

Source distribution for sphinxcontrib-d2lang 0.0.5
File Size Uploaded
sphinxcontrib-d2lang-0.0.5.tar.gz 3.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sphinxcontrib-d2lang 0.0.5
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

0.0.5 This release

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page