Skip to content
Liam Doherty edited this page Oct 18, 2021 · 1 revision

Wiki links

This script provides support for wiki-style internal links (e.g., [[link]]).

It can be used together with the backlinks and export notes as website scripts to create complex, deeply interlinked notes.

Wiki links are different from standard Markdown-style links in that they do not require using full paths, specifying file extensions, or using the full link syntax. For example, this allows you to use [[note]] as a link instead of:

[link text](/path/to/notes/note.md)

Syntax

Links are surrounded by double square brackets, and can contain either an optional "group name" (i.e., subfolder name), or optional link text after a single bar character, or any combination of these. For example:

  • [[link]]: A plain link to a note in the current folder with the filename link.md
  • [[groupname/link]]: A link to a note in a different folder (called groupname, one level up in the file system hierarchy), with the filename link.md
  • [[groupname/link|link text]]: Any of the above two link styles, plus optional link text following the | character

Known issues

  • Wiki links display correctly and are clickable in the preview panel, however they appear as plain text in the editor window for now
  • This script assumes that the note collection folder structure has all notes in subfolders (or "groups"), in other words that there are no top-level notes
    • If you do have top-level notes that are not in a subfolder, it is currently not possible to link to them from subfolders using wiki-style links
    • However, links from top-level notes to other notes in subfolders and links from top-level notes to other top-level notes should both work
Clone this wiki locally