--- urn: "urn:penemure:4f07407a-62ba-4842-86bf-d9e111a749e0" backend: "pub" ancestors: - πŸ“ Penemure Development Blog - πŸ““ design docsβ†’ πŸ“ Penemure created: 2025-01-21 20:28:02.539209+00:00 updated: 2025-01-21 20:28:02.539214+00:00 tags: --- # πŸ““ blocks or markdown Blocks or Markdown, the eternal question | Aspect | Blocks | Markdown | | --- | --- | --- | | Data structure | recursive nested | string, but we'll need blocks no matter what. | | Pain | implement every node supported by my markdown engine. Suck shit if it isn't supported | someone else's problem this will never go wrong i swearβ„’ | i guess what i'm thinking is that i really don't want to have to hook into the markdown internals (@abf09a82-1361-4e77-9852-39247278d9a7) Currently we have this garbage: ```code $ ag '== "table"' models/note_migrate.go 178: } else if m["type"] == "table" { 369: } else if m["type"] == "table" { 552: } else if m["type"] == "table" { models/note.go 324: } else if m["type"] == "table" { ``` where new data structures have to be handled in 4 different places (grows linearly with migrations which is insane.) @{git.commit.embed:f2391d06dab664432be247535edc8a584cf6d26c} and I don't want to be duplicating types for every single node so we really want the absolute minimal set of necessary nodes. - Markdown - 2 Column Any nodes that can be just plain old markdown, _must be_. Is there any reason for them not to be plain ol' markdown? Here were the types from the readme i wanted support for. | Group | Type | Fine as Plain Ol' Markdown? | | --- | --- | --- | | markdown | h1/2/3 {4/5/6} | βœ… | | markdown | todo list (automatic subtasks) | ? | | markdown | table | βœ… | | markdown | bullet/numbered | βœ… | | markdown | details/summary | βœ… (html in md yea) | | markdown | blockquote | βœ… | | markdown | code | βœ… | | markdown | divider | βœ… | | markdown | TeX | βœ… going to be rendered by mathjax anyway | | advanced | url (link preview?) | ? | | advanced | image (local) | ? | | advanced | image (external) | βœ… | | advanced | file (embedded) | ? | | db query | table | βœ… | | db query | kanban board | βœ… | | db query | gallery | ? | | db query | list | ? | | db query | calendar | ? | | db query | timeline | ? | | misc | breadcrumbs | ? | | misc | 2/3/4/5 columns | ❌ no, this needs custom representation. don't want to use HTML for this. | | misc | mermaid | βœ… just use code blocks again and mermaid plugin | | misc | link to person/page/date | βœ… currently working @3a319e6a | | misc | @ a day/time, and then have that show up in queries somehow???? | ? |