mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-11-09 22:09:06 -05:00
get rid of YAML frontmatter.
This commit is contained in:
parent
16b50a481f
commit
ea48646a0f
34
23.md
34
23.md
|
@ -12,11 +12,18 @@ This NIP defines `kind:30023` (a parameterized replaceable event according to NI
|
||||||
|
|
||||||
### Format
|
### Format
|
||||||
|
|
||||||
The `.content` of these events should be a string text in Markdown syntax, including YAML front-matter for other metadata that may be necessary.
|
The `.content` of these events should be a string text in Markdown syntax.
|
||||||
|
|
||||||
### Metadata
|
### Metadata
|
||||||
|
|
||||||
This NIP defines only `title` as the metadata. For the date of publication the event `.created_at` field should be used, and for "tags"/"hashtags" (i.e. topics about which the event might be of relevance) the `"t"` event tag should be used, as in NIP-12.
|
For 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.
|
||||||
|
|
||||||
|
Other 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:
|
||||||
|
|
||||||
|
- `"title"`, for the article title
|
||||||
|
- `"image"`, for an image to be shown along with the title
|
||||||
|
- `"summary"`, for the article summary
|
||||||
|
- `"published_at"`, for the timestamp in unix seconds (stringified) of the first time the article was published
|
||||||
|
|
||||||
### Editability
|
### Editability
|
||||||
|
|
||||||
|
@ -36,29 +43,18 @@ The idea here is that having these tags is that reader clients can display a lis
|
||||||
|
|
||||||
The same principles can be applied to `nevent1...`, `note1...`, `nprofile1...` or `npub1...`.
|
The same principles can be applied to `nevent1...`, `note1...`, `nprofile1...` or `npub1...`.
|
||||||
|
|
||||||
## Example of an event
|
## Example Event
|
||||||
|
|
||||||
Article text:
|
|
||||||
|
|
||||||
```markdown
|
|
||||||
title: Lorem Ipsum
|
|
||||||
---
|
|
||||||
|
|
||||||
Lorem [ipsum][3] 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.
|
|
||||||
|
|
||||||
Read more at #[2].
|
|
||||||
```
|
|
||||||
|
|
||||||
Derived event:
|
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"kind": 30023,
|
"kind": 30023,
|
||||||
"created_at": 1000000000,
|
"created_at": 1675642635,
|
||||||
"title": "Lorem Ipsum\\n---\\n\\nLorem [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].",
|
"title": "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].",
|
||||||
"tags": [
|
"tags": [
|
||||||
["d", "lorem-ipsum"],
|
["d", "lorem-ipsum"],
|
||||||
["t", "plceholder"],
|
["title", "Lorem Ipsum"],
|
||||||
|
["published_at", "1296962229"],
|
||||||
|
["t", "placeholder"],
|
||||||
["e", "b3e392b11f5d4f28321cedd09303a748acfd0487aea5a7450b3481c60b6e4f87", "wss://relay.example.com"],
|
["e", "b3e392b11f5d4f28321cedd09303a748acfd0487aea5a7450b3481c60b6e4f87", "wss://relay.example.com"],
|
||||||
["i", "30023:a695f6b60119d9521934a691347d9f78e8770b56da16bb255ee286ddf9fda919:ipsum", "wss://relay.nostr.org"]
|
["i", "30023:a695f6b60119d9521934a691347d9f78e8770b56da16bb255ee286ddf9fda919:ipsum", "wss://relay.nostr.org"]
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in New Issue
Block a user