upleb.uk

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

summaryrefslogtreecommitdiff
path: root/54.md
diff options
context:
space:
mode:
Diffstat (limited to '54.md')
-rw-r--r--54.md22
1 files changed, 12 insertions, 10 deletions
diff --git a/54.md b/54.md
index b23e8bd..70ff769 100644
--- a/54.md
+++ b/54.md
@@ -28,16 +28,18 @@ Articles are identified by lowercase, normalized ascii `d` tags.
28 28
29## Content 29## Content
30 30
31The `content` should be Asciidoc with two extra functionalities: **wikilinks** and **nostr:...** links. 31The `content` should be [Djot](https://djot.net/) with two special functionalities:
32 32
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. 331. Links can have target URIs in NIP-21 format, like `[bob](nostr:npub1bob4npub4here4qwxek)`.
342. When a reference can't be found for a "Reference"-style link should link to the wiki article with that name instead, like a "wikilink". For example:
34 35
35Wikilinks can take these two forms: 36> a tree is a [vegetable][] that grows big.
37>
38> trees are often [green][green color], but they can also be [red][red color] as [bob][] says.
39>
40> [bob]: nostr:npub1bob4npub4here4qwxek
36 41
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`; 42In the article above, "vegetable" will link to the wiki article **"vegetable"** (with a `d` tag set to `"vegetable"`), "green" will link to the article **green color** (with `d` set to `"green-color"`), same for "red". But "bob" will link to the specified npub as in the reference.
38 2. `[[target page|see this]]` -- in this case it will link to the page `target-page`, but will be displayed as `see this`.
39
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.
41 43
42## Optional extra tags 44## Optional extra tags
43 45
@@ -87,11 +89,11 @@ This is a stronger signal of trust than a `+` reaction.
87 89
88This marker is useful when a user edits someone else's entry; if the original author includes the editor's changes and the editor doesn't want to keep/maintain an independent version, the `link` tag could effectively be a considered a "deletion" of the editor's version and putting that pubkey's WoT weight behind the original author's version. 90This marker is useful when a user edits someone else's entry; if the original author includes the editor's changes and the editor doesn't want to keep/maintain an independent version, the `link` tag could effectively be a considered a "deletion" of the editor's version and putting that pubkey's WoT weight behind the original author's version.
89 91
90## Why Asciidoc? 92## Why Djot?
91 93
92Wikitext is [garbage](nostr:nevent1qqsqt0gcggry60n72uglhuhypdlmr2dm6swjj69jex5v530gcpazlzsprpmhxue69uhhyetvv9ujumn0wdmksetjv5hxxmmdqy28wumn8ghj7un9d3shjtnyv9kh2uewd9hsygpm7rrrljungc6q0tuh5hj7ue863q73qlheu4vywtzwhx42a7j9n5ueneex) and Markdown is not powerful enough (besides being too freeform and unspecified and prone to generate incompatibilities in the future). 94Wikitext is unimplementable. Markdown and Asciidoc do not have strict specs. In Markdown every implementation has its own set of special functionalities that would cause conflict and protocol bloat, also it lacks standardized features that are good to have on encyclopaedias: subscript, superscript, description lists, math, comments and custom labeled blocks. Asciidoc, on the other hand, has all features under the sun, but its spec is so huge no one has ever implemented it, not even in JavaScript (the canonical JavaScript library that most people use is transpiled from the original in Ruby).
93 95
94Asciidoc has a strict spec, multiple implementations in many languages, and support for features that are very much necessary in a wiki article, like _sidebars_, _tables_ (with rich markup inside cells), many levels of _headings_, _footnotes_, _superscript_ and _subscript_ markup and _description lists_. It is also arguably easier to read in its plaintext format than Markdown (and certainly much better than Wikitext). 96Djot is a much faster parser, made by John MacFarlane (the guy behind Pandoc) with years of experience and lessons learned behind him. The spec is well-defined and simple, and has all the features listed above, while also being basically the same as the most basic Markdown.
95 97
96## Appendix 1: Merge requests 98## Appendix 1: Merge requests
97Users can request other users to get their entries merged into someone else's entry by creating a `kind:818` event. 99Users can request other users to get their entries merged into someone else's entry by creating a `kind:818` event.