Use docspress/diagram to turn a compact relationship list into a flow or sequence diagram. GitHub renders the Markdown preview as Mermaid, while WordPress renders a theme-native accessible SVG without loading a browser diagram library.
When to use it
Choose Diagram when the relationship among actors is harder to understand in prose. Use Flow for instructions readers perform and File Tree for hierarchy. For a large architecture, split the subject into several focused diagrams.
Write diagram source
Write one relationship per line:
Source -> Target: optional label
Lines beginning with # are comments. The parser considers the first 30 source lines and renders at most eight actors and 24 relationships. Extra relationships are discarded, so keep the model deliberately small.
DocsPress generates the Mermaid syntax; keep authoring the compact relationship format above. A flow diagram becomes a flowchart LR, and a sequence diagram becomes a sequenceDiagram.
Attributes
Diagram attributes
docspress/diagram.-
titlestring -
Plain-text heading and accessible diagram label.
-
typeenum -
Visual arrangement of actors and connections.
-
sourcestring required -
One
Source -> Target: labelrelationship per line. -
captionstring -
Optional formatted explanation below the SVG.
No fields match this filter.
The block supports wide alignment in addition to the shared design controls.
Creative examples
Documentation publishing sequence
Documentation publishing flow
Reader feedback loop
From reader question to verified improvement
Cache-miss request sequence
What happens on a documentation cache miss
Published behavior and accessibility
On GitHub, DocsPress projects the compact source into a fenced mermaid block so the repository view renders the diagram. In WordPress, DocsPress produces a theme-native SVG with an image role and accessible label. Labels are escaped for each target syntax and remain in the authoritative config. No third-party diagram code runs on the WordPress page.
Use distinct actor names, short edge labels, and one direction of reading. Describe the important conclusion in nearby prose so the page does not depend on vision alone.