#322
gdtest_mermaid
OK
CONFIG
Mermaid diagrams with and without figure captions
User-guide page with `{mermaid}` diagrams: a wide flowchart with a labeled `fig-cap`, a small one with an unlabeled `fig-cap`, and one with no caption. Captions must sit under the diagram, and a wide diagram must span the text column while a small one keeps its natural size (#361).
Build Mode
● Has great-docs.yml
This package ships a pre-supplied config.
The great-docs init step is skipped and
great-docs build uses the spec-defined configuration directly.
Tests specific config options and their rendered output.
Dimensions
A1 B1 C1 D1 E6 F1 G1 H7
A1Flat layoutlayout
B1Explicit __all__exports
C1Functions onlyobjects
D1NumPydocstrings
E6No directivesdirectives
F1Auto-discoveruser_guide
G1README.mdlanding
H7No extrasextras
Source Files
docs/
user_guide/
01-captions.qmd
---
title: Captions
---
# Mermaid Captions
A wide pipeline flowchart with a cross-referenceable caption
(see @fig-pipeline). It should span the text column, with the caption
underneath.
```{mermaid}
%%| label: fig-pipeline
%%| fig-cap: "The model-fitting pipeline, from raw data to a report."
flowchart LR
A[Load data] --> B[Validate] --> C[Fit model] --> D[Evaluate] --> E[Report]
C --> F[Diagnostics] --> D
```
A small diagram with an unlabeled caption keeps its natural size:
```{mermaid}
%%| fig-cap: "A tiny two-node diagram."
flowchart LR
A --> B
```
A diagram with no caption at all:
```{mermaid}
flowchart TD
Start --> Decision{OK?}
Decision -->|Yes| Done
Decision -->|No| Start
```gdtest_mermaid/
__init__.py
"""Mermaid diagrams demo package."""
__version__ = "1.0.0"
__all__ = ["greet"]
def greet(name: str) -> str:
"""Return a friendly greeting.
Parameters
----------
name
Who to greet.
Returns
-------
str
The greeting.
"""
return f"Hello, {name}!"great-docs.yml
dark_mode: true