Skip to content

Commit 809234e

Browse files
Merge pull request #61 from emil0r/publication/mermaid
post for mermaid.js
2 parents 706efbc + 90eb004 commit 809234e

4 files changed

Lines changed: 37 additions & 1 deletion

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"}

site/db.edn

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,12 @@
8787
:image "https://avatars.githubusercontent.com/u/4629681?v=4"
8888
:email ""
8989
:affiliation [:scicloj]
90-
:links [{:icon "github" :href "https://github.com/joinr"}]}]
90+
:links [{:icon "github" :href "https://github.com/joinr"}]}
91+
{:id :emilbengtsson
92+
:name "Emil Bengtsson"
93+
:url "https://emil0r.com"
94+
:image "https://avatars.githubusercontent.com/u/49733?v=4"
95+
:links [{:icon "github" :href "https://github.com/emil0r"}]}]
9196

9297
:affiliation
9398
[{:id :clojure.core

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 "Explain complex concepts with mermaid.js"
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)