upleb.uk

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

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--54.md30
1 files changed, 23 insertions, 7 deletions
diff --git a/54.md b/54.md
index b23e8bd..59c49b3 100644
--- a/54.md
+++ b/54.md
@@ -8,7 +8,7 @@ Wiki
8 8
9This NIP defines `kind:30818` (an _addressable event_) for descriptions (or encyclopedia entries) of particular subjects, and it's expected that multiple people will write articles about the exact same subjects, with either small variations or completely independent content. 9This NIP defines `kind:30818` (an _addressable event_) for descriptions (or encyclopedia entries) of particular subjects, and it's expected that multiple people will write articles about the exact same subjects, with either small variations or completely independent content.
10 10
11Articles are identified by lowercase, normalized ascii `d` tags. 11Articles are identified by lowercase, normalized `d` tags.
12 12
13## Articles 13## Articles
14```json 14```json
@@ -16,15 +16,30 @@ Articles are identified by lowercase, normalized ascii `d` tags.
16 "content": "A wiki is a hypertext publication collaboratively edited and managed by its own audience.", 16 "content": "A wiki is a hypertext publication collaboratively edited and managed by its own audience.",
17 "tags": [ 17 "tags": [
18 ["d", "wiki"], 18 ["d", "wiki"],
19 ["title", "Wiki"], 19 ["title", "Wiki"]
20 ] 20 ]
21} 21}
22``` 22```
23 23
24## `d` tag normalization rules 24## `d` tag normalization rules
25 25
26- Any non-letter character MUST be converted to a `-`. 26- All letters with uppercase/lowercase variants MUST be converted to lowercase.
27- All letters MUST be converted to lowercase. 27- Whitespace MUST be converted to `-`.
28- Punctuation and symbols SHOULD be removed.
29- Multiple consecutive `-` SHOULD be collapsed to a single `-`.
30- Leading and trailing `-` SHOULD be removed.
31- Non-ASCII letters (e.g., Japanese, Chinese, Arabic, Cyrillic) MUST be preserved as UTF-8.
32- Numbers MUST be preserved.
33
34For example:
35- `"Wiki Article"` → `"wiki-article"`
36- `"What's Up?"` → `"whats-up"`
37- `" Hello World "` → `"hello-world"`
38- `"Article 1"` → `"article-1"`
39- `"ウィキペディア"` → `"ウィキペディア"` (Japanese, no case change)
40- `"Ñoño"` → `"ñoño"` (Spanish, lowercased)
41- `"Москва"` → `"москва"` (Russian, lowercased)
42- `"日本語 Article"` → `"日本語-article"` (mixed scripts)
28 43
29## Content 44## Content
30 45
@@ -32,10 +47,11 @@ The `content` should be Asciidoc with two extra functionalities: **wikilinks** a
32 47
33Unlike normal Asciidoc links `http://example.com[]` that link to external webpages, wikilinks `[[]]` link to other articles in the wiki. In this case, the wiki is the entirety of Nostr. Clicking on a wikilink should cause the client to ask relays for events with `d` tags equal to the target of that wikilink. 48Unlike normal Asciidoc links `http://example.com[]` that link to external webpages, wikilinks `[[]]` link to other articles in the wiki. In this case, the wiki is the entirety of Nostr. Clicking on a wikilink should cause the client to ask relays for events with `d` tags equal to the target of that wikilink.
34 49
35Wikilinks can take these two forms: 50Wikilinks can take these forms:
36 51
37 1. `[[Target Page]]` -- in this case it will link to the page `target-page` (according to `d` tag normalization rules above) and be displayed as `Target Page`; 52 1. `[[Target Page]]` -- links to `target-page` and displays as `Target Page`;
38 2. `[[target page|see this]]` -- in this case it will link to the page `target-page`, but will be displayed as `see this`. 53 2. `[[target page|see this]]` -- links to `target-page` but displays as `see this`;
54 3. `[[日本語 Topic|Japanese Topic]]` -- links to `日本語-topic` and displays as `Japanese Topic`.
39 55
40`nostr:...` links, as per [NIP-21](21.md), should link to profiles or arbitrary Nostr events. Although it is not recommended to link to specific versions of articles -- instead the _wikilink_ syntax should be preferred, since it should be left to the reader and their client to decide what version of any given article they want to read. 56`nostr:...` links, as per [NIP-21](21.md), should link to profiles or arbitrary Nostr events. Although it is not recommended to link to specific versions of articles -- instead the _wikilink_ syntax should be preferred, since it should be left to the reader and their client to decide what version of any given article they want to read.
41 57