Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add support for Mermaid diagrams #244

Merged
merged 2 commits into from
Jan 21, 2025
Merged

feat: Add support for Mermaid diagrams #244

merged 2 commits into from
Jan 21, 2025

Conversation

JakeSCahill
Copy link
Contributor

This PR allows us to use the antora-meramid-extension to define Mermaid diagrams in the docs and have them rendered in the build output.

Example:

[mermaid]
....
flowchart TB

%% Define classes
classDef userAction stroke:#374D7C, fill:#E2EBFF, font-weight:bold,rx:5,ry:5
classDef systemAction fill:#F6FBF6,stroke:#25855a,stroke-width:2px,color:#20293c,rx:5,ry:5

%% -- LEGEND SUBGRAPH --
subgraph Legend
  direction TB
  UA([User Action]):::userAction
  SE([System Event]):::systemAction
end

%% -- MAIN FLOWCHART --
A((Start)):::systemAction --> B["Check replication factor (≥3) and PDB"]:::userAction
B --> C["Decommission broker"]:::userAction
C --> D["Data migrates to other replicas"]:::systemAction
D --> E["Delete PVC (local PV)"]:::userAction
E --> F["Cordon & drain node"]:::userAction
F --> G["Broker shuts down gracefully"]:::systemAction
G --> H["Upgrade node"]:::userAction
H --> I["New broker Pod and new PVC (local PV)"]:::systemAction
I --> J["Data rebalances"]:::systemAction
J --> K((Cluster healthy)):::systemAction
....

Result:

2025-01-20_16-12-59

Copy link

netlify bot commented Jan 20, 2025

Deploy Preview for docs-ui ready!

Name Link
🔨 Latest commit d7bf784
🔍 Latest deploy log https://app.netlify.com/sites/docs-ui/deploys/678e7bffd733660008194145
😎 Deploy Preview https://deploy-preview-244--docs-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

@JakeSCahill JakeSCahill requested a review from Deflaimun January 20, 2025 16:15
@JakeSCahill JakeSCahill added the enhancement New feature or request label Jan 20, 2025
Copy link
Contributor

@Deflaimun Deflaimun left a comment

Choose a reason for hiding this comment

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

Nice addition!

@JakeSCahill JakeSCahill merged commit c03b761 into main Jan 21, 2025
6 checks passed
@JakeSCahill JakeSCahill deleted the mermaid branch January 21, 2025 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants