fiatjaf on Nostr: Answering : I just chose YAML because it is common practice out there for blog ...
Answering
https://github.com/nostr-protocol/nips/pull/220#issuecomment-1416566716:
I just chose YAML because it is common practice out there for blog software and static site generators out there to use Markdown with a YAML front-matter for metadata, mostly because it is very readable as plaintext I believe and easy to write by hand.
Considering that I think it makes no sense to use TOML, since it would be introducing yet a new dependency and nothing would be gained. I'm considering now that it makes no sense to have this be in YAML since no one will be writing these by hand ever anyway, so just using JSON will probably be a better solution.
And yet, now that you asked why not use that "subject" tag that already exists, I see that it is probably better to just use normal tags for everything and get rid of the front-matter completely. This simplifies parsing as you don't have to split the article string, then run it through a parser and whatnot.
So we should just use tags for everything, a tag `["title", "Lorem Ipsum"]`, other tags for other things that may appear, like `["summary", "..."]`. What else?
Published at
2023-02-04 19:18:26Event JSON
{
"id": "dc62fddc057fd779574b23d843aa6e63b3895b975d779cf6882671bef8683b95",
"pubkey": "3bf0c63fcb93463407af97a5e5ee64fa883d107ef9e558472c4eb9aaaefa459d",
"created_at": 1675538306,
"kind": 1,
"tags": [
[
"e",
"5fb364fccb623d7826fe4945bd675925991cbc04768af805d51a45b7b5d4ca8a",
"wss://nostr-pub.wellorder.net",
"root"
]
],
"content": "Answering https://github.com/nostr-protocol/nips/pull/220#issuecomment-1416566716:\n\nI just chose YAML because it is common practice out there for blog software and static site generators out there to use Markdown with a YAML front-matter for metadata, mostly because it is very readable as plaintext I believe and easy to write by hand.\n\nConsidering that I think it makes no sense to use TOML, since it would be introducing yet a new dependency and nothing would be gained. I'm considering now that it makes no sense to have this be in YAML since no one will be writing these by hand ever anyway, so just using JSON will probably be a better solution.\n\nAnd yet, now that you asked why not use that \"subject\" tag that already exists, I see that it is probably better to just use normal tags for everything and get rid of the front-matter completely. This simplifies parsing as you don't have to split the article string, then run it through a parser and whatnot.\n\nSo we should just use tags for everything, a tag `[\"title\", \"Lorem Ipsum\"]`, other tags for other things that may appear, like `[\"summary\", \"...\"]`. What else?",
"sig": "58556bf420fc219fa415c5b28022147b895436e45a21b0f2cf2d64479109041ff409a7001a85d1f2aff0c8b94fd73a842144fcb9b953a5106596ec5b85f350d1"
}