mirror of
https://github.com/foambubble/foam.git
synced 2026-01-14 00:18:00 -05:00
2.0 KiB
2.0 KiB
Link Reference Definitions
Introduction
When you use [[wiki-links]], the foam-vscode extension will automatically generate Markdown Link Reference Definitions at the bottom of the file. This is done to make the content of the file compatible with various Markdown tools (e.g. parsers, static site generators, VS code plugins etc), which don't support [[wiki-links]].
Example
The following example:
- [[wiki-links]]
- [[github-pages]]
...generates the following link reference definitions to the bottom of the file:
[wiki-links]: wiki-links "Wiki Links"
[github-pages]: github-pages "Github Pages"
You can open the raw markdown to see them at the bottom of this file
Specification
The three components of a link reference definition are [link-label]: link-target "Link Title"
- link label: The link text to match in the surrounding markdown document. This matches the inner bracket of the double-bracketed
[[wiki-link]]notation - link destination The target of the matched link
- Right now we generate link destinations without file extension. This is a choice, see discussion here.
- "Link Title" Optional title for link (The Foam template has a snippet of JavaScript to replace this on the website at runtime)
See [link-reference-definition-improvements] for further discussion on current problems and potential solutions.