In SilverBullet, you can create links to pages or documents inside your space as well as to external resources, using different link formats.
Internal links
- Absolute internal links (also called wikilinks) use the
[[page]]syntax. An alias can be added like this[[page|This link points to page]]
- Relative internal links, using the
[title](<relative specifier><link>)format. The relative specifier can be used to move up the file tree (or down, if you picture a file tree like this 🌳) relative to the page the link is on, similar to POSIX file systems/../. The link has to conform to the link syntax
External links
- Markdown links, using the
[title](URL)syntax, for instance: SilverBullet community. If the URL contains a space or closing parenthesis, you can enclose the URL in angled brackets.
- “AutoLinks”, like https://community.silverbullet.md
- “Naked” URL links (AKA “Bare URLs”), like https://community.silverbullet.md
Link syntax (String refs)
The link or “string refs” has to follow some specific formatting:
- A string ref starting with
^links to a meta page, see caret page links - The “core” (After a possible
^and before a@or#) of a string ref is a name or path.- The core of a string ref can also be empty, an empty path points to the current page for links, and to the index page for
editor.navigate
- The core of a string ref can also be empty, an empty path points to the current page for links, and to the index page for
- A string ref can end three ways:
#followed by a string (which can also contain#). This will point to the header equal to that string. (Notably you can’t link to every possible header, because e.g.]]will restrict you inside a wikilink for example.), e.g. SilverBullet > Introduction
@followed by an upper or lowercaseLfollowed by a number, optionally followed by an upper or lowercaseCfollowed by a number (e.g.@l12c13). This will point to the corresponding line and column inside a page (both 1-based), e.g. CHANGELOG@L12c42@followed by a number n. This will point to the nth character in the page (0-based), e.g. CHANGELOG@123
Caret page links
Meta Page are excluded from link auto complete in many contexts. However, you may still want to reference a meta page outside of a “meta context.” To make it easier to reference, you can use the caret syntax: [[^Library/Std]]. Semantically this has the same meaning as [[LIbrary/Std]]. The only difference is that auto complete will only complete meta pages.