Posts on plantimals on Nostr: **mermaid.js** markdown is a wonderful technology. so I was excited when a colleague ...
**mermaid.js**
markdown is a wonderful technology. so I was excited when a colleague told me there was a markdown language for graphs.
mermaid, which is a javascript library and a CLI, syntax looks like this:
graph LR
Beginning --> Middle
Middle --> End
which is rendered into this:
graph LR
Beginning --> Middle
Middle --> End
the LR part tells us it’s going left to right. we could swap in TD to make it go top to bottom:
graph TD
Beginning --> Middle
Middle --> End
graph TD
Beginning --> Middle
Middle --> End
all sorts of fun to be had
graph TD
P1([P1]) --> F1
P2([P2]) --> F1
F1([F1]) --> F2
F2([F2]) --> F3
F3([F3]) --> F4
F4([F4]) --> F5a([F5a])
F4 --> F5b([F5b])
F4 --> F5C([F5c])
graph TD
P1([P1]) --> F1
P2([P2]) --> F1
F1([F1]) --> F2
F2([F2]) --> F3
F3([F3]) --> F4
F4([F4]) --> F5a([F5a])
F4 --> F5b([F5b])
F4 --> F5C([F5c])
conclusion
all the fun of markdown, but for diagrams. I often find myself sketching out graphs, dependencies, flow charts, etc and this is a powerful tool for leveraging text into the realm of diagrams.**mermaid.js**
markdown is a wonderful technology. so I was excited when a colleague told me there was a markdown language for graphs.
mermaid, which is a javascript library and a CLI, syntax looks like this:
graph LR
Beginning --> Middle
…
https://plantimals.org/posts/mermaid/Published at
2021-03-14 00:00:00Event JSON
{
"id": "b5a35f70f1d8621961b70e9bf1e517f8ef2f023daf6c4bb37bc405cd802c6d6e",
"pubkey": "522a62c152af6dce1c45703268e19ea3f41dd2ddc2c0c22843bb82acf926fad1",
"created_at": 1615680000,
"kind": 1,
"tags": [],
"content": "**mermaid.js**\n\n\n\nmarkdown is a wonderful technology. so I was excited when a colleague told me there was a markdown language for graphs.\nmermaid, which is a javascript library and a CLI, syntax looks like this:\ngraph LR\n Beginning --\u0026gt; Middle\n Middle --\u0026gt; End\nwhich is rendered into this:\n\n\ngraph LR\n Beginning --\u003e Middle\n Middle --\u003e End\n\n\nthe LR part tells us it\u0026rsquo;s going left to right. we could swap in TD to make it go top to bottom:\ngraph TD\n Beginning --\u0026gt; Middle\n Middle --\u0026gt; End\n\n\ngraph TD\n Beginning --\u003e Middle\n Middle --\u003e End\n\n\nall sorts of fun to be had\ngraph TD\n P1([P1]) --\u0026gt; F1\n P2([P2]) --\u0026gt; F1\n F1([F1]) --\u0026gt; F2\n F2([F2]) --\u0026gt; F3\n F3([F3]) --\u0026gt; F4\n F4([F4]) --\u0026gt; F5a([F5a])\n F4 --\u0026gt; F5b([F5b])\n F4 --\u0026gt; F5C([F5c])\n\n\ngraph TD\n P1([P1]) --\u003e F1\n P2([P2]) --\u003e F1\n F1([F1]) --\u003e F2\n F2([F2]) --\u003e F3\n F3([F3]) --\u003e F4\n F4([F4]) --\u003e F5a([F5a])\n F4 --\u003e F5b([F5b])\n F4 --\u003e F5C([F5c])\n\n\n\nconclusion\nall the fun of markdown, but for diagrams. I often find myself sketching out graphs, dependencies, flow charts, etc and this is a powerful tool for leveraging text into the realm of diagrams.**mermaid.js**\n\n\n\nmarkdown is a wonderful technology. so I was excited when a colleague told me there was a markdown language for graphs.\nmermaid, which is a javascript library and a CLI, syntax looks like this:\ngraph LR\n Beginning --\u0026gt; Middle\n…\n\nhttps://plantimals.org/posts/mermaid/",
"sig": "552f37a84f78a4daf02d2ade9eb36981986f30a71c515c64819797b7c3d5c14335dc077c6cae4cfabb1403b277fc4ef82fa7adae2d34f61b879db5f04ea2f265"
}