Skip to content

Commit 219ad25

Browse files
committed
post for mermaid.js
Had to pin the kindly version, as beta53 doesn't seem to include the correct version.
1 parent 706efbc commit 219ad25

3 files changed

Lines changed: 31 additions & 0 deletions

File tree

deps.edn

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
org.scicloj/clay {:mvn/version "2-beta53"
1515
#_#_:git/url "https://github.com/scicloj/clay.git"
1616
#_#_:git/sha "b5ebd1a98d7deba6c165a72077ffa08554f4c93a"}
17+
org.scicloj/kindly {:mvn/version "4-beta19"}
1718
org.eclipse.elk/org.eclipse.elk.core {:mvn/version "0.10.0"}
1819
org.eclipse.elk/org.eclipse.elk.graph {:mvn/version "0.10.0"}
1920
org.eclipse.elk/org.eclipse.elk.graph.json {:mvn/version "0.10.0"}

src/scicloj/clay/mermaid.clj

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
^{:kindly/hide-code true
2+
:clay {:title "Mermaid.js"
3+
:format [:quarto :html]
4+
:quarto {:author :emilbengtsson
5+
:description "Use mermaid.js from within clay"
6+
:type :post
7+
:date "2025-09-05"
8+
:image "mermaid.png"
9+
:category :clay
10+
:tags [:clay :workflow]}}}
11+
(ns scicloj.clay.mermaid
12+
(:require [scicloj.kindly.v4.kind :as kind]))
13+
14+
15+
;; ## A picture is worth a thousand words
16+
17+
(kind/mermaid "flowchart LR
18+
Concept --> easy{Easy to understand?}
19+
easy -->|Yes| Understanding
20+
easy -->|No| Diagram
21+
easy -->|No| wall(Wall of text)
22+
Diagram --> Understanding
23+
wall -->|Didn't get it| Concept
24+
wall -->|Finally| Understanding")
25+
26+
;;
27+
;; With [mermaid.js](https://mermaid.js.org/) you can now use words to generate
28+
;; a picture. One of the trickier aspects in explaining complex ideas/concepts,
29+
;; is the infliction point where words start to pile up towards dizzying heights
30+
;; and you lose sight of what what you wanted to communicate.

src/scicloj/clay/mermaid.png

21.4 KB
Loading

0 commit comments

Comments
 (0)