liminal 🦠on Nostr: The article header in theory should help you not worry about how nested it is. You ...
The article header in theory should help you not worry about how nested it is. You are only traversing one list at a time and using the rules to render each individual element.
```
def renderHeader(nevent)
for e in nevent.tags:
render(e, kind=e.kind)
```
An article header would just render the .content feld, which is just stringified json metadata not unlike kind0. So it will just be a title card among the other notes that are rendered - keeping the rest of the article unrendered beyond that level.
Published at
2024-06-23 12:55:50Event JSON
{
"id": "47dac8703d7c865fac753bce5bfe27b11c21ecb44b6512c837603bfea0e7e184",
"pubkey": "dc4cd086cd7ce5b1832adf4fdd1211289880d2c7e295bcb0e684c01acee77c06",
"created_at": 1719140150,
"kind": 1,
"tags": [
[
"e",
"c27bcfc67d347a63425c5f096e4923c42f2f3b917d0171a4f3590268e333413a",
"",
"root"
],
[
"e",
"7d384d65e369891b8777225cfdf10e73e0e36bf2c954a80ba27039de3b167ed7"
],
[
"e",
"6d6fd26e65d460a6ca9707a5a454fdee2c20404de7424990a736f3a9d0854acf",
"",
"reply"
],
[
"p",
"dc4cd086cd7ce5b1832adf4fdd1211289880d2c7e295bcb0e684c01acee77c06"
],
[
"p",
"dd664d5e4016433a8cd69f005ae1480804351789b59de5af06276de65633d319"
],
[
"r",
"nevent.tags"
]
],
"content": "The article header in theory should help you not worry about how nested it is. You are only traversing one list at a time and using the rules to render each individual element. \n\n```\ndef renderHeader(nevent)\n for e in nevent.tags:\n render(e, kind=e.kind)\n```\nAn article header would just render the .content feld, which is just stringified json metadata not unlike kind0. So it will just be a title card among the other notes that are rendered - keeping the rest of the article unrendered beyond that level.",
"sig": "ff4da1121b64d56e296f19f09b026afffecedec4ef298a082923601f1ef4b802461376af282aa1921bdaef804951ef9c2945c73bb1de5b7bb7d2963dcc20a528"
}