conventions/mermaid-style.
Mermaid — drill-down links
Make diagram nodes navigable. Mintlify honors Mermaid’sclick
directive: each node gets a pointer cursor, a hover tooltip, and
navigates on click. This is the canonical way to get “zoom in to a
detail page” behaviour on this site. No custom components, no SVG
export, no JavaScript needed.
When to add clicks
Addclick whenever a node represents a topic that has its own
detail page on this site, or its own canonical external URL. Examples
are a repo, a dashboard, or a vendor doc. This is the default for
context, overview, and hub diagrams, not an optional embellishment.
Skip clicks in two cases. First, nodes that don’t map to a real
destination (a transient process, an abstract concept like “Code” or
“Ship”). Second, destinations that are still TODO and would 404.
Canonical syntax — INTERNAL links only
Use only this form. Oneclick per line. Always include a tooltip;
for hover-only users it’s the only signal of where the click goes.
click block AFTER all classDef definitions and class
assignments, and BEFORE any linkStyle lines.
External URLs — do NOT click them from the diagram
Mermaid has open bugs (#3077, #5550) where_blank is parsed but silently dropped from the rendered SVG.
Clicking an external link on a node navigates the current tab away.
The diagram disappears, and the back button is the only way home.
Workaround: put external links in a table or CardGroup
directly under the diagram. Mintlify automatically adds
target="_blank" rel="noreferrer" to external markdown anchors, so
those open in a new tab correctly.
Inside the Mermaid block, click ONLY the internal nodes. Leave the
external-pointing nodes without a click directive, and add an HTML
comment naming where the repo lives:
Self-check addition
Append these to the existing self-check before emitting any context, overview, or hub diagram:- Every node whose label names a topic with a detail page has a
clickline - All
clickURLs are site-relative paths (/security/overview), never externalhttps://... - External repo URLs live in a table or CardGroup beside the diagram, NOT in
clickdirectives - Tooltips are ≤40 chars and describe the destination (not the node)
- No
clickpoints at a page that doesn’t exist yet (would 404) - CI Mermaid validation passes (
./scripts/validate-mermaid.shfrom repo root)
Example
When NOT to use clicks
- Pure sequence / timeline diagrams where every node is a stage in one flow (for example, CI step “Lint”). Clicks would imply each stage has its own page when the whole pipeline is one page.
- Diagrams in repo READMEs that render on GitHub. GitHub’s
Mermaid renderer honors
clickdifferently and absolute URLs are required there. Keep site-relative click diagrams on docs.jacobpevans.com; if a README needs an interactive diagram, link out to the relevant docs page instead.