upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/23.md
diff options
context:
space:
mode:
authorJon Staab <jstaab@protonmail.com>2023-05-12 05:10:45 -0700
committerGitHub <noreply@github.com>2023-05-12 05:10:45 -0700
commite5302f84c74cf42d878a3ed18257a16bc0d3b748 (patch)
treeb1a3ad9c0317bf7c38f34c500559b66ff7c0a22d /23.md
parent1c728516dfdc7508ce27eda222bde78466e3457d (diff)
parent4208652dc7a39c63c39559b13c656ec30400fcba (diff)
Merge branch 'master' into patch-1
Diffstat (limited to '23.md')
-rw-r--r--23.md58
1 files changed, 58 insertions, 0 deletions
diff --git a/23.md b/23.md
new file mode 100644
index 0000000..151a31b
--- /dev/null
+++ b/23.md
@@ -0,0 +1,58 @@
1NIP-23
2======
3
4Long-form Content
5-----------------
6
7`draft` `optional` `author:fiatjaf`
8
9This 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".
10
11"Social" clients that deal primarily with `kind:1` notes should not be expected to implement this NIP.
12
13### Format
14
15The `.content` of these events should be a string text in Markdown syntax.
16
17### Metadata
18
19For the date of the last update the `.created_at` field should be used, for "tags"/"hashtags" (i.e. topics about which the event might be of relevance) the `"t"` event tag should be used, as per NIP-12.
20
21Other metadata fields can be added as tags to the event as necessary. Here we standardize 4 that may be useful, although they remain strictly optional:
22
23- `"title"`, for the article title
24- `"image"`, for a URL pointing to an image to be shown along with the title
25- `"summary"`, for the article summary
26- `"published_at"`, for the timestamp in unix seconds (stringified) of the first time the article was published
27
28### Editability
29
30These articles are meant to be editable, so they should make use of the replaceability feature of NIP-33 and include a `"d"` tag with an identifier for the article. Clients should take care to only publish and read these events from relays that implement that. If they don't do that they should also take care to hide old versions of the same article they may receive.
31
32### Linking
33
34The article may be linked to using the NIP-19 `naddr` code along with the `"a"` tag (see [NIP-33](33.md) and [NIP-19](19.md)).
35
36### References
37
38References 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).
39
40## Example Event
41
42```json
43{
44 "kind": 30023,
45 "created_at": 1675642635,
46 "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.",
47 "tags": [
48 ["d", "lorem-ipsum"],
49 ["title", "Lorem Ipsum"],
50 ["published_at", "1296962229"],
51 ["t", "placeholder"],
52 ["e", "b3e392b11f5d4f28321cedd09303a748acfd0487aea5a7450b3481c60b6e4f87", "wss://relay.example.com"],
53 ["a", "30023:a695f6b60119d9521934a691347d9f78e8770b56da16bb255ee286ddf9fda919:ipsum", "wss://relay.nostr.org"]
54 ],
55 "pubkey": "...",
56 "id": "..."
57}
58```