diff options
| author | Semisol <45574030+Semisol@users.noreply.github.com> | 2023-11-19 01:45:41 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-19 01:45:41 +0100 |
| commit | da19c078ab892b578a5c35968443205c9e8ac27f (patch) | |
| tree | 17a9f4f3105acdae234d3bc67e42571aed261fa2 /84.md | |
| parent | 4d709d1804de45bab3739ce814d4b0c0b211c273 (diff) | |
| parent | 5dcfe85306434f21ecb1e7a47edd92b2e3e64f9a (diff) | |
Merge branch 'master' into clarify-json-serialization
Diffstat (limited to '84.md')
| -rw-r--r-- | 84.md | 42 |
1 files changed, 42 insertions, 0 deletions
| @@ -0,0 +1,42 @@ | |||
| 1 | NIP-84 | ||
| 2 | ====== | ||
| 3 | |||
| 4 | Highlights | ||
| 5 | ---------- | ||
| 6 | |||
| 7 | `draft` `optional` | ||
| 8 | |||
| 9 | This NIP defines `kind:9802`, a "highlight" event, to signal content a user finds valuable. | ||
| 10 | |||
| 11 | ## Format | ||
| 12 | The `.content` of these events is the highlighted portion of the text. | ||
| 13 | |||
| 14 | `.content` might be empty for highlights of non-text based media (e.g. NIP-94 audio/video). | ||
| 15 | |||
| 16 | ### References | ||
| 17 | Events SHOULD tag the source of the highlight, whether nostr-native or not. | ||
| 18 | `a` or `e` tags should be used for nostr events and `r` tags for URLs. | ||
| 19 | |||
| 20 | When tagging a URL, clients generating these events SHOULD do a best effort of cleaning the URL from trackers | ||
| 21 | or obvious non-useful information from the query string. | ||
| 22 | |||
| 23 | ### Attribution | ||
| 24 | Clients MAY include one or more `p` tags, tagging the original authors of the material being highlighted; this is particularly | ||
| 25 | useful when highlighting non-nostr content for which the client might be able to get a nostr pubkey somehow | ||
| 26 | (e.g. prompting the user or reading a `<meta name="nostr:nprofile1..." />` tag on the document). A role MAY be included as the | ||
| 27 | last value of the tag. | ||
| 28 | |||
| 29 | ```json | ||
| 30 | { | ||
| 31 | "tags": [ | ||
| 32 | ["p", "<pubkey-hex>", "<relay-url>", "author"], | ||
| 33 | ["p", "<pubkey-hex>", "<relay-url>", "author"], | ||
| 34 | ["p", "<pubkey-hex>", "<relay-url>", "editor"] | ||
| 35 | ], | ||
| 36 | ... | ||
| 37 | } | ||
| 38 | ``` | ||
| 39 | |||
| 40 | ### Context | ||
| 41 | Clients MAY include a `context` tag, useful when the highlight is a subset of a paragraph and displaying the | ||
| 42 | surrounding content might be beneficial to give context to the highlight. | ||