This release is a pre-release and may not be stable for production use.
sphinx-gp-mermaid
Build-time Mermaid diagrams for Sphinx. Fenced mermaid blocks render to
inline <svg> during the build via mmdc
(@mermaid-js/mermaid-cli):
no client-side mermaid runtime, no asynchronous pop-in, no layout shift.
Each diagram is rendered twice — a light and a dark variant — and both are
inlined, toggled by CSS on body[data-theme]. Diagrams paint with the page,
follow the theme toggle without JavaScript, and survive SPA navigation as
live DOM.
Install
$ pip install sphinx-gp-mermaid
Usage
Enable the extension in conf.py:
extensions = ["sphinx_gp_mermaid"]
With gp-sphinx, opt in via merge_sphinx_config:
config = merge_sphinx_config(
extra_extensions=["sphinx_gp_mermaid"],
)
Author diagrams as MyST fences:
:::{mermaid}
:caption: How it flows.
:alt: a request flowing through two steps
:name: request-flow
:responsive: fit
flowchart LR
a --> b
:::
fit is the default responsive policy: the rendered SVG scales down to the
content column. Use :responsive: preserve when a dense diagram should keep
its intrinsic width and scroll horizontally instead of shrinking labels.
Renderer toolchain
Rendering shells out to mmdc, resolved from the mermaid_cmd config value,
then <confdir>/node_modules/.bin/mmdc, then PATH. Install it in the docs
toolchain:
$ pnpm add -D @mermaid-js/mermaid-cli
When the renderer is unavailable the build still succeeds: diagrams degrade to their source text with a single warning.
Documentation
See the full documentation for directive options, theming, caching, and CI setup.
Metadata
Release files for sphinx-gp-mermaid 0.1.0a39
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sphinx_gp_mermaid-0.1.0a39.tar.gz | 71.3 kB | With provenance | Details for sphinx_gp_mermaid-0.1.0a39.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sphinx_gp_mermaid-0.1.0a39-py3-none-any.whl | Python 3 | none | any | Details for sphinx_gp_mermaid-0.1.0a39-py3-none-any.whl |
Total release size: 84.1 kB
Release files / sphinx_gp_mermaid-0.1.0a39.tar.gz
| Download URL | sphinx_gp_mermaid-0.1.0a39.tar.gz |
|---|---|
| Size | 71.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
767faa1594f774e41bd1b96b3992c9bda448f1a93d8b6d5f4e309a01870a7791
|
|
BLAKE2b-256 checksum How to use checksums |
1de553624bab0d3beae9404a8042fc71b8260dc6c4ff1734fadb5db8824de3ed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 6, 2026.
Transparency logRelease files / sphinx_gp_mermaid-0.1.0a39-py3-none-any.whl
| Download URL | sphinx_gp_mermaid-0.1.0a39-py3-none-any.whl |
|---|---|
| Size | 12.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fb795910e81f02c5f4a67df7b9e508fac1b0581cc33c0e13eb02e2ba6029cb74
|
|
BLAKE2b-256 checksum How to use checksums |
f7367d15d568a9e241235b4df7f47857e18ae5e1d76c4476cd0190eb97e0b4fd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 6, 2026.
Transparency logSecurity for sphinx-gp-mermaid 0.1.0a39
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for sphinx_gp_mermaid-0.1.0a39.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 6, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.