feat(docs): clarify attribute use cases

This commit is contained in:
Elian Doran 2025-04-07 12:30:37 +03:00
parent 190cff6f7e
commit ec5025d7fd
No known key found for this signature in database
8 changed files with 48 additions and 46 deletions

View File

@ -6694,13 +6694,6 @@
"type": "text", "type": "text",
"mime": "text/markdown", "mime": "text/markdown",
"attributes": [ "attributes": [
{
"type": "relation",
"name": "internalLink",
"value": "R7abl2fc6Mxi",
"isInheritable": false,
"position": 10
},
{ {
"type": "relation", "type": "relation",
"name": "internalLink", "name": "internalLink",
@ -6990,6 +6983,13 @@
"value": "xWbu3jpNWapp", "value": "xWbu3jpNWapp",
"isInheritable": false, "isInheritable": false,
"position": 320 "position": 320
},
{
"type": "relation",
"name": "internalLink",
"value": "R7abl2fc6Mxi",
"isInheritable": false,
"position": 330
} }
], ],
"format": "markdown", "format": "markdown",

View File

@ -10,24 +10,13 @@ These attributes play a crucial role in organizing, categorising, and enhancing
## Labels ## Labels
Labels in Trilium can be used for a variety of purposes: Labels in Trilium can be used for a variety of purposes, such as storing metadata or configuring the behaviour of notes. Labels are also searchable, enhancing note retrieval.
* **Metadata**: Assign labels with optional values for categorization, such as `#year=1999`, `#genre="sci-fi"`, or `#author="Neal Stephenson"`
* **Configuration**: Labels can configure advanced features or settings
* **Scripts and Plugins**: Used to tag notes with special metadata, such as the "weight" attribute in the <a class="reference-link" href="Advanced%20Showcases/Weight%20Tracker.md">Weight Tracker</a>.
Labels are also searchable, enhancing note retrieval.
For more information, including predefined labels, see <a class="reference-link" href="Attributes/Labels.md">Labels</a>. For more information, including predefined labels, see <a class="reference-link" href="Attributes/Labels.md">Labels</a>.
## Relations ## Relations
Relations define connections between notes, similar to links. Relations define connections between notes, similar to links. These can be used for metadata and scripting purposes.
Uses:
* **Metadata Relationships**: For example, linking a book note to an author note
* **Scripting**: Attaching scripts to events or conditions related to the note
For more information, including a list of predefined relations, see <a class="reference-link" href="Attributes/Relations.md">Relations</a>. For more information, including a list of predefined relations, see <a class="reference-link" href="Attributes/Relations.md">Relations</a>.

View File

@ -1,6 +1,12 @@
# Labels # Labels
A label is an [attribute](../Attributes.md) of a note which has a name and optionally a value.  A label is an [attribute](../Attributes.md) of a note which has a name and optionally a value. 
## Common use cases
* **Metadata**: Assign labels with optional values for categorization, such as `#year=1999`, `#genre="sci-fi"`, or `#author="Neal Stephenson"`.
* **Configuration**: Labels can configure advanced features or settings (see reference below).
* **Scripts and Plugins**: Used to tag notes with special metadata, such as the "weight" attribute in the <a class="reference-link" href="../Advanced%20Showcases/Weight%20Tracker.md">Weight Tracker</a>.
## Creating a label using the visual editor ## Creating a label using the visual editor
1. Go to the _Owned Attributes_ section in the <a class="reference-link" href="../../Basic%20Concepts%20and%20Features/UI%20Elements/Ribbon.md">Ribbon</a>. 1. Go to the _Owned Attributes_ section in the <a class="reference-link" href="../../Basic%20Concepts%20and%20Features/UI%20Elements/Ribbon.md">Ribbon</a>.

View File

@ -1,6 +1,11 @@
# Relations # Relations
A relation is similar to a [label](Labels.md), but instead of having a text value it refers to another note. A relation is similar to a [label](Labels.md), but instead of having a text value it refers to another note.
## Common use cases
* **Metadata Relationships**: For example, linking a book note to an author note.
* **Scripting**: Attaching scripts to events or conditions related to the note.
## Creating a relation using the visual editor ## Creating a relation using the visual editor
1. Go to the _Owned Attributes_ section in the <a class="reference-link" href="../../Basic%20Concepts%20and%20Features/UI%20Elements/Ribbon.md">Ribbon</a>. 1. Go to the _Owned Attributes_ section in the <a class="reference-link" href="../../Basic%20Concepts%20and%20Features/UI%20Elements/Ribbon.md">Ribbon</a>.

View File

@ -6694,13 +6694,6 @@
"type": "text", "type": "text",
"mime": "text/markdown", "mime": "text/markdown",
"attributes": [ "attributes": [
{
"type": "relation",
"name": "internalLink",
"value": "R7abl2fc6Mxi",
"isInheritable": false,
"position": 10
},
{ {
"type": "relation", "type": "relation",
"name": "internalLink", "name": "internalLink",
@ -6990,6 +6983,13 @@
"value": "xWbu3jpNWapp", "value": "xWbu3jpNWapp",
"isInheritable": false, "isInheritable": false,
"position": 320 "position": 320
},
{
"type": "relation",
"name": "internalLink",
"value": "R7abl2fc6Mxi",
"isInheritable": false,
"position": 330
} }
], ],
"format": "html", "format": "html",

View File

@ -28,28 +28,14 @@
height="146"> height="146">
</figure> </figure>
<h2>Labels</h2> <h2>Labels</h2>
<p>Labels in Trilium can be used for a variety of purposes:</p> <p>Labels in Trilium can be used for a variety of purposes, such as storing
<ul> metadata or configuring the behaviour of notes. Labels are also searchable,
<li><strong>Metadata</strong>: Assign labels with optional values for categorization, enhancing note retrieval.</p>
such as <code>#year=1999</code>, <code>#genre="sci-fi"</code>, or <code>#author="Neal Stephenson"</code>
</li>
<li><strong>Configuration</strong>: Labels can configure advanced features
or settings</li>
<li><strong>Scripts and Plugins</strong>: Used to tag notes with special metadata,
such as the "weight" attribute in the&nbsp;<a class="reference-link" href="Advanced%20Showcases/Weight%20Tracker.html">Weight Tracker</a>.</li>
</ul>
<p>Labels are also searchable, enhancing note retrieval.</p>
<p>For more information, including predefined labels, see&nbsp;<a class="reference-link" <p>For more information, including predefined labels, see&nbsp;<a class="reference-link"
href="Attributes/Labels.html">Labels</a>.</p> href="Attributes/Labels.html">Labels</a>.</p>
<h2>Relations</h2> <h2>Relations</h2>
<p>Relations define connections between notes, similar to links.</p> <p>Relations define connections between notes, similar to links. These can
<p>Uses:</p> be used for metadata and scripting purposes.</p>
<ul>
<li><strong>Metadata Relationships</strong>: For example, linking a book note
to an author note</li>
<li><strong>Scripting</strong>: Attaching scripts to events or conditions
related to the note</li>
</ul>
<p>For more information, including a list of predefined relations, see&nbsp; <p>For more information, including a list of predefined relations, see&nbsp;
<a <a
class="reference-link" href="Attributes/Relations.html">Relations</a>.</p> class="reference-link" href="Attributes/Relations.html">Relations</a>.</p>

View File

@ -15,6 +15,15 @@
<div class="ck-content"> <div class="ck-content">
<p>A label is an <a href="../Attributes.html">attribute</a> of a note which <p>A label is an <a href="../Attributes.html">attribute</a> of a note which
has a name and optionally a value.&nbsp;</p> has a name and optionally a value.&nbsp;</p>
<h2>Common use cases</h2>
<ul>
<li><strong>Metadata</strong>: Assign labels with optional values for categorization,
such as <code>#year=1999</code>, <code>#genre="sci-fi"</code>, or <code>#author="Neal Stephenson"</code>.</li>
<li><strong>Configuration</strong>: Labels can configure advanced features
or settings (see reference below).</li>
<li><strong>Scripts and Plugins</strong>: Used to tag notes with special metadata,
such as the "weight" attribute in the&nbsp;<a class="reference-link" href="../Advanced%20Showcases/Weight%20Tracker.html">Weight Tracker</a>.</li>
</ul>
<h2>Creating a label using the visual editor</h2> <h2>Creating a label using the visual editor</h2>
<ol> <ol>
<li>Go to the <em>Owned Attributes</em> section in the&nbsp;<a class="reference-link" <li>Go to the <em>Owned Attributes</em> section in the&nbsp;<a class="reference-link"

View File

@ -15,6 +15,13 @@
<div class="ck-content"> <div class="ck-content">
<p>A relation is similar to a <a href="Labels.html">label</a>, but instead <p>A relation is similar to a <a href="Labels.html">label</a>, but instead
of having a text value it refers to another note.</p> of having a text value it refers to another note.</p>
<h2>Common use cases</h2>
<ul>
<li><strong>Metadata Relationships</strong>: For example, linking a book note
to an author note.</li>
<li><strong>Scripting</strong>: Attaching scripts to events or conditions
related to the note.</li>
</ul>
<h2>Creating a relation using the visual editor</h2> <h2>Creating a relation using the visual editor</h2>
<ol> <ol>
<li>Go to the <em>Owned Attributes</em> section in the&nbsp;<a class="reference-link" <li>Go to the <em>Owned Attributes</em> section in the&nbsp;<a class="reference-link"