mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-11-09 22:09:06 -05:00
adapt NIP-23 references to use NIP-27.
This commit is contained in:
parent
9b575b1514
commit
2fd581f692
14
23.md
14
23.md
|
@ -6,7 +6,7 @@ Long-form Content
|
|||
|
||||
`draft` `optional` `author:fiatjaf`
|
||||
|
||||
This NIP defines `kind:30023` (a parameterized replaceable event according to NIP-33) for long-form text content, generally referred to as "articles" or "blog posts".
|
||||
This NIP defines `kind:30023` (a parameterized replaceable event according to [NIP-33](33.md)) for long-form text content, generally referred to as "articles" or "blog posts".
|
||||
|
||||
"Social" clients that deal primarily with `kind:1` notes should not be expected to implement this NIP.
|
||||
|
||||
|
@ -31,17 +31,11 @@ These articles are meant to be editable, so they should make use of the replacea
|
|||
|
||||
### Linking
|
||||
|
||||
The article may be linked to using the NIP-19 `naddr` code along with the `"a"` tag (see NIP-33 and NIP-19).
|
||||
The article may be linked to using the NIP-19 `naddr` code along with the `"a"` tag (see [NIP-33](33md) and [NIP-19](19.md)).
|
||||
|
||||
### References
|
||||
|
||||
Clients that support publishing NIP-23 events should implement support for parsing pasted NIP-19 `naddr` identifiers and adding them automatically to the list of `.tags` of the event, replacing the actual content with a string like `#[tag_index]` in the same way as NIP-08 -- or, if the reference is in the form of a URL (for example, `[click here](naddr1...)`) then they should be replaced with just the tag number directly as if link with that name existed at the bottom of the Markdown (for example, `[click here][0]`).
|
||||
|
||||
Reader clients should parse the Markdown and replace these references with either internal links so the referenced events can be accessed directly, with NIP-21 `nostr:naddr1...` links or direct links to web clients that will handle these references.
|
||||
|
||||
The idea here is that having these tags is that reader clients can display a list of backreferences at the bottom when one article mentions another.
|
||||
|
||||
The same principles can be applied to `nevent1...`, `note1...`, `nprofile1...` or `npub1...`.
|
||||
References to other Nostr notes, articles or profiles must be made according to [NIP-27](27.md), i.e. by using [NIP-21](21.md) `nostr:...` links and optionally adding tags for these (see example below).
|
||||
|
||||
## Example Event
|
||||
|
||||
|
@ -49,7 +43,7 @@ The same principles can be applied to `nevent1...`, `note1...`, `nprofile1...` o
|
|||
{
|
||||
"kind": 30023,
|
||||
"created_at": 1675642635,
|
||||
"content": "Lorem [ipsum][4] dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\n\nRead more at #[3].",
|
||||
"content": "Lorem [ipsum][nostr:nevent1qqst8cujky046negxgwwm5ynqwn53t8aqjr6afd8g59nfqwxpdhylpcpzamhxue69uhhyetvv9ujuetcv9khqmr99e3k7mg8arnc9] dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\n\nRead more at nostr:naddr1qqzkjurnw4ksz9thwden5te0wfjkccte9ehx7um5wghx7un8qgs2d90kkcq3nk2jry62dyf50k0h36rhpdtd594my40w9pkal876jxgrqsqqqa28pccpzu.",
|
||||
"tags": [
|
||||
["d", "lorem-ipsum"],
|
||||
["title", "Lorem Ipsum"],
|
||||
|
|
Loading…
Reference in New Issue
Block a user