2023-11-07 12:16:43 +00:00
|
|
|
NIP-84
|
|
|
|
======
|
|
|
|
|
|
|
|
Highlights
|
|
|
|
----------
|
|
|
|
|
2023-11-16 00:42:51 +00:00
|
|
|
`draft` `optional`
|
2023-11-07 12:16:43 +00:00
|
|
|
|
|
|
|
This NIP defines `kind:9802`, a "highlight" event, to signal content a user finds valuable.
|
|
|
|
|
|
|
|
## Format
|
|
|
|
The `.content` of these events is the highlighted portion of the text.
|
|
|
|
|
|
|
|
`.content` might be empty for highlights of non-text based media (e.g. NIP-94 audio/video).
|
|
|
|
|
|
|
|
### References
|
|
|
|
Events SHOULD tag the source of the highlight, whether nostr-native or not.
|
|
|
|
`a` or `e` tags should be used for nostr events and `r` tags for URLs.
|
|
|
|
|
|
|
|
When tagging a URL, clients generating these events SHOULD do a best effort of cleaning the URL from trackers
|
|
|
|
or obvious non-useful information from the query string.
|
|
|
|
|
|
|
|
### Attribution
|
|
|
|
Clients MAY include one or more `p` tags, tagging the original authors of the material being highlighted; this is particularly
|
|
|
|
useful when highlighting non-nostr content for which the client might be able to get a nostr pubkey somehow
|
|
|
|
(e.g. prompting the user or reading a `<meta name="nostr:nprofile1..." />` tag on the document). A role MAY be included as the
|
|
|
|
last value of the tag.
|
|
|
|
|
2024-09-03 17:11:31 +00:00
|
|
|
```jsonc
|
2023-11-18 12:13:12 +00:00
|
|
|
{
|
|
|
|
"tags": [
|
|
|
|
["p", "<pubkey-hex>", "<relay-url>", "author"],
|
|
|
|
["p", "<pubkey-hex>", "<relay-url>", "author"],
|
|
|
|
["p", "<pubkey-hex>", "<relay-url>", "editor"]
|
|
|
|
],
|
2024-09-03 17:11:31 +00:00
|
|
|
// other fields...
|
2023-11-18 12:13:12 +00:00
|
|
|
}
|
2023-11-07 12:16:43 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
### Context
|
|
|
|
Clients MAY include a `context` tag, useful when the highlight is a subset of a paragraph and displaying the
|
2023-11-17 03:22:43 +00:00
|
|
|
surrounding content might be beneficial to give context to the highlight.
|