Why use a Kind 1, though.. It would be better if you create your own kinds, like I just did with Nostryfied here:
Nostr Sites is now open source 🤙
There is still a lot of work to do. I’m currently working on adding support for editable kind events (not 30023), and eventually the ability to publish straight from the client.
Also, Nostr Sites was recently mentioned by nostr:npub1az9xj85cmxv8e9j9y80lvqp97crsqdu2fpu3srwthd99qfu9qsgstam8y8 on Bitcoin Review 🔥
Check out the code here:
Discussion
Yes I’m working on using another kind. I saw the kinds you created, and think I’m going to try and add them to Nostr Sites.
Nice! It's just a few numbers. We can make a NIP if this goes forward and formalize them further for your needs.
The main goal is to not pollute kind 1s with code while helping clients figure out how to display these new events correctly.
I am basically doing this:
if (event.kind == 5393) {
response.setHeader('content-type', "text/css")
response.send(event.content)
} else if (event.kind == 5392) {
response.setHeader('content-type', "text/html")
response.send(event.content)
} else if (event.kind == 5394) {
response.setHeader('content-type', "text/javascript")
response.send(event.content)
}
Awesome I will look into this. Yes, I don’t want to pollute everyone’s feed with html code. This was just the easiest way for me to get a minimal product out. I recently learned how to work with kind 30023, so it shouldn’t be too hard to work with other kinds