Zettelmarkup: Links manual manual zettelmarkup zettelstore zmk 00001004020000 00001007010000 00001007031140 00001007040300 00001007040320 00001007040350 00001007906000 00001007990000 00001012053800 00001004020000 00001007010000 00001007031140 00001007040300 00001007040320 00001007040350 00001007906000 00001007990000 00001012053800 1 (c) 2020-present by Detlef Stern 20210810155955 99999999999999 00000000000001 00001006050000 00001007040000 00001007700000 00001007770000 en EUPL-1.2-or-later 20260707141326 20260707141326 public There are two kinds of links, regardless of links to (internal) other zettel or to (external) material. Both kinds begin with two consecutive left square bracket characters ([, U+005B) and end with two consecutive right square bracket characters (], U+005D). If the content starts with more than two left square bracket characters, all but the last two will be treated as text. The first form provides some text plus the link specification, delimited by a vertical bar character (|, U+007C): [[text|linkspecification]]. The text is a sequence of inline elements. However, it should not contain links itself. The second form just provides a link specification between the square brackets. Its text is derived from the link specification, e.g. by interpreting the link specification as text: [[linkspecification]]. Link specifications The link specification for another zettel within the same Zettelstore is just the zettel identifier. To reference some content within a zettel, you can append a number sign character (#, U+0023) and the name of the mark to the zettel identifier. The resulting reference is called zettel reference. If the link specification begins with the string query:, the text following this string will be interpreted as a query expression. The resulting reference is called query reference. When this type of reference is rendered, it will typically reference a list of all zettel that fulfills the query expression. A link specification starting with one slash character (/, U+002F), or one or two full stop characters (., U+002E) followed by a slash character, will be interpreted as a local reference, called hosted reference. Such references will be interpreted relative to the web server hosting the Zettelstore. If a link specification begins with two slash characters (called based reference), it will be interpreted relative to the value of url-prefix. To specify some material outside the Zettelstore, just use a normal Uniform Resource Identifier (URI) as defined by RFC 3986. Other topics If the link references another zettel, and this zettel is not readable for the current user, e.g. because of missing access rights, then only the associated text is presented. A zettel reference to a non-existing zettel, i.e. using a legal zettel identifier that does not identify an existing zettel, the link text will be shown strikethrough. For example, [[Missing zettel|99999999999999]] will be rendered in HTML as Missing zettel. If the link text looks like a query expression, it may be parsed differently than expected. For example, [[query:role:zettel|00000000000001]] might appear to be a link with text query:role:zettel and the zettel reference 00000000000001. However, role:zettel|00000000000001 is itself a valid query expression that filters only zettel with metadata key role equal to zettel and then applies the aggregate action named 00000000000001 (a valid word). Therefore, [[query:role:zettel|00000000000001]] is interpreted as a [[linkspecification]], with no link text. If you really want to have the link text query:role:zettel and the zettel reference 00000000000001, you should change query:... to something like query\:.... Because query\: is no longer recognized as the query: prefix, everything before | is treated as the link text: [[query\:role:zettel|00000000000001]].