feat(docs): improve internal links documentation

This commit is contained in:
Elian Doran 2025-04-12 11:50:26 +03:00
parent bede12f3f6
commit 08a56300b0
No known key found for this signature in database
11 changed files with 98 additions and 39 deletions

View File

@ -6100,6 +6100,13 @@
"value": "nRhnJkTT8cPs", "value": "nRhnJkTT8cPs",
"isInheritable": false, "isInheritable": false,
"position": 50 "position": 50
},
{
"type": "relation",
"name": "internalLink",
"value": "oPVyFC7WL2Lp",
"isInheritable": false,
"position": 60
} }
], ],
"format": "markdown", "format": "markdown",
@ -6114,15 +6121,7 @@
"dataFileName": "Links_image.png" "dataFileName": "Links_image.png"
}, },
{ {
"attachmentId": "74XnfiCk2y9N", "attachmentId": "4OJh3ujbwosA",
"title": "create-link-to-note.gif",
"role": "image",
"mime": "image/gif",
"position": 10,
"dataFileName": "Links_create-link-to-note.gif"
},
{
"attachmentId": "GH0rUFn6UUDY",
"title": "image.png", "title": "image.png",
"role": "image", "role": "image",
"mime": "image/png", "mime": "image/png",
@ -6130,12 +6129,20 @@
"dataFileName": "1_Links_image.png" "dataFileName": "1_Links_image.png"
}, },
{ {
"attachmentId": "w1jpXjdAuL2B", "attachmentId": "GH0rUFn6UUDY",
"title": "image.png", "title": "image.png",
"role": "image", "role": "image",
"mime": "image/png", "mime": "image/png",
"position": 10, "position": 10,
"dataFileName": "2_Links_image.png" "dataFileName": "2_Links_image.png"
},
{
"attachmentId": "w1jpXjdAuL2B",
"title": "image.png",
"role": "image",
"mime": "image/png",
"position": 10,
"dataFileName": "3_Links_image.png"
} }
] ]
}, },

Binary file not shown.

Before

Width:  |  Height:  |  Size: 363 B

After

Width:  |  Height:  |  Size: 397 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 695 B

After

Width:  |  Height:  |  Size: 363 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 695 B

View File

@ -5,7 +5,7 @@ An external link is a standard web link targeting for example a website. For exa
To create a link without a custom text: To create a link without a custom text:
* Press <img src="1_Links_image.png" width="15" height="16"> in the <a class="reference-link" href="Formatting%20toolbar.md">Formatting toolbar</a>: * Press <img src="2_Links_image.png" width="15" height="16"> in the <a class="reference-link" href="Formatting%20toolbar.md">Formatting toolbar</a>:
* A popup will appear, type or paste the URL in the box. * A popup will appear, type or paste the URL in the box.
* Press <kbd>Enter</kbd> or the check mark icon to confirm. * Press <kbd>Enter</kbd> or the check mark icon to confirm.
* Alternatively, press <kbd>Ctrl</kbd>+<kbd>K</kbd> to trigger the aforementioned popup. * Alternatively, press <kbd>Ctrl</kbd>+<kbd>K</kbd> to trigger the aforementioned popup.
@ -21,26 +21,43 @@ Once a link is inserted:
* The text inside the link can be changed if needed but the link itself will remain. * The text inside the link can be changed if needed but the link itself will remain.
* To modify the link, click on the link to display the popup and press the <img src="Links_image.png" width="18" height="18"> _Edit link_ button. * To modify the link, click on the link to display the popup and press the <img src="Links_image.png" width="18" height="18"> _Edit link_ button.
* To remove a link, click on it and press the <img src="2_Links_image.png" width="18" height="18"> _Unlink_ button. * To remove a link, click on it and press the <img src="3_Links_image.png" width="18" height="18"> _Unlink_ button.
You can follow external link by either double clicking (will open new tab/window) it or right clicking on them and choosing "Open in new tab". You can follow external link by either double clicking (will open new tab/window) it or right clicking on them and choosing "Open in new tab".
## Internal links to notes ## Internal links to notes
Links to internal notes are created a bit differently. To create link to note at current cursor position, press <kbd>Ctrl</kbd> + <kbd>L</kbd>. Unlike external notes, internal links (links to other notes) can be created at the current position by :
In the dialog you can see radio button to choose from different types of linking: 1. Pressing <kbd>Ctrl</kbd> + <kbd>L</kbd> or the <img src="1_Links_image.png" width="20" height="17"> button from the <a class="reference-link" href="Formatting%20toolbar.md">Formatting toolbar</a>.
2. Filling in the desired note to link. It's also possible to create notes from this dialog by typing a non-existing note title and selecting _Create and link child note_.
* link title mirrors the note's current title - this is sometimes also called "reference link". Title of such links cannot be changed, instead it is always mirroring the title of linked note. This way the link title is never outdated There are two link types, adjustable when creating the link to the note:
* link title can be changed arbitrarily - this is the traditional hyperlink - you link to a particular note and can choose the link title
![](Links_create-link-to-note.gif) 1. _link title mirrors the note's current title_
1. This is sometimes also called "reference link".
2. Title of such links cannot be changed, instead it is always mirroring the title of linked note.
3. The icon of the note is also displayed.
4. The link title will automatically update if the title of the note is changed.
2. _link title can be changed arbitrarily_
1. This is the traditional hyperlink, where the text of the link can be different to the note title.
You can follow the note link by double clicking it. Once an internal link is created:
Alternatively if you only wish to quickly preview the content, you can hover over the link and will see read only preview. * You can follow the note link by double clicking it.
* Alternatively if you only wish to quickly preview the content, you can hover over the link and will see read only preview.
### In-place linking ## Pasting links
* For internal links (links to notes in Trilium), press Ctrl+C in the <a class="reference-link" href="../../Basic%20Concepts%20and%20Features/UI%20Elements/Note%20Tree.md">Note Tree</a>:
* Pasting directly in a text note will create a reference link (with an icon to the note and the actual note title).
* Pasting over an existing text will create a traditional link.
* For external links:
* Paste the raw URL directly and press space to turn it into a link.
* Select a text and paste the URL over it to turn that text into a link.
* If you are pasting a formatted link (e.g. from the a webpage in a browser), simply paste it and it will keep the original text and URL.
## In-place linking
Trilium also provides "inline" linking - type `@` and you'll see an autocomplete, just type few characters from the desired note title, press enter and you have a link. Trilium also provides "inline" linking - type `@` and you'll see an autocomplete, just type few characters from the desired note title, press enter and you have a link.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 363 B

After

Width:  |  Height:  |  Size: 397 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 695 B

After

Width:  |  Height:  |  Size: 363 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 695 B

View File

@ -5,7 +5,7 @@
<p>To create a link without a custom text:</p> <p>To create a link without a custom text:</p>
<ul> <ul>
<li>Press <li>Press
<img src="1_Links_image.png" width="15" height="16">in the&nbsp;<a class="reference-link" href="#root/pOsGYCXsbNQG/KSZ04uQ2D1St/iPIMuisry3hd/_help_nRhnJkTT8cPs">Formatting toolbar</a>: <img src="2_Links_image.png" width="15" height="16">in the&nbsp;<a class="reference-link" href="#root/pOsGYCXsbNQG/KSZ04uQ2D1St/iPIMuisry3hd/_help_nRhnJkTT8cPs">Formatting toolbar</a>:
<ul> <ul>
<li>A popup will appear, type or paste the URL in the box.</li> <li>A popup will appear, type or paste the URL in the box.</li>
<li>Press <kbd>Enter</kbd> or the check mark icon to confirm.</li> <li>Press <kbd>Enter</kbd> or the check mark icon to confirm.</li>
@ -32,31 +32,66 @@
<img <img
src="Links_image.png" width="18" height="18"> <em>Edit link</em> button.</li> src="Links_image.png" width="18" height="18"> <em>Edit link</em> button.</li>
<li>To remove a link, click on it and press the <li>To remove a link, click on it and press the
<img src="2_Links_image.png" <img src="3_Links_image.png"
width="18" height="18"> <em>Unlink</em> button.</li> width="18" height="18"> <em>Unlink</em> button.</li>
</ul> </ul>
<p>You can follow external link by either double clicking (will open new <p>You can follow external link by either double clicking (will open new
tab/window) it or right clicking on them and choosing "Open in new tab".</p> tab/window) it or right clicking on them and choosing "Open in new tab".</p>
<h2>Internal links to notes</h2> <h2>Internal links to notes</h2>
<p>Links to internal notes are created a bit differently. To create link <p>Unlike external notes, internal links (links to other notes) can be created
to note at current cursor position, press <kbd>Ctrl</kbd> + <kbd>L</kbd>.</p> at the current position by :</p>
<p>In the dialog you can see radio button to choose from different types <ol>
of linking:</p> <li>Pressing <kbd>Ctrl</kbd> + <kbd>L</kbd> or the
<img src="1_Links_image.png"
width="20" height="17">button from the&nbsp;<a class="reference-link" href="#root/pOsGYCXsbNQG/KSZ04uQ2D1St/iPIMuisry3hd/_help_nRhnJkTT8cPs">Formatting toolbar</a>.</li>
<li>Filling in the desired note to link. It's also possible to create notes
from this dialog by typing a non-existing note title and selecting <em>Create and link child note</em>.</li>
</ol>
<p>There are two link types, adjustable when creating the link to the note:</p>
<ol>
<li><em>link title mirrors the note's current title</em>
<ol>
<li>This is sometimes also called "reference link".</li>
<li>Title of such links cannot be changed, instead it is always mirroring
the title of linked note.</li>
<li>The icon of the note is also displayed.</li>
<li>The link title will automatically update if the title of the note is changed.</li>
</ol>
</li>
<li><em>link title can be changed arbitrarily</em>
<ol>
<li>This is the traditional hyperlink, where the text of the link can be different
to the note title.</li>
</ol>
</li>
</ol>
<p>Once an internal link is created:</p>
<ul> <ul>
<li>link title mirrors the note's current title - this is sometimes also called <li>You can follow the note link by double clicking it.</li>
"reference link". Title of such links cannot be changed, instead it is <li>Alternatively if you only wish to quickly preview the content, you can
always mirroring the title of linked note. This way the link title is never hover over the link and will see read only preview.</li>
outdated</li>
<li>link title can be changed arbitrarily - this is the traditional hyperlink
- you link to a particular note and can choose the link title</li>
</ul> </ul>
<p> <h2>Pasting links</h2>
<img src="Links_create-link-to-note.gif"> <ul>
</p> <li>For internal links (links to notes in Trilium), press Ctrl+C in the&nbsp;
<p>You can follow the note link by double clicking it.</p> <a
<p>Alternatively if you only wish to quickly preview the content, you can class="reference-link" href="#root/pOsGYCXsbNQG/gh7bpGYxajRS/Vc8PjrjAGuOp/_help_oPVyFC7WL2Lp">Note Tree</a>:
hover over the link and will see read only preview.</p> <ul>
<h3>In-place linking</h3> <li>Pasting directly in a text note will create a reference link (with an
icon to the note and the actual note title).</li>
<li>Pasting over an existing text will create a traditional link.</li>
</ul>
</li>
<li>For external links:
<ul>
<li>Paste the raw URL directly and press space to turn it into a link.</li>
<li>Select a text and paste the URL over it to turn that text into a link.</li>
<li>If you are pasting a formatted link (e.g. from the a webpage in a browser),
simply paste it and it will keep the original text and URL.</li>
</ul>
</li>
</ul>
<h2>In-place linking</h2>
<p>Trilium also provides "inline" linking - type <code>@</code> and you'll <p>Trilium also provides "inline" linking - type <code>@</code> and you'll
see an autocomplete, just type few characters from the desired note title, see an autocomplete, just type few characters from the desired note title,
press enter and you have a link.</p> press enter and you have a link.</p>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 MiB