Diagram/Kroki/Mermaid: Difference between revisions

From Chorke Wiki
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
{|class='wikitable' style='width:50%;margin:-11px 0 6px 0'
|valign='top'|
<syntaxhighlight style='margin:3px 0' lang='yaml'>
cat <<'YML' | tee ${HOME}/kroki.yml >/dev/null
---
endpoint: https://kroki.shahed.biz.ops
timeout: 30s
YML
</syntaxhighlight>
|}
==Mermaid » Theme==
==Mermaid » Theme==
{|class='wikitable' style='width:50%;margin:3px 0'
{|class='wikitable' style='width:50%;margin:3px 0'
Line 16: Line 27:
|-
|-
| redux      || Redux-style flowchart  ||style='text-align:center'| 🟢
| redux      || Redux-style flowchart  ||style='text-align:center'| 🟢
|}
==Mermaid » Graph==
{|class='wikitable mw-collapsible' style='width:100%;margin:3px 0'
!scope='col' style='text-align:left' colspan='2'|
Kroki » Install
|-
|valign='top' style='width:50%'|
<syntaxhighlight style='margin:3px 0' lang='yaml'>
BASE64_SCHEME="$(cat <<-'MMD' | kroki encode /dev/stdin
---
config:
  theme: forest
---
graph TD
  A[Client] --> B[Ingress]
  B --> C[Kroki]
  C --> D[Mermaid Renderer]
MMD
)"
setsid open https://kroki.shahed.biz.ops/mermaid/svg/${BASE64_SCHEME} >/dev/null 2>&1 &
</syntaxhighlight>
|valign='top' style='width:50%'|
<syntaxhighlight style='margin:3px 0' lang='yaml'>
BASE64_SCHEME="$(cat <<-'MMD' | kroki encode -
---
config:
  theme: neutral
---
graph TD
  A[Client] --> B[Ingress]
  B --> C[Kroki]
  C --> D[Mermaid Renderer]
MMD
)"
setsid open https://kroki.shahed.biz.ops/mermaid/svg/${BASE64_SCHEME} >/dev/null 2>&1 &
</syntaxhighlight>
|}
|}



Revision as of 08:13, 23 December 2025

cat <<'YML' | tee ${HOME}/kroki.yml >/dev/null
---
endpoint: https://kroki.shahed.biz.ops
timeout: 30s
YML

Mermaid » Theme

Name Description Recommended
default Standard Mermaid theme 🟢
forest Green / earthy style 🟢
dark Dark background 🟢
neutral Light, neutral colors 🟢
base Minimal base style 🟢
redux Redux-style flowchart 🟢

Mermaid » Graph

Kroki » Install

BASE64_SCHEME="$(cat <<-'MMD' | kroki encode /dev/stdin
---
config:
  theme: forest
---
graph TD
  A[Client] --> B[Ingress]
  B --> C[Kroki]
  C --> D[Mermaid Renderer]
MMD
)"

setsid open https://kroki.shahed.biz.ops/mermaid/svg/${BASE64_SCHEME} >/dev/null 2>&1 &
BASE64_SCHEME="$(cat <<-'MMD' | kroki encode -
---
config:
  theme: neutral
---
graph TD
  A[Client] --> B[Ingress]
  B --> C[Kroki]
  C --> D[Mermaid Renderer]
MMD
)"

setsid open https://kroki.shahed.biz.ops/mermaid/svg/${BASE64_SCHEME} >/dev/null 2>&1 &

References

References