Skip to content

DOCS-2997: Enable Mermaid diagrams - #2952

Merged
ctauchen merged 1 commit into
tigera:mainfrom
ctauchen:DOCS-2997-mermaid
Aug 21, 2026
Merged

DOCS-2997: Enable Mermaid diagrams#2952
ctauchen merged 1 commit into
tigera:mainfrom
ctauchen:DOCS-2997-mermaid

Conversation

@ctauchen

Copy link
Copy Markdown
Collaborator

Adds Mermaid support so structural diagrams can live in page source rather than as committed image files.

Diagrams in the docs today are Excalidraw exports in static/img. That suits diagrams that want real visual design, and it should stay for those. It suits structural figures less well: the source is not diffable, a reviewer cannot check a topology against the prose it sits next to, and only whoever holds the Excalidraw file can change it.

Mermaid covers the second case. A diagram in a fenced block sits beside the prose it illustrates, changes in the same commit, and is reviewed as text.

The change is three files:

  • package.json gains @docusaurus/theme-mermaid, pinned to 3.10.1 rather than a caret range. On a caret range it resolves to 3.10.2 and pulls a second copy of the Docusaurus internals into the dependency tree alongside the 3.10.1 ones already there. Exact pinning follows what plugin-sitemap already does.
  • yarn.lock is regenerated. I checked it entry by entry: no pre-existing package changes version, and the additions are Mermaid's own tree.
  • docusaurus.config.js sets markdown.mermaid and registers the theme.

No diagrams are added here, so this PR proves the build still works but does not prove a diagram renders. The first use is the host address placement figure in the L2 bridge networking set, which will land on the concept page and the prepared-bridge guide. Rendering gets demonstrated by that preview.

Worth a maintainer's view on whether Mermaid alongside Excalidraw is the direction you want, rather than standardising on one. My argument for both is that they solve different problems, but it is a repo-wide call rather than mine.

Add Mermaid support so structural diagrams can live in page source rather than
as image files.

Diagrams in the docs are currently Excalidraw exports committed to static/img.
That suits diagrams that want real visual design. It suits structural figures
less well, because the source is not diffable, a reviewer cannot check the
topology against the prose, and only whoever holds the Excalidraw file can
change it.

Mermaid covers the second case. A diagram written in a fenced block sits next to
the prose it illustrates, changes in the same commit, and is reviewed as text.

The theme is pinned to 3.10.1 to match the other Docusaurus packages. Left on a
caret range it resolves to 3.10.2 and pulls a second copy of the Docusaurus
internals into the tree.

No diagrams are added here. The first use is the host address placement figure
in the L2 bridge networking set.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@ctauchen
ctauchen requested a review from a team as a code owner August 21, 2026 11:55
Copilot AI lite review requested due to automatic review settings August 21, 2026 11:55
@netlify

netlify Bot commented Aug 21, 2026

Copy link
Copy Markdown

Deploy Preview for calico-docs-preview-next ready!

Name Link
🔨 Latest commit 8ceac2c
🔍 Latest deploy log https://app.netlify.com/projects/calico-docs-preview-next/deploys/6a883c998ec3300008a72dcf
😎 Deploy Preview https://deploy-preview-2952--calico-docs-preview-next.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Aug 21, 2026

Copy link
Copy Markdown

Deploy Preview succeeded!

Built without sensitive environment variables

Name Link
🔨 Latest commit 8ceac2c
🔍 Latest deploy log https://app.netlify.com/projects/tigera/deploys/6a883c99c62e74000818d3fe
😎 Deploy Preview https://deploy-preview-2952--tigera.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 68 (🔴 down 3 from production)
Accessibility: 98 (no change from production)
Best Practices: 92 (no change from production)
SEO: 100 (no change from production)
PWA: -
View the detailed breakdown and full score reports
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Enables Mermaid diagrams in the Docusaurus documentation site alongside existing Excalidraw assets.

Changes:

  • Adds the pinned Mermaid theme dependency.
  • Regenerates the Yarn lockfile.
  • Enables Mermaid Markdown support and registers the theme.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.

File Description
yarn.lock Locks Mermaid and transitive dependencies.
package.json Adds @docusaurus/theme-mermaid 3.10.1.
docusaurus.config.js Enables Mermaid rendering and registers the theme.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@ctauchen
ctauchen merged commit 9a2261e into tigera:main Aug 21, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants