Merge remote-tracking branch 'origin/main' into feat/improve-docs-take1

This commit is contained in:
Elian Doran
2025-12-09 18:45:09 +02:00
1975 changed files with 113635 additions and 54809 deletions

View File

Before

Width:  |  Height:  |  Size: 168 KiB

After

Width:  |  Height:  |  Size: 168 KiB

View File

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 43 KiB

View File

Before

Width:  |  Height:  |  Size: 172 KiB

After

Width:  |  Height:  |  Size: 172 KiB

View File

Before

Width:  |  Height:  |  Size: 167 KiB

After

Width:  |  Height:  |  Size: 167 KiB

View File

Before

Width:  |  Height:  |  Size: 237 KiB

After

Width:  |  Height:  |  Size: 237 KiB

View File

Before

Width:  |  Height:  |  Size: 202 KiB

After

Width:  |  Height:  |  Size: 202 KiB

View File

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 49 KiB

View File

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 80 KiB

View File

Before

Width:  |  Height:  |  Size: 191 KiB

After

Width:  |  Height:  |  Size: 191 KiB

View File

@@ -1,5 +1,5 @@
# Introduction
<figure class="image image_resized" style="width:63.68%;"><img style="aspect-ratio:1363/1364;" src="Introduction_image.png" width="1363" height="1364"><figcaption>An example chat with an LLM</figcaption></figure>
# AI
<figure class="image image_resized" style="width:63.68%;"><img style="aspect-ratio:1363/1364;" src="AI_image.png" width="1363" height="1364"><figcaption>An example chat with an LLM</figcaption></figure>
The AI / LLM features within Trilium Notes are designed to allow you to interact with your Notes in a variety of ways, using as many of the major providers as we can support. 
@@ -7,11 +7,11 @@ In addition to being able to send chats to LLM providers such as OpenAI, Anthrop
The quickest way to get started is to navigate to the “AI/LLM” settings:
<figure class="image image_resized" style="width:74.04%;"><img style="aspect-ratio:1916/1906;" src="5_Introduction_image.png" width="1916" height="1906"></figure>
<figure class="image image_resized" style="width:74.04%;"><img style="aspect-ratio:1916/1906;" src="5_AI_image.png" width="1916" height="1906"></figure>
Enable the feature:
<figure class="image image_resized" style="width:82.82%;"><img style="aspect-ratio:1911/997;" src="1_Introduction_image.png" width="1911" height="997"></figure>
<figure class="image image_resized" style="width:82.82%;"><img style="aspect-ratio:1911/997;" src="1_AI_image.png" width="1911" height="997"></figure>
## Embeddings
@@ -19,25 +19,25 @@ Enable the feature:
You will then need to set up the AI “provider” that you wish to use to create the embeddings for your Notes. Currently OpenAI, Voyage AI, and Ollama are supported providers for embedding generation.
In the following example, we're going to use our self-hosted Ollama instance to create the embeddings for our Notes. You can see additional documentation about installing your own Ollama locally in <a class="reference-link" href="AI%20Provider%20Information/Ollama/Installing%20Ollama.md">Installing Ollama</a>.
In the following example, we're going to use our self-hosted Ollama instance to create the embeddings for our Notes. You can see additional documentation about installing your own Ollama locally in <a class="reference-link" href="AI/Providers/Ollama/Installing%20Ollama.md">Installing Ollama</a>.
To see what embedding models Ollama has available, you can check out [this search](https://ollama.com/search?c=embedding)on their website, and then `pull` whichever one you want to try out. As of 4/15/25, my personal favorite is `mxbai-embed-large`.
To see what embedding models Ollama has available, you can check out [this search](https://ollama.com/search?c=embedding) on their website, and then `pull` whichever one you want to try out. A popular choice is `mxbai-embed-large`.
First, we'll need to select the Ollama provider from the tabs of providers, then we will enter in the Base URL for our Ollama. Since our Ollama is running on our local machine, our Base URL is `http://localhost:11434`. We will then hit the “refresh” button to have it fetch our models:
<figure class="image image_resized" style="width:82.28%;"><img style="aspect-ratio:1912/1075;" src="4_Introduction_image.png" width="1912" height="1075"></figure>
<figure class="image image_resized" style="width:82.28%;"><img style="aspect-ratio:1912/1075;" src="4_AI_image.png" width="1912" height="1075"></figure>
When selecting the dropdown for the “Embedding Model”, embedding models should be at the top of the list, separated by regular chat models with a horizontal line, as seen below:
<figure class="image image_resized" style="width:61.73%;"><img style="aspect-ratio:1232/959;" src="8_Introduction_image.png" width="1232" height="959"></figure>
<figure class="image image_resized" style="width:61.73%;"><img style="aspect-ratio:1232/959;" src="8_AI_image.png" width="1232" height="959"></figure>
After selecting an embedding model, embeddings should automatically begin to be generated by checking the embedding statistics at the top of the “AI/LLM” settings panel:
<figure class="image image_resized" style="width:67.06%;"><img style="aspect-ratio:1333/499;" src="7_Introduction_image.png" width="1333" height="499"></figure>
<figure class="image image_resized" style="width:67.06%;"><img style="aspect-ratio:1333/499;" src="7_AI_image.png" width="1333" height="499"></figure>
If you don't see any embeddings being created, you will want to scroll to the bottom of the settings, and hit “Recreate All Embeddings”:
<figure class="image image_resized" style="width:65.69%;"><img style="aspect-ratio:1337/1490;" src="3_Introduction_image.png" width="1337" height="1490"></figure>
<figure class="image image_resized" style="width:65.69%;"><img style="aspect-ratio:1337/1490;" src="3_AI_image.png" width="1337" height="1490"></figure>
Creating the embeddings will take some time, and will be regenerated when a Note is created, updated, or deleted (removed).
@@ -74,16 +74,16 @@ These are the tools that currently exist, and will certainly be updated to be mo
When Tools are executed within your Chat, you'll see output like the following:
<figure class="image image_resized" style="width:66.88%;"><img style="aspect-ratio:1372/1591;" src="6_Introduction_image.png" width="1372" height="1591"></figure>
<figure class="image image_resized" style="width:66.88%;"><img style="aspect-ratio:1372/1591;" src="6_AI_image.png" width="1372" height="1591"></figure>
You don't need to tell the LLM to execute a certain tool, it should “smartly” call tools and automatically execute them as needed.
## Overview
Now that you know about embeddings and tools, you can just go ahead and use the Chat with Notes button, where you can go ahead and start chatting!:
To start, simply press the _Chat with Notes_ button in the <a class="reference-link" href="Basic%20Concepts%20and%20Features/UI%20Elements/Launch%20Bar.md">Launch Bar</a>.
<figure class="image image_resized" style="width:60.77%;"><img style="aspect-ratio:1378/539;" src="2_Introduction_image.png" width="1378" height="539"></figure>
<figure class="image image_resized" style="width:60.77%;"><img style="aspect-ratio:1378/539;" src="2_AI_image.png" width="1378" height="539"></figure>
If you don't see the “Chat with Notes” button on your side launchbar, you might need to move it from the Available Launchers section to the Visible Launchers section:
If you don't see the button in the <a class="reference-link" href="Basic%20Concepts%20and%20Features/UI%20Elements/Launch%20Bar.md">Launch Bar</a>, you might need to move it from the _Available Launchers_ section to the _Visible Launchers_ section:
<figure class="image image_resized" style="width:69.81%;"><img style="aspect-ratio:1765/1287;" src="9_Introduction_image.png" width="1765" height="1287"></figure>
<figure class="image image_resized" style="width:69.81%;"><img style="aspect-ratio:1765/1287;" src="9_AI_image.png" width="1765" height="1287"></figure>

View File

Before

Width:  |  Height:  |  Size: 186 KiB

After

Width:  |  Height:  |  Size: 186 KiB

View File

@@ -1,15 +0,0 @@
# AI Provider Information
Currently, we support the following providers:
* <a class="reference-link" href="AI%20Provider%20Information/Ollama">Ollama</a>
* <a class="reference-link" href="AI%20Provider%20Information/OpenAI.md">OpenAI</a>
* <a class="reference-link" href="AI%20Provider%20Information/Anthropic.md">Anthropic</a>
* Voyage AI
To set your preferred chat model, you'll want to enter the provider's name here:
<figure class="image image_resized" style="width:88.38%;"><img style="aspect-ratio:1884/1267;" src="AI Provider Information_im.png" width="1884" height="1267"></figure>
And to set your preferred embedding provider:
<figure class="image image_resized" style="width:93.47%;"><img style="aspect-ratio:1907/1002;" src="1_AI Provider Information_im.png" width="1907" height="1002"></figure>

View File

@@ -0,0 +1,15 @@
# Providers
Currently, we support the following providers:
* <a class="reference-link" href="Providers/Ollama">Ollama</a>
* <a class="reference-link" href="Providers/OpenAI.md">OpenAI</a>
* <a class="reference-link" href="Providers/Anthropic.md">Anthropic</a>
* Voyage AI
To set your preferred chat model, you'll want to enter the provider's name here:
<figure class="image image_resized" style="width:88.38%;"><img style="aspect-ratio:1884/1267;" src="Providers_image.png" width="1884" height="1267"></figure>
And to set your preferred embedding provider:
<figure class="image image_resized" style="width:93.47%;"><img style="aspect-ratio:1907/1002;" src="1_Providers_image.png" width="1907" height="1002"></figure>

View File

Before

Width:  |  Height:  |  Size: 198 KiB

After

Width:  |  Height:  |  Size: 198 KiB

View File

Before

Width:  |  Height:  |  Size: 175 KiB

After

Width:  |  Height:  |  Size: 175 KiB

View File

@@ -15,7 +15,7 @@ New tasks are created in the TODO note which has `~child:template` [relation](..
### Attributes
Task template defines several [promoted attributes](../Attributes/Promoted%20Attributes.md) - todoDate, doneDate, tags, location. Importantly it also defines `~runOnAttributeChange` relation - [event](../../Scripting/Events.md) handler which is run on attribute change. This [script](../../Scripting.md) handles when e.g. we fill out the doneDate attribute - meaning the task is done and should be moved to "Done" note and removed from TODO, locations and tags.
Task template defines several [promoted attributes](../Attributes/Promoted%20Attributes.md) - todoDate, doneDate, tags, location. Importantly it also defines `~runOnAttributeChange` relation - [event](../../Scripting/Backend%20scripts/Events.md) handler which is run on attribute change. This [script](../../Scripting.md) handles when e.g. we fill out the doneDate attribute - meaning the task is done and should be moved to "Done" note and removed from TODO, locations and tags.
### New task button

View File

@@ -3,14 +3,25 @@
In Trilium, attributes are key-value pairs assigned to notes, providing additional metadata or functionality. There are two primary types of attributes:
1. <a class="reference-link" href="Attributes/Labels.md">Labels</a> 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.
1. <a class="reference-link" href="Attributes/Labels.md">Labels</a> can be used for a variety of purposes, such as storing metadata or configuring the behavior of notes. Labels are also searchable, enhancing note retrieval.
For more information, including predefined labels, see <a class="reference-link" href="Attributes/Labels.md">Labels</a>.
2. <a class="reference-link" href="Attributes/Relations.md">Relations</a> define connections between notes, similar to links. These can be used for metadata and scripting purposes.
For more information, including a list of predefined relations, see <a class="reference-link" href="Attributes/Relations.md">Relations</a>.
These attributes play a crucial role in organizing, categorising, and enhancing the functionality of notes.
These attributes play a crucial role in organizing, categorizing, and enhancing the functionality of notes.
## Types of attributes
Conceptually there are two types of attributes (applying to both labels and relations):
1. **System attributes**
As the name suggest, these attributes have a special meaning since they are interpreted by Trilium. For example the `color` attribute will change the color of the note as displayed in the <a class="reference-link" href="../Basic%20Concepts%20and%20Features/UI%20Elements/Note%20Tree.md">Note Tree</a> and links, and `iconClass` will change the icon of a note.
2. **User-defined attributes**
These are free-form labels or relations that can be used by the user. They can be used purely for categorization purposes (especially if combined with <a class="reference-link" href="../Basic%20Concepts%20and%20Features/Navigation/Search.md">Search</a>), or they can be given meaning through the use of <a class="reference-link" href="../Scripting.md">Scripting</a>.
In practice, Trilium makes no direct distinction of whether an attribute is a system one or a user-defined one. A label or relation is considered a system attribute if it matches one of the built-in names (e.g. like the aforementioned `iconClass`). Keep this in mind when creating  <a class="reference-link" href="Attributes/Promoted%20Attributes.md">Promoted Attributes</a> in order not to accidentally alter a system attribute (unless intended).
## Viewing the list of attributes
@@ -18,13 +29,13 @@ Both the labels and relations for the current note are displayed in the _Owned A
In the list of attributes, labels are prefixed with the `#` character whereas relations are prefixed with the `~` character.
## Multiplicity
Attributes in Trilium can be "multi-valued", meaning multiple attributes with the same name can co-exist.
## Attribute Definitions and Promoted Attributes
Special labels create "label/attribute" definitions, enhancing the organization and management of attributes. For more details, see <a class="reference-link" href="Attributes/Promoted%20Attributes.md">Promoted Attributes</a>.
<a class="reference-link" href="Attributes/Promoted%20Attributes.md">Promoted Attributes</a> create a form-like editing experience for attributes, which makes it easy to enhancing the organization and management of attributes
## Multiplicity
Attributes in Trilium can be "multi-valued", meaning multiple attributes with the same name can co-exist. This can be combined with <a class="reference-link" href="Attributes/Promoted%20Attributes.md">Promoted Attributes</a> to easily add them.
## Attribute Inheritance

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

File diff suppressed because one or more lines are too long

View File

@@ -1,31 +1,74 @@
# Promoted Attributes
Promoted attributes are [attributes](../Attributes.md) which are considered important and thus are "promoted" onto the main note UI. See example below:
<figure class="image image_resized" style="width:61.4%;"><img style="aspect-ratio:938/368;" src="Promoted Attributes_image.png" width="938" height="368"></figure>
![](Promoted%20Attributes_promot.png)
Promoted attributes are [attributes](../Attributes.md) which are displayed prominently in the UI which allow them to be easily viewed and edited.
You can see the note having kind of form with several fields. Each of these is just regular attribute, the only difference is that they appear on the note itself.
One way of seeing promoted attributes is as a kind of form with several fields. Each field is just regular attribute, the only difference is that they appear on the note itself.
Attributes can be pretty useful since they allow for querying and script automation etc. but they are also inconveniently hidden. This allows you to select few of the important ones and push them to the front of the user.
Now, how do we make attribute to appear on the UI?
## Attribute definition
Attribute is always name-value pair where both name and value are strings.
In order to have promoted attributes, there needs to be a way to define them.
_Attribute definition_ specifies how should this value be interpreted - is it just string, or is it a date? Should we allow multiple values or note? And importantly, should we _promote_ the attribute or not?
<figure class="image image-style-align-right image_resized" style="width:38.82%;"><img style="aspect-ratio:492/346;" src="1_Promoted Attributes_image.png" width="492" height="346"></figure>
![](Promoted%20Attributes_image.png)
Technically, attributes are only name-value pairs where both name and value are strings.
You can notice tag attribute definition. These "definition" attributes define how the "value" attributes should behave.
The _Attribute definition_ specifies how should this value be interpreted:
So there's one attribute for value and one for definition. But notice how definition attribute is [Inheritable](Attribute%20Inheritance.md), meaning that it's also applied to all descendant note. So in a way, this definition is used for the whole subtree while "value" attributes are applied only for this note.
* Is it just string, or is it a date?
* Should we allow multiple values or note?
* Should we _promote_ the attribute or not?
## Creating a new promoted attribute definition
To create a new promoted attribute:
1. Go to a note.
2. Go to _Owned Attributes_ in the <a class="reference-link" href="../../Basic%20Concepts%20and%20Features/UI%20Elements/Ribbon.md">Ribbon</a>.
3. Press the + button.
4. Select either _Add new label definition_ or _Add new relation definition_.
5. Select the name which will be name of the label or relation that will be created when the promoted attribute is edited.
6. Ensure _Promoted_ is checked in order to display it at the top of notes.
7. Optionally, choose an _Alias_ which will be displayed next to the promoted attribute instead of the attribute name. Generally it's best to choose a “user-friendly” name since it can contain spaces and other characters which are not supported as attribute names.
8. Check _Inheritable_ to apply it to this note and all its descendants. To keep it only for the current note, un-check it.
9. Press “Save & Close” to apply the changes.
## How attribute definitions actually work
When a new promoted attribute definition is created, it creates a corresponding label prefixed with either `label` or `relation`, depending on the definition type:
```
#label:myColor(inheritable)="promoted,alias=Color,multi,color"
```
The only purpose of the attribute definition is to set up a template. If the attribute was marked as promoted, then it's also displayed to the user for easy editing.
| | |
| --- | --- |
| <figure class="image"><img style="aspect-ratio:495/157;" src="2_Promoted Attributes_image.png" width="495" height="157"></figure> | Notice how the promoted attribute definition only creates a “Due date” box above the text content. |
| <figure class="image"><img style="aspect-ratio:663/160;" src="3_Promoted Attributes_image.png" width="663" height="160"></figure> | Once a value is set by the user, a new label (or relation, depending on the type) is created. The name of the attribute matches one set when creating the promoted attribute. |
So there's one attribute for value and one for definition. But notice how an definition attribute can be made [Inheritable](Attribute%20Inheritance.md), meaning that it's also applied to all descendant notes. In this case, the definition used for the whole sub-tree while "value" attributes are for each not individually.
## Using system attributes
It's possible to create promoted attributes out of system attributes, to be able to easily alter them.
Here are a few practical examples:
* <a class="reference-link" href="../../Collections.md">Collections</a> already make use of this practice, for example:
* Calendars add “Start Date”, “End Date”, “Start Time” and “End Time” as promoted attributes. These map to system attributes such as `startDate` which are then interpreted by the calendar view.
* <a class="reference-link" href="../../Collections/Presentation.md">Presentation</a> adds a “Background” promoted attribute for each of the slide to easily be able to customize.
* The Trilium documentation (which is edited in Trilium) uses a promoted attribute to be able to easily edit the `#shareAlias` (see <a class="reference-link" href="../Sharing.md">Sharing</a>) in order to form clean URLs.
* If you always edit a particular system attribute such as `#color`, simply create a promoted attribute for it to make it easier.
### Inverse relation
Some relations always occur in pairs - my favorite example is on the family. If you have a note representing husband and note representing wife, then there might be a relation between those two of `isPartnerOf`. This is bidirectional relationship - meaning that if a relation is pointing from husband to wife then there should be always another relation pointing from wife to husband.
Another example is with parent - child relationship. Again these always occur in pairs, but in this case it's not exact same relation - the one going from parent to child might be called `isParentOf` and the other one going from child to parent might be called `isChildOf`.
Another example is with parent-child relationship. Again these always occur in pairs, but in this case it's not exact same relation - the one going from parent to child might be called `isParentOf` and the other one going from child to parent might be called `isChildOf`.
Relation definition allows you to specify such "inverse relation" - for the relation you just define you specify which is the inverse relation. Note that in the second example we should have two relation definitions - one for `isParentOf` which defines `isChildOf` as inverse relation and then second relation definition for `isChildOf` which defines `isParentOf` as inverse relation.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 113 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

View File

@@ -43,12 +43,13 @@ These relations are supported and used internally by Trilium.
| Label | Description |
| --- | --- |
| `runOn*` | See <a class="reference-link" href="../../Scripting/Events.md">Events</a> |
| `runOn*` | See <a class="reference-link" href="../../Scripting/Backend%20scripts/Events.md">Events</a> |
| `template` | note's attributes will be inherited even without a parent-child relationship, note's content and subtree will be added to instance notes if empty. See documentation for details. |
| `inherit` | note's attributes will be inherited even without a parent-child relationship. See <a class="reference-link" href="../Templates.md">Templates</a> for a similar concept. See <a class="reference-link" href="Attribute%20Inheritance.md">Attribute Inheritance</a> in the documentation. |
| `renderNote` | notes of type <a class="reference-link" href="../../Note%20Types/Render%20Note.md">Render Note</a> will be rendered using a code note (HTML or script) and it is necessary to point using this relation to which note should be rendered |
| `widget_relation` | target of this relation will be executed and rendered as a widget in the sidebar |
| `shareCss` | CSS note which will be injected into the share page. CSS note must be in the shared sub-tree as well. Consider using `share_hidden_from_tree` and `share_omit_default_css` as well. |
| `shareJs` | JavaScript note which will be injected into the share page. JS note must be in the shared sub-tree as well. Consider using `share_hidden_from_tree`. |
| `shareHtml` | HTML note which will be injected into the share page at locations specified by the `shareHtmlLocation` label. HTML note must be in the shared sub-tree as well. Consider using `share_hidden_from_tree`. |
| `shareTemplate` | Embedded JavaScript note that will be used as the template for displaying the shared note. Falls back to the default template. Consider using `share_hidden_from_tree`. |
| `shareFavicon` | Favicon note to be set in the shared page. Typically you want to set it to share root and make it inheritable. Favicon note must be in the shared sub-tree as well. Consider using `share_hidden_from_tree`. |

View File

@@ -1,30 +1,169 @@
# Configuration (config.ini or environment variables)
Trilium supports configuration via a file named `config.ini` and environment variables. Please review the file named [config-sample.ini](https://github.com/TriliumNext/Trilium/blob/main/apps/server/src/assets/config-sample.ini) in the [Trilium](https://github.com/TriliumNext/Trilium) repository to see what values are supported.
Trilium supports configuration via a file named `config.ini` and environment variables. This document provides a comprehensive reference for all configuration options.
You can provide the same values via environment variables instead of the `config.ini` file, and these environment variables use the following format:
## Location of the configuration file
1. Environment variables should be prefixed with `TRILIUM_` and use underscores to represent the INI section structure.
2. The format is: `TRILIUM_<SECTION>_<KEY>=<VALUE>`
3. The environment variables will override any matching values from config.ini
The configuration file is not located in the same directory as the application. Instead, the `config.ini` is located in the <a class="reference-link" href="../Installation%20%26%20Setup/Data%20directory.md">Data directory</a>. As such, the configuration file is only available after starting the application and creating a database.
For example, if you have this in your config.ini:
## Configuration Precedence
```
[Network]
host=localhost
port=8080
Configuration values are loaded in the following order of precedence (highest to lowest):
1. **Environment variables** (checked first)
2. **config.ini file values**
3. **Default values**
## Environment Variable Patterns
Trilium supports multiple environment variable patterns for flexibility. The primary pattern is: `TRILIUM_[SECTION]_[KEY]`
Where:
* `SECTION` is the INI section name in UPPERCASE
* `KEY` is the camelCase configuration key converted to UPPERCASE (e.g., `instanceName``INSTANCENAME`)
Additionally, shorter aliases are available for common configurations (see Alternative Variables section below).
## Environment Variable Reference
### General Section
| Environment Variable | Type | Default | Description |
| --- | --- | --- | --- |
| `TRILIUM_GENERAL_INSTANCENAME` | string | "" | Instance name for API identification |
| `TRILIUM_GENERAL_NOAUTHENTICATION` | boolean | false | Disable authentication (server only) |
| `TRILIUM_GENERAL_NOBACKUP` | boolean | false | Disable automatic backups |
| `TRILIUM_GENERAL_NODESKTOPICON` | boolean | false | Disable desktop icon creation |
| `TRILIUM_GENERAL_READONLY` | boolean | false | Enable read-only mode |
### Network Section
| Environment Variable | Type | Default | Description |
| --- | --- | --- | --- |
| `TRILIUM_NETWORK_HOST` | string | "0.0.0.0" | Server host binding |
| `TRILIUM_NETWORK_PORT` | string | "3000" | Server port |
| `TRILIUM_NETWORK_HTTPS` | boolean | false | Enable HTTPS |
| `TRILIUM_NETWORK_CERTPATH` | string | "" | SSL certificate path |
| `TRILIUM_NETWORK_KEYPATH` | string | "" | SSL key path |
| `TRILIUM_NETWORK_TRUSTEDREVERSEPROXY` | boolean/string | false | Reverse proxy trust settings |
| `TRILIUM_NETWORK_CORSALLOWORIGIN` | string | "" | CORS allowed origins |
| `TRILIUM_NETWORK_CORSALLOWMETHODS` | string | "" | CORS allowed methods |
| `TRILIUM_NETWORK_CORSALLOWHEADERS` | string | "" | CORS allowed headers |
| `TRILIUM_NETWORK_CORSRESOURCEPOLICY` | string | same-origin | CORS Resource Policy allows same-origin/same-site/cross-origin as values, will error if not |
### Session Section
| Environment Variable | Type | Default | Description |
| --- | --- | --- | --- |
| `TRILIUM_SESSION_COOKIEMAXAGE` | integer | 1814400 | Session cookie max age in seconds (21 days) |
### Sync Section
| Environment Variable | Type | Default | Description |
| --- | --- | --- | --- |
| `TRILIUM_SYNC_SYNCSERVERHOST` | string | "" | Sync server host URL |
| `TRILIUM_SYNC_SYNCSERVERTIMEOUT` | string | "120000" | Sync server timeout in milliseconds |
| `TRILIUM_SYNC_SYNCPROXY` | string | "" | Sync proxy URL |
### MultiFactorAuthentication Section
| Environment Variable | Type | Default | Description |
| --- | --- | --- | --- |
| `TRILIUM_MULTIFACTORAUTHENTICATION_OAUTHBASEURL` | string | "" | OAuth/OpenID base URL |
| `TRILIUM_MULTIFACTORAUTHENTICATION_OAUTHCLIENTID` | string | "" | OAuth client ID |
| `TRILIUM_MULTIFACTORAUTHENTICATION_OAUTHCLIENTSECRET` | string | "" | OAuth client secret |
| `TRILIUM_MULTIFACTORAUTHENTICATION_OAUTHISSUERBASEURL` | string | "[https://accounts.google.com](https://accounts.google.com)" | OAuth issuer base URL |
| `TRILIUM_MULTIFACTORAUTHENTICATION_OAUTHISSUERNAME` | string | "Google" | OAuth issuer display name |
| `TRILIUM_MULTIFACTORAUTHENTICATION_OAUTHISSUERICON` | string | "" | OAuth issuer icon URL |
### Logging Section
| Environment Variable | Type | Default | Description |
| --- | --- | --- | --- |
| `TRILIUM_LOGGING_RETENTIONDAYS` | integer | 90 | Number of days to retain log files |
## Alternative Environment Variables
The following alternative environment variable names are also supported and work identically to their longer counterparts:
### Network CORS Variables
* `TRILIUM_NETWORK_CORS_ALLOW_ORIGIN` (alternative to `TRILIUM_NETWORK_CORSALLOWORIGIN`)
* `TRILIUM_NETWORK_CORS_ALLOW_METHODS` (alternative to `TRILIUM_NETWORK_CORSALLOWMETHODS`)
* `TRILIUM_NETWORK_CORS_ALLOW_HEADERS` (alternative to `TRILIUM_NETWORK_CORSALLOWHEADERS`)
* `TRILIUM_NETWORK_CORS_RESOURCE_POLICY` (alternative to `TRILIUM_NETWORK_CORSRESOURCEPOLICY`)
### Sync Variables
* `TRILIUM_SYNC_SERVER_HOST` (alternative to `TRILIUM_SYNC_SYNCSERVERHOST`)
* `TRILIUM_SYNC_SERVER_TIMEOUT` (alternative to `TRILIUM_SYNC_SYNCSERVERTIMEOUT`)
* `TRILIUM_SYNC_SERVER_PROXY` (alternative to `TRILIUM_SYNC_SYNCPROXY`)
### OAuth/MFA Variables
* `TRILIUM_OAUTH_BASE_URL` (alternative to `TRILIUM_MULTIFACTORAUTHENTICATION_OAUTHBASEURL`)
* `TRILIUM_OAUTH_CLIENT_ID` (alternative to `TRILIUM_MULTIFACTORAUTHENTICATION_OAUTHCLIENTID`)
* `TRILIUM_OAUTH_CLIENT_SECRET` (alternative to `TRILIUM_MULTIFACTORAUTHENTICATION_OAUTHCLIENTSECRET`)
* `TRILIUM_OAUTH_ISSUER_BASE_URL` (alternative to `TRILIUM_MULTIFACTORAUTHENTICATION_OAUTHISSUERBASEURL`)
* `TRILIUM_OAUTH_ISSUER_NAME` (alternative to `TRILIUM_MULTIFACTORAUTHENTICATION_OAUTHISSUERNAME`)
* `TRILIUM_OAUTH_ISSUER_ICON` (alternative to `TRILIUM_MULTIFACTORAUTHENTICATION_OAUTHISSUERICON`)
### Logging Variables
* `TRILIUM_LOGGING_RETENTION_DAYS` (alternative to `TRILIUM_LOGGING_RETENTIONDAYS`)
## Boolean Values
Boolean environment variables accept the following values:
* **True**: `"true"`, `"1"`, `1`
* **False**: `"false"`, `"0"`, `0`
* Any other value defaults to `false`
## Using Environment Variables
Both naming patterns are fully supported and can be used interchangeably:
* The longer format follows the section/key pattern for consistency with the INI file structure
* The shorter alternatives provide convenience for common configurations
* You can use whichever format you prefer - both are equally valid
## Examples
### Docker Compose Example
```yaml
services:
trilium:
image: triliumnext/trilium
environment:
# Using full format
TRILIUM_GENERAL_INSTANCENAME: "My Trilium Instance"
TRILIUM_NETWORK_PORT: "8080"
TRILIUM_NETWORK_CORSALLOWORIGIN: "https://myapp.com"
TRILIUM_SYNC_SYNCSERVERHOST: "https://sync.example.com"
TRILIUM_MULTIFACTORAUTHENTICATION_OAUTHBASEURL: "https://auth.example.com"
# Or using shorter alternatives (equally valid)
# TRILIUM_NETWORK_CORS_ALLOW_ORIGIN: "https://myapp.com"
# TRILIUM_SYNC_SERVER_HOST: "https://sync.example.com"
# TRILIUM_OAUTH_BASE_URL: "https://auth.example.com"
```
You can override these values using environment variables:
### Shell Export Example
```
TRILIUM_NETWORK_HOST=0.0.0.0
TRILIUM_NETWORK_PORT=9000
# Using either format
export TRILIUM_GENERAL_NOAUTHENTICATION=false
export TRILIUM_NETWORK_HTTPS=true
export TRILIUM_NETWORK_CERTPATH=/path/to/cert.pem
export TRILIUM_NETWORK_KEYPATH=/path/to/key.pem
export TRILIUM_LOGGING_RETENTIONDAYS=30
# Start Trilium
npm start
```
The code will:
## config.ini Reference
1. First load the `config.ini` file as before
2. Then scan all environment variables for ones starting with `TRILIUM_`
3. Parse these variables into section/key pairs
4. Merge them with the config from the file, with environment variables taking precedence
For the complete list of configuration options and their INI file format, please review the [config-sample.ini](https://github.com/TriliumNext/Trilium/blob/main/apps/server/src/assets/config-sample.ini) file in the Trilium repository

View File

@@ -14,7 +14,7 @@ const {secret, title, content} = req.body;
if (req.method == 'POST' && secret === 'secret-password') {
// notes must be saved somewhere in the tree hierarchy specified by a parent note.
// This is defined by a relation from this code note to the "target" parent note
// alternetively you can just use constant noteId for simplicity (get that from "Note Info" dialog of the desired parent note)
// alternatively you can just use constant noteId for simplicity (get that from "Note Info" dialog of the desired parent note)
const targetParentNoteId = api.currentNote.getRelationValue('targetNote');
const {note} = api.createTextNote(targetParentNoteId, title, content);
@@ -37,7 +37,7 @@ This script note has also following two attributes:
Let's test this by using an HTTP client to send a request:
```
POST http://my.trilium.org/custom/create-note
POST http://your-trilium-server/custom/create-note
Content-Type: application/json
{
@@ -70,7 +70,7 @@ For more information, see [Custom Resource Providers](Custom%20Resource%20Provi
REST request paths often contain parameters in the URL, e.g.:
```
http://my.trilium.org/custom/notes/123
http://your-trilium-server/custom/notes/123
```
The last part is dynamic so the matching of the URL must also be dynamic - for this reason the matching is done with regular expressions. Following `customRequestHandler` value would match it:
@@ -85,4 +85,4 @@ Additionally, this also defines a matching group with the use of parenthesis whi
const noteId = api.pathParams[0];
```
Often you also need query params (as in e.g. `http://my.trilium.org/custom/notes?noteId=123`), you can get those with standard express `req.query.noteId`.
Often you also need query params (as in e.g. `http://your-trilium-server/custom/notes?noteId=123`), you can get those with standard express `req.query.noteId`.

View File

@@ -1,7 +1,8 @@
# ETAPI (REST API)
ETAPI is Trilium's public/external REST API. It is available since Trilium v0.50.
> [!TIP]
> For a quick start, consult the <a class="reference-link" href="ETAPI%20(REST%20API)/API%20Reference.dat">API Reference</a>.
The documentation is in OpenAPI format, available [here](https://github.com/TriliumNext/Trilium/blob/master/src/etapi/etapi.openapi.yaml).
ETAPI is Trilium's public/external REST API. It is available since Trilium v0.50.
## API clients
@@ -61,4 +62,12 @@ Make sure to replace the values of:
* `TOKEN` with your ETAPI token.
* `SERVER` with the correct protocol, host name and port to your Trilium instance.
* `NOTE_ID` with an existing note ID to download.
* `NOTE_ID` with an existing note ID to download.
As another example, to obtain a .zip export of a note and place it in a directory called `out`, simply replace the last statement in the script with:
```
curl -H "Authorization: $TOKEN" \
-X GET "$SERVER/etapi/notes/$NOTE_ID/export" \
--output "out/$NOTE_ID.zip"
```

View File

@@ -0,0 +1,34 @@
# Nightly release
Nightly releases are versions built every day, containing the latest improvements and bugfixes, directly from the main development branch. These versions are generally useful in preparation for a release, to ensure that there are no significant bugs that need to be addressed first, or they can be used to confirm whether a particular bug is fixed or feature is well implemented.
## Regarding the stability
Despite being on a development branch, generally the main branch is pretty stable since PRs are tested before they are merged. If you notice any issues, feel free to report them either via a ticket or via the Matrix.
## Downloading the nightly release manually
Go to [github.com/TriliumNext/Trilium/releases/tag/nightly](https://github.com/TriliumNext/Trilium/releases/tag/nightly) and look for the artifacts starting with `TriliumNotes-main`. Choose the appropriate one for your platform (e.g. `windows-x64.zip`).
Depending on your use case, you can either test the portable version or even use the installer.
> [!NOTE]
> If you choose the installable version (e.g. the .exe on Windows), it will replace your stable installation.
> [!IMPORTANT]
> By default, the nightly uses the same database as the production version. Generally you could easily downgrade if needed. However, if there are changes to the database or sync version, it will not be possible to downgrade without having to restore from a backup.
## Automatically download and install the latest nightly
This is pretty useful if you are a beta tester that wants to periodically update their version:
On Ubuntu:
```
#!/usr/bin/env bash
name=TriliumNotes-linux-x64-nightly.deb
rm -f $name*
wget https://github.com/TriliumNext/Trilium/releases/download/nightly/$name
sudo apt-get install ./$name
rm $name
```

View File

@@ -10,7 +10,12 @@ There are two types of note map:
## Link Map
Shows [relations](Attributes.md) between notes:
The Link map is a visualization of links and <a class="reference-link" href="Attributes/Relations.md">Relations</a> incoming to and outgoing from a particular note.
The map indicates the following types of relations:
* <a class="reference-link" href="../Note%20Types/Text/Links/Internal%20(reference)%20links.md">Internal (reference) links</a> between notes.
* <a class="reference-link" href="Attributes/Relations.md">Relations</a>
![](1_Note%20Map%20\(Link%20map,%20Tree%20m.png)

View File

@@ -7,7 +7,7 @@ For example:
* <a class="reference-link" href="../Note%20Types/Text.md">Text</a> notes are represented internally as HTML, using the <a class="reference-link" href="Technologies%20used/CKEditor.md">CKEditor</a> representation. Note that due to the custom plugins, some HTML elements are specific to Trilium only, for example the admonitions.
* <a class="reference-link" href="../Note%20Types/Code.md">Code</a> notes are plain text and are represented internally as-is.
* <a class="reference-link" href="../Note%20Types/Collections/Geo%20Map%20View.md">Geo Map</a> notes contain only minimal information (viewport, zoom) as a JSON.
* <a class="reference-link" href="../Collections/Geo%20Map.md">Geo Map</a> notes contain only minimal information (viewport, zoom) as a JSON.
* <a class="reference-link" href="../Note%20Types/Canvas.md">Canvas</a> notes are represented as JSON, with Trilium's own information alongside with <a class="reference-link" href="Technologies%20used/Excalidraw.md">Excalidraw</a>'s internal JSON representation format.
* <a class="reference-link" href="../Note%20Types/Mind%20Map.md">Mind Map</a> notes are represented as JSON, with the internal format of <a class="reference-link" href="Technologies%20used/MindElixir.md">MindElixir</a>.
@@ -36,7 +36,7 @@ It is possible to view the source code of a note by pressing the contextual menu
The source code will be displayed in a new tab.
For some note types, such as text notes, the source code is also formatted in order to be more easily readable.
For some note types, such as text notes and JSON notes, the source code is also formatted in order to be more easily readable.
## Modifying the source code

View File

@@ -0,0 +1,32 @@
# Read-only database
> [!WARNING]
> This functionality is still in preview, expect possible issues or even the feature disappearing completely.
> Feel free to [report](../Troubleshooting/Reporting%20issues.md) any issues you might have.
The read-only database is an alternative to <a class="reference-link" href="Sharing.md">Sharing</a> notes. Although the share functionality works pretty well to publish pages to the Internet in a wiki, blog-like format it does not offer the full functionality behind Trilium (such as the advanced <a class="reference-link" href="../Basic%20Concepts%20and%20Features/Navigation/Search.md">Search</a> or the interactivity behind <a class="reference-link" href="../Collections.md">Collections</a> or the various <a class="reference-link" href="../Note%20Types.md">Note Types</a>).
When the database is in read-only mode, the Trilium application can be used as normal, but editing is disabled and changes are made in-memory only.
## What it does
* All notes are read-only, without the possibility of editing them.
* Features that would normally alter the database such as the list of recent notes are disabled.
## Limitations
* Some features might “slip through” and still end up creating a note, for example.
* However, the database is still read-only, so all modifications will be reset if the server is restarted.
* Whenever this occurs, `ERROR: read-only DB ignored` will be shown in the logs.
## Setting a database as read-only
First, make sure the database is initialized (e.g. the first set up is complete). Then modify the [config.ini](Configuration%20\(config.ini%20or%20e.md) by looking for the `[General]` section and adding a new `readOnly` field:
```
[General]
readOnly=true
```
If your server is already running, restart it to apply the changes.
Similarly, to disable read-only remove the line or set it to `false`.

View File

@@ -0,0 +1,11 @@
# Safe mode
Safe mode is triggered by setting the `TRILIUM_SAFE_MODE` environment variable to a truthy value, usually `1`.
In each artifact there is a `trilium-safe-mode.sh` (or `.bat`) script to enable it.
What it does:
* Disables `customWidget` launcher types in `app/widgets/containers/launcher.js`.
* Disables the running of `mobileStartup` or `frontendStartup` scripts.
* Displays the root note instead of the previously saved session.
* Disables the running of `backendStartup`, `hourly`, `daily` scripts and checks for the hidden subtree.

View File

@@ -16,7 +16,7 @@ Trilium allows you to share selected notes as **publicly accessible** read-only
### By note type
<table class="ck-table-resized"><colgroup><col style="width:19.92%;"><col style="width:41.66%;"><col style="width:38.42%;"></colgroup><thead><tr><th>&nbsp;</th><th>Supported features</th><th>Limitations</th></tr></thead><tbody><tr><th><a class="reference-link" href="../Note%20Types/Text.md">Text</a></th><td><ul><li>Table of contents.</li><li>Syntax highlight of code blocks, provided a language is selected (does not work if “Auto-detected” is enabled).</li><li>Rendering for math equations.</li></ul></td><td><ul><li>Including notes is not supported.</li><li>Inline Mermaid diagrams are not rendered.</li></ul></td></tr><tr><th><a class="reference-link" href="../Note%20Types/Code.md">Code</a></th><td><ul><li>Basic support (displaying the contents of the note in a monospace font).</li></ul></td><td><ul><li>No syntax highlight.</li></ul></td></tr><tr><th><a class="reference-link" href="../Note%20Types/Saved%20Search.md">Saved Search</a></th><td>Not supported.</td><td>&nbsp;</td></tr><tr><th><a class="reference-link" href="../Note%20Types/Relation%20Map.md">Relation Map</a></th><td>Not supported.</td><td>&nbsp;</td></tr><tr><th><a class="reference-link" href="../Note%20Types/Note%20Map.md">Note Map</a></th><td>Not supported.</td><td>&nbsp;</td></tr><tr><th><a class="reference-link" href="../Note%20Types/Render%20Note.md">Render Note</a></th><td>Not supported.</td><td>&nbsp;</td></tr><tr><th><a class="reference-link" href="../Note%20Types/Collections.md">Collections</a></th><td><ul><li>The child notes are displayed in a fixed format.&nbsp;</li></ul></td><td><ul><li>More advanced view types such as the calendar view are not supported.</li></ul></td></tr><tr><th><a class="reference-link" href="../Note%20Types/Mermaid%20Diagrams.md">Mermaid Diagrams</a></th><td><ul><li>The diagram is displayed as a vector image.</li></ul></td><td><ul><li>No further interaction supported.</li></ul></td></tr><tr><th><a class="reference-link" href="../Note%20Types/Canvas.md">Canvas</a></th><td><ul><li>The diagram is displayed as a vector image.</li></ul></td><td><ul><li>No further interaction supported.</li></ul></td></tr><tr><th><a class="reference-link" href="../Note%20Types/Web%20View.md">Web View</a></th><td>Not supported.</td><td>&nbsp;</td></tr><tr><th><a class="reference-link" href="../Note%20Types/Mind%20Map.md">Mind Map</a></th><td>The diagram is displayed as a vector image.</td><td><ul><li>No further interaction supported.</li></ul></td></tr><tr><th><a class="reference-link" href="../Note%20Types/Collections/Geo%20Map%20View.md">Geo Map View</a></th><td>Not supported.</td><td>&nbsp;</td></tr><tr><th><a class="reference-link" href="../Note%20Types/File.md">File</a></th><td>Basic interaction (downloading the file).</td><td><ul><li>No further interaction supported.</li></ul></td></tr></tbody></table>
<table class="ck-table-resized"><colgroup><col style="width:19.92%;"><col style="width:41.66%;"><col style="width:38.42%;"></colgroup><thead><tr><th>&nbsp;</th><th>Supported features</th><th>Limitations</th></tr></thead><tbody><tr><th><a class="reference-link" href="../Note%20Types/Text.md">Text</a></th><td><ul><li data-list-item-id="e26b4ce9ba4e9dfe224d04e0f341925ed">Table of contents.</li><li data-list-item-id="e9707fdfa2c92d66690cf932f7e647253">Syntax highlight of code blocks, provided a language is selected (does not work if “Auto-detected” is enabled).</li><li data-list-item-id="e84420a10c6d64bd107edb6e867c91d4b">Rendering for math equations.</li><li data-list-item-id="e10834dcd0619d77ae2e94d3695bedf58"><a href="../Note%20Types/Text/Include%20Note.md">Including notes</a> (only if the included notes are also shared).</li></ul></td><td><ul><li data-list-item-id="e41cc4139377f9f88d653d1eb8ca47bb4">Inline Mermaid diagrams are not rendered.</li></ul></td></tr><tr><th><a class="reference-link" href="../Note%20Types/Code.md">Code</a></th><td><ul><li data-list-item-id="e291ae6d5130677b4c99f7c3bdbe974b4">Basic support (displaying the contents of the note in a monospace font).</li></ul></td><td><ul><li data-list-item-id="e0270680bbdd7a129306e61e11691e36d">No syntax highlight.</li></ul></td></tr><tr><th><a class="reference-link" href="../Note%20Types/Saved%20Search.md">Saved Search</a></th><td>Not supported.</td><td>&nbsp;</td></tr><tr><th><a class="reference-link" href="../Note%20Types/Relation%20Map.md">Relation Map</a></th><td>Not supported.</td><td>&nbsp;</td></tr><tr><th><a class="reference-link" href="../Note%20Types/Note%20Map.md">Note Map</a></th><td>Not supported.</td><td>&nbsp;</td></tr><tr><th><a class="reference-link" href="../Note%20Types/Render%20Note.md">Render Note</a></th><td>Not supported.</td><td>&nbsp;</td></tr><tr><th><a class="reference-link" href="../Collections.md">Collections</a></th><td><ul><li data-list-item-id="ea031e1d4149eb443ace756234490c5a4">The child notes are displayed in a fixed format.&nbsp;</li></ul></td><td><ul><li data-list-item-id="ea4a9d424aec2afbaecc07bbf64b7bebd">More advanced view types such as the calendar view are not supported.</li></ul></td></tr><tr><th><a class="reference-link" href="../Note%20Types/Mermaid%20Diagrams.md">Mermaid Diagrams</a></th><td><ul><li data-list-item-id="e582d283f2b1b30cbe5ae35d8e01b2bf2">The diagram is displayed as a vector image.</li></ul></td><td><ul><li data-list-item-id="e33268686446e3c217077201bb5964364">No further interaction supported.</li></ul></td></tr><tr><th><a class="reference-link" href="../Note%20Types/Canvas.md">Canvas</a></th><td><ul><li data-list-item-id="e443dd0e97c30cb12c77e8906a71569ea">The diagram is displayed as a vector image.</li></ul></td><td><ul><li data-list-item-id="efe151ef3f3826c825416417525fb5fb2">No further interaction supported.</li></ul></td></tr><tr><th><a class="reference-link" href="../Note%20Types/Web%20View.md">Web View</a></th><td>Not supported.</td><td>&nbsp;</td></tr><tr><th><a class="reference-link" href="../Note%20Types/Mind%20Map.md">Mind Map</a></th><td>The diagram is displayed as a vector image.</td><td><ul><li data-list-item-id="ed3b4fb473042f6e32b4502d4fa11a767">No further interaction supported.</li></ul></td></tr><tr><th><a class="reference-link" href="../Collections/Geo%20Map.md">Geo Map</a></th><td>Not supported.</td><td>&nbsp;</td></tr><tr><th><a class="reference-link" href="../Note%20Types/File.md">File</a></th><td>Basic interaction (downloading the file).</td><td><ul><li data-list-item-id="ed87e836a39d127ebcbb33e9e59045afb">No further interaction supported.</li></ul></td></tr></tbody></table>
While the sharing feature is powerful, it has some limitations:
@@ -31,32 +31,34 @@ Some of these limitations may be addressed in future updates.
To use the sharing feature, you must have a <a class="reference-link" href="../Installation%20%26%20Setup/Server%20Installation.md">Server Installation</a> of Trilium. This is necessary because the notes will be hosted from the server.
## How to Share a Note
## Sharing a note
1. **Enable Sharing**: To share a note, toggle the `Shared` switch within the note's interface. Once sharing is enabled, an URL will appear, which you can click to access the shared note.
![Share Note](Sharing_share-single-note.png)
2. **Access the Shared Note**: The link provided will open the note in your browser. If your server is not configured with a public IP, the URL will refer to `localhost (127.0.0.1)`.
## Sharing a Note Subtree
## Sharing a note subtree
When you share a note, you actually share the entire subtree of notes beneath it. If the note has child notes, they will also be included in the shared content. For example, sharing the "Formatting" subtree will display a page with basic navigation for exploring all the notes within that subtree.
## Viewing All Shared Notes
## Viewing and managing shared notes
You can view a list of all shared notes by clicking on "Show Shared Notes Subtree." This allows you to manage and navigate through all the notes you have made public.
You can view a list of all shared notes by clicking on "Show Shared Notes Subtree" in the <a class="reference-link" href="../Basic%20Concepts%20and%20Features/UI%20Elements/Global%20menu.md">Global menu</a>. This allows you to manage and navigate through all the notes you have made public.
## Security Considerations
## Security considerations
Shared notes are published on the open internet and can be accessed by anyone with the URL. The URL's randomness does not provide security, so it is crucial not to share sensitive information through this feature.
* Shared notes are published on the open internet and can be accessed by anyone with the URL unless the notes are password-protected.
* The URL's randomness does not provide security, so it is crucial not to share sensitive information through this feature.
* Trilium takes precautions to protect your publicly shared instance from leaking information for non-shared notes, including opening a separate read-only connection to the <a class="reference-link" href="Database.md">Database</a>. Depending on your threat model, it might make more sense to use <a class="reference-link" href="Sharing/Exporting%20static%20HTML%20for%20web%20.md">Exporting HTML for web publishing</a> and use battle-tested web servers such as Nginx or Apache to serve static content.
### Password Protection
### Password protection
To protect shared notes with a username and password, you can use the `#shareCredentials` attribute. Add this label to the note with the format `#shareCredentials="username:password"`. To protect an entire subtree, make sure the label is [inheritable](Attributes/Attribute%20Inheritance.md).
## Advanced Sharing Options
## Advanced sharing options
### Customizing the Appearance of Shared Notes
### Customizing the appearance of shared notes
The default design should be a good starting point, but you can customize it using your own CSS:
@@ -67,6 +69,25 @@ The default design should be a good starting point, but you can customize it usi
You can inject custom JavaScript into the shared note using the `~shareJs` relation. This allows you to access note attributes or traverse the note tree using the `fetchNote()` API, which retrieves note data based on its ID.
### Adding custom HTML
You can inject custom HTML snippets into specific locations of the shared page using the `~shareHtml` relation. The HTML note should contain the raw HTML content you want to inject, and you can control where it appears by adding the `#shareHtmlLocation` label to the HTML snippet note itself.
The `#shareHtmlLocation` label accepts values in the format `location:position`:
* **Locations**: `head`, `body`, `content`
* **Positions**: `start`, `end`
For example:
* `#shareHtmlLocation=head:start` - Injects HTML at the beginning of the `<head>` section
* `#shareHtmlLocation=head:end` - Injects HTML at the end of the `<head>` section (default)
* `#shareHtmlLocation=body:start` - Injects HTML at the beginning of the `<body>` section
* `#shareHtmlLocation=content:start` - Injects HTML at the beginning of the content area
* `#shareHtmlLocation=content:end` - Injects HTML at the end of the content area
If no location is specified, the HTML will be injected at `content:end` by default.
Example:
```javascript
@@ -78,7 +99,7 @@ for (const attr of parentNote.attributes) {
}
```
### Creating Human-Readable URL Aliases
### Creating human-readable URL aliases
Shared notes typically have URLs like `http://domain.tld/share/knvU8aJy4dJ7`, where the last part is the note's ID. You can make these URLs more user-friendly by adding the `#shareAlias` label to individual notes (e.g., `#shareAlias=highlighting`). This will change the URL to `http://domain.tld/share/highlighting`.
@@ -87,23 +108,50 @@ Shared notes typically have URLs like `http://domain.tld/share/knvU8aJy4dJ7`, wh
1. Ensure that aliases are unique.
2. Using slashes (`/`) within aliases to create subpaths is not supported.
### Viewing and Managing Shared Notes
> [!TIP]
> * To easily identify pages that don't have a share alias, run a <a class="reference-link" href="../Basic%20Concepts%20and%20Features/Navigation/Search.md">Search</a> with `#!shareAlias`.
> * To be able to enter the share alias faster, consider using <a class="reference-link" href="Attributes/Promoted%20Attributes.md">Promoted Attributes</a> (for example `#label:shareAlias(inheritable)="promoted,alias=Slug,single,text"`).
All shared notes are grouped under an automatically managed "Shared Notes" section. From here, you can view, share, or unshare notes by moving or cloning them within this section.
![Shared Notes List](Sharing_shared-list.png)
### Setting a Custom Favicon
### Setting a custom favicon
To customize the favicon for your shared pages, create a relation `~shareFavicon` pointing to a file note containing the favicon (e.g., in `.ico` format).
### Sharing a Note as the Root
### Sharing a note as the root
You can designate a specific note or folder as the root of your shared content by adding the `#shareRoot` label. This note will be linked when visiting `[http://domain.tld/share](http://domain/share)`, making it easier to use Trilium as a fully-fledged website. Consider combining this with the `#shareIndex` label, which will display a list of all shared notes.
You can designate a specific note or folder as the root of your shared content by adding the `#shareRoot` label. This note will be linked when visiting `[http://domain.tld/share](http://domain/share)`, making it easier to use Trilium as a fully-fledged website.
> [!TIP]
> Consider combining this with the `#shareIndex` label, which will display a list of all shared notes.
### Displaying an index of shared notes
When accessing a share, the sub-notes will be displayed in a tree on the left. But since multiple note trees can be shared, it might be useful to display a list of all the different share trees.
To do so, create a shared text note and apply the `shareIndex` label. When viewed, the list of shared roots will be displayed at the bottom of the note.
## Attribute reference
<table><thead><tr><th>Attribute</th><th>Description</th></tr></thead><tbody><tr><td><code>shareHiddenFromTree</code></td><td>this note is hidden from left navigation tree, but still accessible with its URL</td></tr><tr><td><code>shareExternalLink</code></td><td>note will act as a link to an external website in the share tree</td></tr><tr><td><code>shareAlias</code></td><td>define an alias using which the note will be available under <code>https://your_trilium_host/share/[your_alias]</code></td></tr><tr><td><code>shareOmitDefaultCss</code></td><td>default share page CSS will be omitted. Use when you make extensive styling changes.</td></tr><tr><td><code>shareRoot</code></td><td>marks note which is served on /share root.</td></tr><tr><td><code>shareDescription</code></td><td>define text to be added to the HTML meta tag for description</td></tr><tr><td><code>shareRaw</code></td><td>Note will be served in its raw format, without HTML wrapper. See also&nbsp;<a class="reference-link" href="Sharing/Serving%20directly%20the%20content%20o.md">Serving directly the content of a note</a>&nbsp;for an alternative method without setting an attribute.</td></tr><tr><td><code>shareDisallowRobotIndexing</code></td><td><p>Indicates to web crawlers that the page should not be indexed of this note by:</p><ul><li>Setting the <code>X-Robots-Tag: noindex</code> HTTP header.</li><li>Setting the <code>noindex, follow</code> meta tag.</li></ul></td></tr><tr><td><code>shareCredentials</code></td><td>require credentials to access this shared note. Value is expected to be in format <code>username:password</code>. Don't forget to make this inheritable to apply to child-notes/images.</td></tr><tr><td><code>shareIndex</code></td><td>Note with this label will list all roots of shared notes.</td></tr></tbody></table>
<table class="ck-table-resized"><colgroup><col style="width:18.38%;"><col style="width:81.62%;"></colgroup><thead><tr><th>Attribute</th><th>Description</th></tr></thead><tbody><tr><td><code>#shareHiddenFromTree</code></td><td>this note is hidden from left navigation tree, but still accessible with its URL</td></tr><tr><td><code>#shareExternalLink</code></td><td>note will act as a link to an external website in the share tree</td></tr><tr><td><code>#shareAlias</code></td><td>define an alias using which the note will be available under <code>https://your_trilium_host/share/[your_alias]</code></td></tr><tr><td><code>#shareOmitDefaultCss</code></td><td>default share page CSS will be omitted. Use when you make extensive styling changes.</td></tr><tr><td><code>#shareRoot</code></td><td>marks note which is served on /share root.</td></tr><tr><td><code>#shareDescription</code></td><td>define text to be added to the HTML meta tag for description</td></tr><tr><td><code>#shareRaw</code></td><td>Note will be served in its raw format, without HTML wrapper. See also&nbsp;<a class="reference-link" href="Sharing/Serving%20directly%20the%20content%20o.md">Serving directly the content of a note</a>&nbsp;for an alternative method without setting an attribute.</td></tr><tr><td><code>#shareDisallowRobotIndexing</code></td><td><p>Indicates to web crawlers that the page should not be indexed of this note by:</p><ul><li data-list-item-id="e6baa9f60bf59d085fd31aa2cce07a0e7">Setting the <code>X-Robots-Tag: noindex</code> HTTP header.</li><li data-list-item-id="ec0d067db136ef9794e4f1033405880b7">Setting the <code>noindex, follow</code> meta tag.</li></ul></td></tr><tr><td><code>#shareCredentials</code></td><td>require credentials to access this shared note. Value is expected to be in format <code>username:password</code>. Don't forget to make this inheritable to apply to child-notes/images.</td></tr><tr><td><code>#shareIndex</code></td><td>Note with this label will list all roots of shared notes.</td></tr><tr><td><code>#shareHtmlLocation</code></td><td>defines where custom HTML injected via <code>~shareHtml</code> relation should be placed. Applied to the HTML snippet note itself. Format: <code>location:position</code> where location is <code>head</code>, <code>body</code>, or <code>content</code> and position is <code>start</code> or <code>end</code>. Defaults to <code>content:end</code>.</td></tr></tbody></table>
### Customizing logo
It's possible to adjust the logo which is displayed on the top-left of the left pane.
| Attribute | Description |
| --- | --- |
| `~shareLogo` | Relation set to an image to use as logo. The image must be part of the share tree (it can be hidden if needed). |
| `#shareLogoWidth` | The width (in pixels, without unit) to set for the logo. Default is `53`. |
| `#shareLogoHeight` | The height (in pixels, without unit) to set for the logo. Default is `40`. |
| `#shareRootLink` | URL to navigate to when the logo is pressed. |
### Customizing OpenGraph
| Attribute | Description |
| --- | --- |
| `#shareOpenGraphColor` | This adjusts the `theme-color` meta-property. |
| `#shareOpenGraphURL` | This adjusts the `og:url` and `twitter:url` meta-properties. |
| `#shareOpenGraphDomain` | Adjusts the `twitter:domain` meta-property. |
| `#shareOpenGraphImage` <br>`~shareOpenGraphImage` | Can be either a label, case in which the value is passed on as-is, or it can be a relation to an image <a class="reference-link" href="../Note%20Types/File.md">File</a>. This controls the `og:image` meta-property. |
## Credits

View File

@@ -0,0 +1,49 @@
# Exporting static HTML for web publishing
As described in <a class="reference-link" href="../Sharing.md">Sharing</a>, Trilium can act as a public server in which the shared notes are displayed in read-only mode. While this can work in most cases, it's generally not meant for high-traffic websites and since it's running on a Node.js server it can be potentially exploited.
Another alternative is to generate static HTML files (just like other static site generators such as [MkDocs](https://www.mkdocs.org/)). Since the normal HTML ZIP export does not contain any styling or additional functionality, Trilium provides a way to export the same layout and style as the <a class="reference-link" href="../Sharing.md">Sharing</a> function into static HTML files.
Apart from the enhanced security, these HTML files are also easy to deploy on “serverless” deployments such as GitHub Pages or CloudFlare Pages and cache very easily.
> [!TIP]
> Trilium's documentation, available at [docs.triliumnotes.org](https://docs.triliumnotes.org/) is built using this function of exporting to static HTML files which are then deployed automatically to CloudFlare Pages.
>
> The process is [automated](https://github.com/TriliumNext/Trilium/blob/main/apps/edit-docs/src/build-docs.ts) by importing the Markdown documentation and exporting it via a script to the static web format.
## Differences from normal sharing
Apart from normal <a class="reference-link" href="../Sharing.md">Sharing</a>, exporting to static HTML files comes with a few subtle differences:
* The URL structure is different. Where in normal sharing it's something along the way of `example.com/share/noteid`, the notes follow an hierarchical structure, such as `docs.triliumnotes.org/user-guide/concepts/navigation/tree-concepts`.
* The `favicon.ico` is not handled automatically, it needs to be manually added on the server after the export is generated.
* The “Last updated” for notes is not available.
* The search functionality works slightly different since the normal one requires an active API to work. In the static export, search still works but uses a different mechanism so results might be different.
## Differences from normal .zip export
* The name of the files/URLs will prefer `shareAlias` to allow for clean URLs.
* The export requires a functional web server as the pages will not render properly if accessed locally via a web browser due to the use of module scripts.
* The directory structure is also slightly different:
* A normal HTML export results in an index file and a single directory.
* Instead, for static exporting the top-root level becomes the index file and the child directories are on the root instead.
* This makes it possible to easily publish to a website, without forcing everything but the root note to be in a sub-directory.
## Testing locally
As mentioned previously, the exported static pages require a website to function. In order to test locally, a web server needs to be used.
One example is to use the Node.js-based [`http-server`](https://www.npmjs.com/package/http-server) which can be installed via:
```
npm i -g http-server
```
Once installed simply:
1. Extract the exported .zip file.
2. Inside the extracted directory, run `http-server`.
3. Access the indicated address (e.g. [http://localhost:8080](http://localhost:8080)).
## Automation
<a class="reference-link" href="../ETAPI%20(REST%20API).md">ETAPI (REST API)</a> could potentially be used to automate an export on a scheduled task.

View File

@@ -0,0 +1,18 @@
# Reverse proxy configuration
It might be desirable to only expose the share functionality of Trilium to the Internet, and keep the application accessible only within a local network or via VPN.
To do so, a reverse proxy is required.
## Caddy
```
http://domain.com {
reverse_proxy /share http://localhost:8080/share
}
```
This is for newer versions where the share functionality is isolated, for older versions it's required to also include `/assets`.<sup><a href="#fn2b8mg20aol8">[1]</a></sup>
1. <sup><strong><a href="#fnref2b8mg20aol8">^</a></strong></sup>
[https://github.com/orgs/TriliumNext/discussions/7341#discussioncomment-14679897](https://github.com/orgs/TriliumNext/discussions/7341#discussioncomment-14679897)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.7 KiB

View File

@@ -1,5 +1,5 @@
# Leaflet
Leaflet is the library behind [Geo map](../../Note%20Types/Collections/Geo%20Map%20View.md) notes.
Leaflet is the library behind [Geo map](../../Collections/Geo%20Map.md) notes.
## Plugins

View File

@@ -0,0 +1,15 @@
# Import & Export
Trilium natively supports the following formats for both import and export.
* HTML:
* This is the main format used by Trilium, where standard tags are used to represent basic formatting and layout (e.g. `<strong>`, `<table>`, `<pre>`).
* Note that HTML is not a standardized format so some more specific features such as admonitions or <a class="reference-link" href="../Note%20Types/Text/Links/Internal%20(reference)%20links.md">Internal (reference) links</a> might not be supported by other applications.
* <a class="reference-link" href="Import%20%26%20Export/Markdown.md">Markdown</a>
* Most of the formatting is preserved, see <a class="reference-link" href="Import%20%26%20Export/Markdown/Supported%20syntax.md">Supported syntax</a>.
* OPML (Outliner Interchange Format)
* Supports both OPML v1.0 for plain text and v2.0 with HTML support.
To import from other applications, see the dedicated pages:
* <a class="reference-link" href="Import%20%26%20Export/Evernote.md">Evernote</a>
* <a class="reference-link" href="Import%20%26%20Export/OneNote.md">OneNote</a>

View File

@@ -3,49 +3,38 @@ This is supposed to be a complete list of keyboard shortcuts. Note that some of
It is also possible to configure most keyboard shortcuts in Options -> Keyboard shortcuts. Using `global:` prefix, you can assign a shortcut which will work even without Trilium being in focus (requires app restart to take effect).
## Tree
See the corresponding section: <a class="reference-link" href="UI%20Elements/Note%20Tree/Keyboard%20shortcuts.md">Keyboard shortcuts</a>
## Note navigation
* <kbd><span>↑</span></kbd>, <kbd><span></span></kbd> - go up/down in the list of notes, <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd><span></span></kbd> and <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd><span>↓</span></kbd>  work also from editor
* <kbd><span>←</span></kbd>, <kbd><span>→</span></kbd> - collapse/expand node
* <kbd>Alt</kbd> + <kbd><span>←</span></kbd>, <kbd>Alt</kbd> + <kbd><span>→</span></kbd> - go back / forwards in the history
* <kbd>Ctrl</kbd> + <kbd>J</kbd> - show ["Jump to" dialog](Navigation/Note%20Navigation.md)
* <kbd>Ctrl</kbd> + <kbd>.</kbd> - scroll to current note (useful when you scroll away from your note or your focus is currently in the editor)
* <kbd><span>Backspace</span></kbd> - jumps to parent note
* <kbd>Alt</kbd> + <kbd>C</kbd> - collapse whole note tree
* <kbd>Alt</kbd> + <kbd>-</kbd> (alt with minus sign) - collapse subtree (if some subtree takes too much space on tree pane you can collapse it)
* <kbd>Alt</kbd> + <kbd><span></span></kbd>, <kbd>Alt</kbd> + <kbd><span></span></kbd> go back / forwards in the history
* <kbd>Ctrl</kbd> + <kbd>J</kbd> show ["Jump to" dialog](Navigation/Note%20Navigation.md)
* <kbd>Ctrl</kbd> + <kbd>.</kbd> scroll to current note (useful when you scroll away from your note or your focus is currently in the editor)
* <kbd><span>Backspace</span></kbd> jumps to parent note
* <kbd>Alt</kbd> + <kbd>C</kbd> collapse whole note tree
* <kbd>Alt</kbd> + <kbd>-</kbd> (alt with minus sign) collapse subtree (if some subtree takes too much space on tree pane you can collapse it)
* you can define a [label](../Advanced%20Usage/Attributes.md) `#keyboardShortcut` with e.g. value <kbd>Ctrl</kbd> + <kbd>I</kbd> . Pressing this keyboard combination will then bring you to the note on which it is defined. Note that Trilium must be reloaded/restarted (<kbd>Ctrl</kbd> + <kbd>R</kbd> ) for changes to be in effect.
See demo of some of these features in [note navigation](Navigation/Note%20Navigation.md).
## Tabs
* <kbd>Ctrl</kbd> + <kbd>🖱 Left click</kbd> - (or middle mouse click) on note link opens note in a new tab
* <kbd>Ctrl</kbd> + <kbd>🖱 Left click</kbd> (or middle mouse click) on note link opens note in a new tab
Only in desktop (electron build):
* <kbd>Ctrl</kbd> + <kbd>T</kbd> - opens empty tab
* <kbd>Ctrl</kbd> + <kbd>W</kbd> - closes active tab
* <kbd>Ctrl</kbd> + <kbd>Tab</kbd> - activates next tab
* <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>Tab</kbd> - activates previous tab
* <kbd>Ctrl</kbd> + <kbd>T</kbd> opens empty tab
* <kbd>Ctrl</kbd> + <kbd>W</kbd> closes active tab
* <kbd>Ctrl</kbd> + <kbd>Tab</kbd> activates next tab
* <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>Tab</kbd> activates previous tab
## Creating notes
* `CTRL+O` - creates new note after the current note
* `CTRL+P` - creates new sub-note into current note
* `F2` - edit [prefix](Navigation/Note%20Navigation.md) of current note clone
## Moving / cloning notes
* <kbd>Ctrl</kbd> + <kbd><span>↑</span></kbd> , Ctrl + <kbd><span>↓</span></kbd> - move note up/down in the note list
* <kbd>Ctrl</kbd> + <kbd><span>←</span></kbd> - move note up in the note tree
* <kbd>Ctrl</kbd>+<kbd><span>→</span></kbd> - move note down in the note tree
* <kbd>Shift</kbd>+<kbd><span>↑</span></kbd>, <kbd>Shift</kbd>`+`<kbd><span>↓</span></kbd> - multi-select note above/below
* <kbd>Ctrl</kbd>+<kbd>A</kbd> - select all notes in the current level
* <kbd>Shift</kbd>+<kbd>🖱 Left click</kbd> - multi select note which you clicked on
* <kbd>Ctrl</kbd>+<kbd>C</kbd> - copies current note (or current selection) into clipboard (used for [cloning](Notes/Cloning%20Notes.md)
* <kbd>Ctrl</kbd>+<kbd>X</kbd> - cuts current (or current selection) note into clipboard (used for moving notes)
* <kbd>Ctrl</kbd>+<kbd>V</kbd> - pastes note(s) as sub-note into current note (which is either move or clone depending on whether it was copied or cut into clipboard)
* <kbd>Del</kbd> - delete note / sub-tree
* <kbd>CTRL</kbd>+<kbd>O</kbd> creates new note after the current note
* <kbd>CTRL</kbd>+<kbd>P</kbd> creates new sub-note into current note
* <kbd>F2</kbd> edit <a class="reference-link" href="Notes/Cloning%20Notes/Branch%20prefix.md">Branch prefix</a> of current note clone
## Editing notes
@@ -53,22 +42,22 @@ Only in desktop (electron build):
> For keyboard shortcuts specific to <a class="reference-link" href="../Note%20Types/Text.md">Text</a> notes, refer to <a class="reference-link" href="../Note%20Types/Text/Keyboard%20shortcuts.md">Keyboard shortcuts</a> and <a class="reference-link" href="../Note%20Types/Text/Markdown-like%20formatting.md">Markdown-like formatting</a>.
* <kbd>Enter</kbd> in tree pane switches from tree pane into note title. Enter from note title switches focus to text editor. <kbd>Ctrl</kbd>+<kbd>.</kbd> switches back from editor to tree pane.
* <kbd>Ctrl</kbd>+<kbd>.</kbd> - jump away from the editor to tree pane and scroll to current note
* <kbd>Ctrl</kbd>+<kbd>.</kbd> jump away from the editor to tree pane and scroll to current note
## Runtime shortcuts
These are hooked in Electron to be similar to native browser keyboard shortcuts.
* <kbd>F5</kbd>, <kbd>Ctrl</kbd>\-<kbd>R</kbd> - reloads Trilium front-end
* <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>I</kbd> - show developer tools
* <kbd>Ctrl</kbd>+<kbd>F</kbd> - show search dialog
* <kbd>Ctrl</kbd>+<kbd>-</kbd> - zoom out
* <kbd>Ctrl</kbd>+<kbd>=</kbd> - zoom in
* <kbd>F5</kbd>, <kbd>Ctrl</kbd>+<kbd>R</kbd> reloads Trilium front-end
* <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>I</kbd> show developer tools
* <kbd>Ctrl</kbd>+<kbd>F</kbd> show search dialog
* <kbd>Ctrl</kbd>+<kbd>-</kbd> zoom out
* <kbd>Ctrl</kbd>+<kbd>=</kbd> zoom in
## Other
* <kbd>Alt</kbd>+<kbd>O</kbd> - show SQL console (use only if you know what you're doing)
* <kbd>Alt</kbd>+<kbd>M</kbd> - distraction-free mode - display only note editor, everything else is hidden
* <kbd>F11</kbd> - toggle full screen
* <kbd>Ctrl</kbd> + <kbd>S</kbd> - toggle [search](Navigation/Search.md) form in tree pane
* <kbd>Alt</kbd> +<kbd>A</kbd> - show note [attributes](../Advanced%20Usage/Attributes.md) dialog
* <kbd>Alt</kbd> + <kbd>O</kbd> show SQL console (use only if you know what you're doing)
* <kbd>Alt</kbd> + <kbd>M</kbd> distraction-free mode - display only note editor, everything else is hidden
* <kbd>F11</kbd> toggle full screen
* <kbd>Ctrl</kbd> + <kbd>S</kbd> toggle [search](Navigation/Search.md) form in tree pane
* <kbd>Alt</kbd> +<kbd>A</kbd> show note [attributes](../Advanced%20Usage/Attributes.md) dialog

View File

@@ -1,2 +0,0 @@
# Quick edit
This is a clone of a note. Go to its [primary location](../UI%20Elements/Quick%20edit.md).

View File

@@ -3,31 +3,39 @@
_Quick edit_ provides an alternative to the standard tab-based navigation and editing.
Instead of clicking on a note which switches the <a class="reference-link" href="Note%20Tree.md">Note Tree</a> to the newly selected note, or navigating between two different <a class="reference-link" href="Tabs.md">Tabs</a>, the _Quick edit_ feature opens as a popup window that can be easily dismissed.
Instead of clicking on a note which switches the <a class="reference-link" href="../UI%20Elements/Note%20Tree.md">Note Tree</a> to the newly selected note, or navigating between two different <a class="reference-link" href="../UI%20Elements/Tabs.md">Tabs</a>, the _Quick edit_ feature opens as a popup window that can be easily dismissed.
This feature is also well integrated with <a class="reference-link" href="../../Note%20Types/Collections.md">Collections</a> such as the calendar view, which makes it easy to edit entries without having to go back and forth between the child note and the calendar.
This feature is also well integrated with <a class="reference-link" href="../../Collections.md">Collections</a> such as the calendar view, which makes it easy to edit entries without having to go back and forth between the child note and the calendar.
## Feature highlights
* All note types are supported, including <a class="reference-link" href="../../Note%20Types/Collections.md">Collections</a>.
* Note that the <a class="reference-link" href="../Notes/Note%20List.md">Note List</a> will not be displayed, except for notes of type <a class="reference-link" href="../../Note%20Types/Collections.md">Collections</a>.
* All note types are supported, including <a class="reference-link" href="../../Collections.md">Collections</a>.
* Note that the <a class="reference-link" href="../Notes/Note%20List.md">Note List</a> will not be displayed, except for notes of type <a class="reference-link" href="../../Collections.md">Collections</a>.
* For <a class="reference-link" href="../../Note%20Types/Text.md">Text</a> notes, depending on user preference, both the floating and classic editors are supported. See <a class="reference-link" href="../../Note%20Types/Text/Formatting%20toolbar.md">Formatting toolbar</a>.
* The title and the note and the icon are editable, just like a normal tab.
* The <a class="reference-link" href="../../Advanced%20Usage/Attributes/Promoted%20Attributes.md">Promoted Attributes</a> are also displayed.
* This integrates well with <a class="reference-link" href="../../Note%20Types/Collections.md">Collections</a> where there are predefined attributes such as the _Start date_ and _End date_, allowing for easy editing.
* This integrates well with <a class="reference-link" href="../../Collections.md">Collections</a> where there are predefined attributes such as the _Start date_ and _End date_, allowing for easy editing.
## Accessing the quick edit
* From the <a class="reference-link" href="Note%20Tree.md">Note Tree</a>:
* From the <a class="reference-link" href="../UI%20Elements/Note%20Tree.md">Note Tree</a>:
* Right click on a note and select _Quick edit_.
* or, press <kbd>Ctrl</kbd>+<kbd>Right click</kbd> on a note.
* On <a class="reference-link" href="../../Note%20Types/Text/Links/Internal%20(reference)%20links.md">Internal (reference) links</a>:
* Right click and select _Quick edit_.
* or, press <kbd>Ctrl</kbd>+<kbd>Right click</kbd> on the link.
* On a <a class="reference-link" href="Note%20Tooltip.md">Note Tooltip</a>, press the quick edit icon.
* In <a class="reference-link" href="../../Note%20Types/Collections.md">Collections</a>:
* For <a class="reference-link" href="../../Note%20Types/Collections/Calendar%20View.md">Calendar View</a>:
* On a <a class="reference-link" href="../UI%20Elements/Note%20Tooltip.md">Note Tooltip</a>, press the quick edit icon.
* In <a class="reference-link" href="../../Collections.md">Collections</a>:
* For <a class="reference-link" href="../../Collections/Calendar.md">Calendar</a>:
* Clicking on an event will open that event for quick editing.
* If the calendar is for the <a class="reference-link" href="../../Advanced%20Usage/Advanced%20Showcases/Day%20Notes.md">Day Notes</a> root, clicking on the day number will open the popup for that day note.
* For <a class="reference-link" href="../../Note%20Types/Collections/Geo%20Map%20View.md">Geo Map View</a>:
* Clicking on a marker will open that marker, but only if the map is in read-only mode.
* For <a class="reference-link" href="../../Collections/Geo%20Map.md">Geo Map</a>:
* Clicking on a marker will open that marker, but only if the map is in read-only mode.
## Handling of read-only notes
The Quick edit feature has a unique behavior for <a class="reference-link" href="../Notes/Read-Only%20Notes.md">Read-Only Notes</a>:
* If the note is read-only due to performance reasons (auto read-only), then the note is made editable for quick editing.
* If the note has been manually set to read-only, then the note is read-only to prevent accidental change.
* In this case, the note can still be edited by on-screen instructions.

View File

@@ -3,16 +3,16 @@
The _Quick search_ function does a full-text search (that is, it searches through the content of notes and not just the title of a note) and displays the result in an easy-to-access manner.
The alternative to the quick search is the <a class="reference-link" href="Search.md">Search</a> function, which opens in a dedicated tab and has support for advanced queries.
The alternative to the quick search is the <a class="reference-link" href="Search.md">Search</a> function, which opens in a dedicated tab and has support for advanced queries.
For even faster navigation, it's possible to use <a class="reference-link" href="Jump%20to.md">Jump to Note</a> which will only search through the note titles instead of the content.
For even faster navigation, it's possible to use <a class="reference-link" href="Jump%20to.md">Jump to...</a> which will only search through the note titles instead of the content.
## Layout
Based on the <a class="reference-link" href="../UI%20Elements/Vertical%20and%20horizontal%20layout.md">Vertical and horizontal layout</a>, the quick search is placed:
Based on the <a class="reference-link" href="../UI%20Elements/Vertical%20and%20horizontal%20layout.md">Vertical and horizontal layout</a>, the quick search is placed:
* On the vertical layout, it is displayed right above the <a class="reference-link" href="../UI%20Elements/Note%20Tree.md">Note Tree</a>.
* On the horizontal layout, it is displayed in the <a class="reference-link" href="../UI%20Elements/Launch%20Bar.md">Launch Bar</a>, where it can be positioned just like any other icon.
* On the vertical layout, it is displayed right above the <a class="reference-link" href="../UI%20Elements/Note%20Tree.md">Note Tree</a>.
* On the horizontal layout, it is displayed in the <a class="reference-link" href="../UI%20Elements/Launch%20Bar.md">Launch Bar</a>, where it can be positioned just like any other icon.
## Search Features
@@ -56,4 +56,58 @@ Quick search uses progressive search:
2. **Content previews**: 200-character snippets show match context
3. **Infinite scrolling**: Additional results load on scroll
4. **Specific terms**: Specific search terms return more focused results
5. **Match locations**: Bold text indicates where matches occur
5. **Match locations**: Bold text indicates where matches occur
## Quick Search - Exact Match Operator
Quick Search now supports the exact match operator (`=`) at the beginning of your search query. This allows you to search for notes where the title or content exactly matches your search term, rather than just containing it.
### Usage
To use exact match in Quick Search:
1. Start your search query with the `=` operator
2. Follow it immediately with your search term (no space after `=`)
#### Examples
* `=example` - Finds notes with title exactly "example" or content exactly "example"
* `=Project Plan` - Finds notes with title exactly "Project Plan" or content exactly "Project Plan"
* `='hello world'` - Use quotes for multi-word exact matches
#### Comparison with Regular Search
| Query | Behavior |
| --- | --- |
| `example` | Finds all notes containing "example" anywhere in title or content |
| `=example` | Finds only notes where the title equals "example" or content equals "example" exactly |
### Technical Details
When you use the `=` operator:
* The search performs an exact match on note titles
* For note content, it looks for exact matches of the entire content
* Partial word matches are excluded
* The search is case-insensitive
### Limitations
* The `=` operator must be at the very beginning of the search query
* Spaces after `=` will treat it as a regular search
* Multiple `=` operators (like `==example`) are treated as regular text search
### Use Cases
This feature is particularly useful when:
* You know the exact title of a note
* You want to find notes with specific, complete content
* You need to distinguish between notes with similar but not identical titles
* You want to avoid false positives from partial matches
### Related Features
* For more complex exact matching queries, use the full [Search](Search.md) functionality
* For fuzzy matching (finding results despite typos), use the `~=` operator in the full search
* For partial matches with wildcards, use operators like `*=*`, `=*`, or `*=` in the full search

View File

@@ -13,7 +13,7 @@ Note search enables you to find notes by searching for text in the title, conten
To search for notes, click on the magnifying glass icon on the toolbar or press the keyboard [shortcut](../Keyboard%20Shortcuts.md).
1. Set the text to search for in the _Search string_ field.
1. Apart from searching for words ad-literam, there is also the possibility to search for attributes or properties of notes.
1. Apart from searching for words literally, there is also the possibility to search for attributes or properties of notes.
2. See the examples below for more information.
2. To limit the search to a note and its sub-children, set a note in _Ancestor_.
1. This value is also pre-filled if the search is triggered from a [hoisted note](Note%20Hoisting.md) or a [workspace](Workspaces.md).

View File

@@ -25,7 +25,7 @@ When you delete a note in Trilium, it is actually only marked for deletion (soft
Within (by default) 7 days, it is possible to undelete these soft-deleted notes - open the <a class="reference-link" href="UI%20Elements/Recent%20Changes.md">Recent Changes</a> dialog, and you will see a list of all modified notes including the deleted ones. Notes available for undeletion have a link to do so. This is kind of "trash can" functionality known from e.g. Windows.
Clicking an undelete will recover the note, it's content and attributes - note should be just as before being deleted. This action will also undelete note's children which have been deleted in the same action.
Clicking an undelete will recover the note, its content and attributes - note should be just as before being deleted. This action will also undelete note's children which have been deleted in the same action.
To be able to undelete a note, it is necessary that deleted note's parent must be undeleted (otherwise there's no place where we can undelete it to). This might become a problem when you delete more notes in succession - the solution is then undelete in the reverse order of your deletion.

View File

@@ -1,38 +0,0 @@
# Export as PDF
![](Export%20as%20PDF_image.png)
Screenshot of the note contextual menu indicating the “Export as PDF” option.
On the desktop application of Trilium it is possible to export a note as PDF. On the server or PWA (mobile), the option is not available due to technical constraints and it will be hidden.
To print a note, select the ![](1_Export%20as%20PDF_image.png) button to the right of the note and select _Export as PDF_.
Afterwards you will be prompted to select where to save the PDF file.
## Automatic opening of the file
When the PDF is exported, it is automatically opened with the system default application for easy preview.
Note that if you are using Linux with the GNOME desktop environment, sometimes the default application might seem incorrect (such as opening in GIMP). This is because it uses Gnome's “Recommended applications” list.
To solve this, you can change the recommended application for PDFs via this command line. First, list the available applications via `gio mime application/pdf` and then set the desired one. For example to use GNOME's Evince:
```
gio mime application/pdf
```
## Reporting issues with the rendering
Should you encounter any visual issues in the resulting PDF file (e.g. a table does not fit properly, there is cut off text, etc.) feel free to [report the issue](../../Troubleshooting/Reporting%20issues.md). In this case, it's best to offer a sample note (click on the ![](1_Export%20as%20PDF_image.png) button, select Export note → This note and all of its descendants → HTML in ZIP archive). Make sure not to accidentally leak any personal information.
## Landscape mode
When exporting to PDF, there are no customizable settings such as page orientation, size, etc. However, it is possible to specify a given note to be printed as a PDF in landscape mode by adding the `#printLandscape` attribute to it (see <a class="reference-link" href="../../Advanced%20Usage/Attributes.md">Attributes</a>).
## Page size
By default, the resulting PDF will be in Letter format. It is possible to adjust it to another page size via the `#printPageSize` attribute, with one of the following values: `A0`, `A1`, `A2`, `A3`, `A4`, `A5`, `A6`, `Legal`, `Letter`, `Tabloid`, `Ledger`.
## Keyboard shortcut
It's possible to trigger the export to PDF from the keyboard by going to _Keyboard shortcuts_ in <a class="reference-link" href="../UI%20Elements/Options.md">Options</a> and assigning a key combination for the `exportAsPdf` action.

View File

@@ -12,4 +12,4 @@ When a note has one or more child notes, they will be listed at the end of the n
The view types dictate how the child notes are represented. By default, the notes will be displayed in a grid, however there are also some other view types available.
Generally the view type can only be changed in a <a class="reference-link" href="../../Note%20Types/Collections.md">Collections</a> note from the <a class="reference-link" href="../UI%20Elements/Ribbon.md">Ribbon</a>, but it can also be changed manually on any type of note using the `#viewType` attribute.
Generally the view type can only be changed in a <a class="reference-link" href="../../Collections.md">Collections</a> note from the <a class="reference-link" href="../UI%20Elements/Ribbon.md">Ribbon</a>, but it can also be changed manually on any type of note using the `#viewType` attribute.

View File

@@ -0,0 +1,117 @@
# Printing & Exporting as PDF
<figure class="image"><img style="aspect-ratio:951/432;" src="Printing &amp; Exporting as PD.png" width="951" height="432"><figcaption>Screenshot of the note contextual menu indicating the “Export as PDF” option.</figcaption></figure>
## Printing
This feature allows printing of notes. It works on both the desktop client, but also on the web.
Note that not all note types are printable as of now. We do plan to increase the coverage of supported note types in the future.
To print a note, select the <img src="1_Printing &amp; Exporting as PD.png" width="29" height="31"> button to the right of the note and select _Print note_. Depending on the size and type of the note, this can take up to a few seconds. Afterwards you will be redirected to the system/browser printing dialog.
> [!NOTE]
> Printing and exporting as PDF are not perfect. Due to technical limitations, and sometimes even browser glitches the text might appear cut off in some circumstances. 
## Reporting issues with the rendering
Should you encounter any visual issues in the resulting PDF file (e.g. a table does not fit properly, there is cut off text, etc.) feel free to [report the issue](../../Troubleshooting/Reporting%20issues.md). In this case, it's best to offer a sample note (click on the <img src="1_Printing &amp; Exporting as PD.png" width="29" height="31"> button, select Export note → This note and all of its descendants → HTML in ZIP archive). Make sure not to accidentally leak any personal information.
Consider adjusting font sizes and using [page breaks](../../Note%20Types/Text/Insert%20buttons.md) to work around the layout.
## Exporting as PDF
On the desktop application of Trilium it is possible to export a note as PDF. On the server or PWA (mobile), the option is not available due to technical constraints and it will be hidden.
To print a note, select the ![](1_Printing%20&%20Exporting%20as%20PD.png) button to the right of the note and select _Export as PDF_. Afterwards you will be prompted to select where to save the PDF file.
> [!TIP]
> Although direct export as PDF is not available in the browser version of the application, it's still possible to generate a PDF by selecting the _Print_ option instead and selecting “Save to PDF” as the printer (depending on the browser). Generally, Mozilla Firefox has better printing capabilities.
### Automatic opening of the file
When the PDF is exported, it is automatically opened with the system default application for easy preview.
Note that if you are using Linux with the GNOME desktop environment, sometimes the default application might seem incorrect (such as opening in GIMP). This is because it uses Gnome's “Recommended applications” list.
To solve this, you can change the recommended application for PDFs via this command line. First, list the available applications via `gio mime application/pdf` and then set the desired one. For example to use GNOME's Evince:
```
gio mime application/pdf
```
### Customizing exporting as PDF
When exporting to PDF, there are no customizable settings such as page orientation, size. However, there are a few <a class="reference-link" href="../../Advanced%20Usage/Attributes.md">Attributes</a> to adjust some of the settings:
* To print in landscape mode instead of portrait (useful for big diagrams or slides), add `#printLandscape`.
* By default, the resulting PDF will be in Letter format. It is possible to adjust it to another page size via the `#printPageSize` attribute, with one of the following values: `A0`, `A1`, `A2`, `A3`, `A4`, `A5`, `A6`, `Legal`, `Letter`, `Tabloid`, `Ledger`.
> [!NOTE]
> These options have no effect when used with the printing feature, since the user-defined settings are used instead.
## Printing multiple notes
Since v0.100.0, it is possible to print more than one note at the time by using <a class="reference-link" href="../../Collections.md">Collections</a>:
1. First create a collection.
2. Configure it to use <a class="reference-link" href="../../Collections/List%20View.md">List View</a>.
3. Print the collection note normally.
The resulting collection will contain all the children of the collection, while maintaining the hierarchy.
## Keyboard shortcut
It's possible to trigger both printing and export as PDF from the keyboard by going to _Keyboard shortcuts_ in <a class="reference-link" href="../UI%20Elements/Options.md">Options</a> and assigning a key combination for:
* _Print Active Note_
* _Export Active Note as PDF_
## Constraints & limitations
Not all <a class="reference-link" href="../../Note%20Types.md">Note Types</a> are supported when printing, in which case the _Print_ and _Export as PDF_ options will be disabled.
* For <a class="reference-link" href="../../Note%20Types/Code.md">Code</a> notes:
* Line numbers are not printed.
* Syntax highlighting is enabled, however a default theme (Visual Studio) is enforced.
* For <a class="reference-link" href="../../Collections.md">Collections</a>, the following are supported:
* <a class="reference-link" href="../../Collections/List%20View.md">List View</a>, allowing to print multiple notes at once while preserving hierarchy (similar to a book).
* <a class="reference-link" href="../../Collections/Presentation.md">Presentation</a>, where each slide/sub-note is displayed.
* <a class="reference-link" href="../../Collections/Table.md">Table</a>, where the table is rendered in a print-friendly way.
* Tables that are too complex (especially if they have multiple columns) might not fit properly, however tables with a large number of rows are supported thanks to pagination.
* Consider printing in landscape mode, or using `#printLandscape` if exporting to PDF.
* The rest of the collections are not supported, but we plan to add support for all the collection types at some point.
* Using <a class="reference-link" href="../../Theme%20development/Custom%20app-wide%20CSS.md">Custom app-wide CSS</a> for printing is not longer supported, due to a more stable but isolated mechanism.
* We plan to introduce a new mechanism specifically for a print CSS.
## Customizing the print CSS
As an advanced use case, it's possible to customize the CSS used for printing such as adjusting the fonts, sizes or margins. Note that <a class="reference-link" href="../../Theme%20development/Custom%20app-wide%20CSS.md">Custom app-wide CSS</a> will not work for printing.
To do so:
* Create a CSS [code note](../../Note%20Types/Code.md).
* On the note being printed, apply the `~printCss` relation to point to the newly created CSS code note.
* To apply the CSS to multiple notes, consider using [inheritable attributes](../../Advanced%20Usage/Attributes/Attribute%20Inheritance.md) or <a class="reference-link" href="../../Advanced%20Usage/Templates.md">Templates</a>.
For example, to change the font of the document from the one defined by the theme or the user to a serif one:
```
body {
--main-font-family: serif !important;
--detail-font-family: var(--main-font-family) !important;
}
```
To remark:
* Multiple CSS notes can be add by using multiple `~printCss` relations.
* If the note pointing to the `printCss` doesn't have the right note type or mime type, it will be ignored.
* If migrating from a previous version where <a class="reference-link" href="../../Theme%20development/Custom%20app-wide%20CSS.md">Custom app-wide CSS</a>, there's no need for `@media print {` since the style-sheet is used only for printing.
## Under the hood
Both printing and exporting as PDF use the same mechanism: a note is rendered individually in a separate webpage that is then sent to the browser or the Electron application either for printing or exporting as PDF.
The webpage that renders a single note can actually be accessed in a web browser. For example `http://localhost:8080/#root/WWRGzqHUfRln/RRZsE9Al8AIZ?ntxId=0o4fzk` becomes `http://localhost:8080/?print#root/WWRGzqHUfRln/RRZsE9Al8AIZ`.
Accessing the print note in a web browser allows for easy debugging to understand why a particular note doesn't render well. The mechanism for rendering is similar to the one used in <a class="reference-link" href="Note%20List.md">Note List</a>.

View File

@@ -40,4 +40,4 @@ When pressed, the note will become editable but will become read-only again afte
Some note types have a special behavior based on whether the read-only mode is enabled:
* <a class="reference-link" href="../../Note%20Types/Mermaid%20Diagrams.md">Mermaid Diagrams</a> will hide the Mermaid source code and display the diagram preview in full-size. In this case, the read-only mode can be easily toggled on or off via a dedicated button in the <a class="reference-link" href="../UI%20Elements/Floating%20buttons.md">Floating buttons</a> area.
* <a class="reference-link" href="../../Note%20Types/Collections/Geo%20Map%20View.md">Geo Map View</a> will disallow all interaction that would otherwise change the map (dragging notes, adding new items).
* <a class="reference-link" href="../../Collections/Geo%20Map.md">Geo Map View</a> will disallow all interaction that would otherwise change the map (dragging notes, adding new items).

View File

@@ -56,7 +56,7 @@ Right click either the _Available launchers_ or _Visible launchers_ sections and
2. Optionally, set a `keyboardShortcut` to trigger the launcher.
3. **Custom Widget**
Allows defining a custom widget to be rendered inside the launcher. See [Widget Basics](../../Scripting/Custom%20Widgets/Widget%20Basics.md) for more information.
Allows defining a custom widget to be rendered inside the launcher. See [Widget Basics](../../Scripting/Frontend%20Basics/Custom%20Widgets/Widget%20Basics.md) for more information.
4. **Spacers**
Launchers that create some distance between other launchers for better visual distinction.

View File

@@ -10,12 +10,12 @@ The following information is displayed:
* Clicking on the title will open the note in the current tab.
* Holding <kbd>Ctrl</kbd> pressed while clicking the title will open in a new tab instead of the current one.
* A snippet of the content will be displayed as well.
* A button to [quickly edit](Quick%20edit.md) the note in a popup.
* A button to [quickly edit](../Navigation/Quick%20edit.md) the note in a popup.
The tooltip can be found in multiple places, including:
* In <a class="reference-link" href="../../Note%20Types/Text.md">Text</a> notes, when hovering over <a class="reference-link" href="../../Note%20Types/Text/Links/Internal%20(reference)%20links.md">Internal (reference) links</a> .
* <a class="reference-link" href="../../Note%20Types/Collections.md">Collections</a>:
* <a class="reference-link" href="../../Note%20Types/Collections/Geo%20Map%20View.md">Geo Map View</a>, when hovering over a marker.
* <a class="reference-link" href="../../Note%20Types/Collections/Calendar%20View.md">Calendar View</a>, when hovering over an event.
* <a class="reference-link" href="../../Note%20Types/Collections/Table%20View.md">Table View</a>, when hovering over a note title, or over a [relation](../../Advanced%20Usage/Attributes/Relations.md).
* <a class="reference-link" href="../../Collections.md">Collections</a>:
* <a class="reference-link" href="../../Collections/Geo%20Map.md">Geo Map View</a>, when hovering over a marker.
* <a class="reference-link" href="../../Collections/Calendar.md">Calendar View</a>, when hovering over an event.
* <a class="reference-link" href="../../Collections/Table.md">Table View</a>, when hovering over a note title, or over a [relation](../../Advanced%20Usage/Attributes/Relations.md).

View File

@@ -1,17 +1,36 @@
# Keyboard shortcuts
The <a class="reference-link" href="../Note%20Tree.md">Note Tree</a> comes with multiple keyboard shortcuts to make editing faster:
* Opening notes:
* <kbd>Click</kbd> to open the note in the current tab.
* <kbd>Ctrl</kbd>+<kbd>Click</kbd> or <kbd>Middle click</kbd> to open the note in a new tab.
* <kbd>Ctrl</kbd>+<kbd>Right click</kbd> to open the note in <a class="reference-link" href="../Quick%20edit.md">Quick edit</a>.
* Navigation within the tree:
* <kbd>Up</kbd> and <kbd>Down</kbd> to navigate between notes.
* <kbd>Left</kbd> to collapse a note, or <kbd>Right</kbd> to expand it.
* Clipboard management:
* <kbd>Ctrl</kbd>+<kbd>C</kbd> to copy a note.
* <kbd>Ctrl</kbd>+<kbd>X</kbd> to cut a note.
* <kbd>Ctrl</kbd>+<kbd>V</kbd> to paste it somewhere.
* For <a class="reference-link" href="Multiple%20selection.md">Multiple selection</a>:
* <kbd>Alt</kbd>+<kbd>Click</kbd>to add a single note to the current selection.
* <kbd>Shift</kbd>+<kbd>Click</kbd>to select a range of notes, starting from the current note (the highlighted one) to the one that is being clicked.
## Navigation within the tree
* <kbd><span>↑</span></kbd> and <kbd><span>↑</span></kbd> to navigate between notes.
* <kbd><span>←</span></kbd> to collapse a note with children, or <kbd><span>→</span></kbd> to expand it.
* <kbd><span>←</span></kbd> on a note with no children to navigate to its parent.
## Opening notes
* <kbd>Click</kbd> to open the note in the current tab.
* <kbd>Ctrl</kbd>+<kbd>Click</kbd> or <kbd>Middle click</kbd> to open the note in a new tab.
* <kbd>Ctrl</kbd>+<kbd>Right click</kbd> to open the note in <a class="reference-link" href="../../Navigation/Quick%20edit.md">Quick edit</a>.
## Clipboard management
* <kbd>Ctrl</kbd>+<kbd>C</kbd> to copy one or more notes based on selection (see <a class="reference-link" href="../../Notes/Cloning%20Notes.md">Cloning Notes</a>).
* <kbd>Ctrl</kbd>+<kbd>X</kbd> to cut one or more notes (for moving them).
* <kbd>Ctrl</kbd>+<kbd>V</kbd> to paste them somewhere (which results in a copy or move based on the shortcut used).
## Moving notes
* <kbd>Ctrl</kbd> + <kbd><span>↑</span></kbd> , <kbd>Ctrl</kbd> + <kbd><span>↓</span></kbd> - move note up/down in the note list.
* <kbd>Ctrl</kbd> + <kbd><span>←</span></kbd> - move note up in the note tree.
* <kbd>Ctrl</kbd>+<kbd><span>→</span></kbd> - move note down in the note tree.
* <kbd>Del</kbd> - deletes note and optionally its subtree (asked in the dialog).
## Multiple selection
See <a class="reference-link" href="Multiple%20selection.md">Multiple selection</a> for more information about how selection works.
* <kbd>Alt</kbd>+<kbd>Click</kbd> add a single note to the current selection.
* <kbd>Shift</kbd>+<kbd>Click</kbd> select a range of notes, starting from the current note (the highlighted one) to the one that is being clicked.
* <kbd>Shift</kbd>+<kbd><span>↑</span></kbd>, <kbd>Shift</kbd>+<kbd><span>↓</span></kbd> multi-select not above/below.
* <kbd>Ctrl</kbd>+<kbd>A</kbd> select all notes in the current level

View File

@@ -52,15 +52,19 @@ The contextual menu can operate:
* Creates a copy of the note and its descendants.
* This process is different from <a class="reference-link" href="../../Notes/Cloning%20Notes.md">Cloning Notes</a> since the duplicated note can be edited independently from the original.
* An alternative to this, if done regularly, would be <a class="reference-link" href="../../../Advanced%20Usage/Templates.md">Templates</a>.
* **Archive/Unarchive**
* Marks a note as [archived](../../Notes/Archived%20Notes.md).
* If the note is already archived, it will be unarchived instead.
* Multiple notes can be selected as well. However, all the selected notes must be in the same state (archived or not), otherwise the option will be disabled.
* **Delete**
* Will delete the given notes, asking for confirmation first.
* In the dialog, the following options can be configured:
* _Delete also all clones_ to ensure that the note will be deleted everywhere if it has been placed into multiple locations (see <a class="reference-link" href="../../Notes/Cloning%20Notes.md">Cloning Notes</a>).
* _Erase notes permanently_ will ensure that the note cannot be recovered from <a class="reference-link" href="../Recent%20Changes.md">Recent Changes</a>.
* **Import into note**
* Opens the [import](../../Import%20%26%20Export) dialog and places the imported notes as child notes of the selected one.
* Opens the [import](../../Import%20%26%20Export.md) dialog and places the imported notes as child notes of the selected one.
* **Export**
* Opens the [export](../../Import%20%26%20Export) dialog for the selected notes.
* Opens the [export](../../Import%20%26%20Export.md) dialog for the selected notes.
* **Search in subtree**
* Opens a full <a class="reference-link" href="../../Navigation/Search.md">Search</a> with it preconfigured to only look into this note and its descendants (the _Ancestor_ field).

View File

@@ -20,7 +20,7 @@ If you are using the _Fixed_ formatting toolbar, all the formatting buttons for
* As a more advanced use, it's possible to change the note type in order to modify the [source code](../../Advanced%20Usage/Note%20source.md) of a note.
* _**Protect the note**_ toggles whether the current note is encrypted and accessible only by entering the protected session. See [Protected Notes](../Notes/Protected%20Notes.md) for more information.
* _**Editable**_ changes whether the current note:
* Enters [read-only mode](../Notes/Read-Only%20Notes.md) automatically if the note is too big (default behaviour).
* Enters [read-only mode](../Notes/Read-Only%20Notes.md) automatically if the note is too big (default behavior).
* Is always in read-only mode (however it can still be edited temporarily).
* Is always editable, regardless of its size.
* _**Bookmark**_ toggles the display of the current note into the [Launch Bar](Launch%20Bar.md) for easy access. See [Bookmarks](../Navigation/Bookmarks.md) for more information.

View File

@@ -21,4 +21,22 @@ It is possible for each of the splits to have their own <a class="reference-lin
When a new split is created, it will share the same note hoisting as the previous one. An easy solution to this is to simply hoist the notes after the split is created.
This is generally quite useful for reorganizing notes from one place to the other, by hoisting the old place in the first split and hoisting the new place to the second one. This will allow easy cut and paste without the tree jumping around from switching between notes.
This is generally quite useful for reorganizing notes from one place to the other, by hoisting the old place in the first split and hoisting the new place to the second one. This will allow easy cut and paste without the tree jumping around from switching between notes.
## Mobile support
Since v0.100.0, it's possible to have a split view on the mobile view as well, with the following differences from the desktop version of the split:
* On smartphones, the split views are laid out vertically (one on the top and one on the bottom), instead of horizontally as on the desktop.
* There can be only one split open per tab.
* It's not possible to resize the two split panes.
* When the keyboard is opened, the active note will be “maximized”, thus allowing for more space even when a split is open. When the keyboard is closed, the splits become equal in size again.
Interaction:
* To create a new split, click the three dots button on the right of the note title and select _Create new split_.
* This option will only be available if there is no split already open in the current tab.
* To close a split, click the three dots button on the right of the note title and select _Close this pane_.
* Note that this option will only be available on the second note in the split (the one at the bottom on smartphones, the one on the right on tablets).
* When long-pressing a link, a contextual menu will show up with an option to _Open note in a new split_.
* If there's already a split, the option will replace the existing split instead.

View File

@@ -0,0 +1,10 @@
# Zoom
Zoom applies to the entire UI, including text.
On the desktop application, use the <a class="reference-link" href="Global%20menu.md">Global menu</a> to zoom in/out.
On both web browser and the desktop, the keyboard shortcuts <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>+</kbd> and <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>-</kbd> can be used.
## Adjusting the text size instead
As an alternative to the zoom, the text size can be individually adjusted by going to <a class="reference-link" href="Options.md">Options</a> → _Appearance_.

View File

@@ -0,0 +1,70 @@
# Collections
Collections are a unique type of note that don't have content, but instead display their child notes in various presentation methods.
## Main collections
| | |
| --- | --- |
| <figure class="image"><img style="aspect-ratio:1651/810;" src="Collections_collection_ca.webp" width="1651" height="810"></figure> | <a class="reference-link" href="Collections/Calendar.md">Calendar</a> <br>which displays a week, month or year calendar with the notes being shown as events. New events can be added easily by dragging across the calendar. |
| <figure class="image"><img style="aspect-ratio:1643/647;" src="Collections_collection_ta.webp" width="1643" height="647"></figure> | <a class="reference-link" href="Collections/Table.md">Table</a> <br>displays each note as a row in a table, with <a class="reference-link" href="Advanced%20Usage/Attributes/Promoted%20Attributes.md">Promoted Attributes</a> being shown as well. This makes it easy to visualize attributes of notes, as well as making them easily editable. |
| <figure class="image"><img style="aspect-ratio:1174/850;" src="Collections_collection_bo.webp" width="1174" height="850"></figure> | <a class="reference-link" href="Collections/Kanban%20Board.md">Kanban Board</a> <br>displays notes in columns, grouped by the value of a label. Items and columns can easily be created or dragged around to change their status. |
| <figure class="image"><img style="aspect-ratio:844/639;" src="Collections_collection_ge.webp" width="844" height="639"></figure> | <a class="reference-link" href="Collections/Geo%20Map.md">Geo Map</a> <br>which displays a geographical map in which the notes are represented as markers/pins on the map. New events can be easily added by pointing on the map. |
| <figure class="image"><img style="aspect-ratio:1120/763;" src="Collections_collection_pr.webp" width="1120" height="763"></figure> | <a class="reference-link" href="Collections/Presentation.md">Presentation</a> <br>which shows each note as a slide and can be presented full-screen with smooth transitions or exported to PDF for sharing. |
## Classic collections
Classic collections are read-only mode and compiles the contents of all child notes into one continuous view. This makes it ideal for reading extensive information broken into smaller, manageable segments.
* <a class="reference-link" href="Collections/Grid%20View.md">Grid View</a> which is the default presentation method for child notes (see <a class="reference-link" href="Basic%20Concepts%20and%20Features/Notes/Note%20List.md">Note List</a>), where the notes are displayed as tiles with their title and content being visible.
* <a class="reference-link" href="Collections/List%20View.md">List View</a> is similar to <a class="reference-link" href="Collections/Grid%20View.md">Grid View</a>, but it displays the notes one under the other with the content being expandable/collapsible, but also works recursively.
## Creating a new collection
To create a new collections, right click in the <a class="reference-link" href="Basic%20Concepts%20and%20Features/UI%20Elements/Note%20Tree.md">Note Tree</a> and look for the _Collections_ entry and select the desired type.
## Configuration
To change the configuration of a collection or even switch to a different collection (e.g. from Kanban Board to a Calendar), see the dedicated _Collections_ tab in the <a class="reference-link" href="Basic%20Concepts%20and%20Features/UI%20Elements/Ribbon.md">Ribbon</a>.
## Archived notes
By default, [archived notes](Basic%20Concepts%20and%20Features/Notes/Archived%20Notes.md) will not be shown in collections. This behavior can be changed by going to _Collection Properties_ in the <a class="reference-link" href="Basic%20Concepts%20and%20Features/UI%20Elements/Ribbon.md">Ribbon</a> and checking _Show archived notes_.
Archived notes will be generally indicated by being greyed out as opposed to the normal ones.
## Advanced use cases
### Adding a description to a collection
To add a text before the collection, for example to describe it:
1. Create a new collection.
2. In the <a class="reference-link" href="Basic%20Concepts%20and%20Features/UI%20Elements/Ribbon.md">Ribbon</a>, go to _Basic Properties_ and change the note type from _Collection_ to _Text_.
Now the text will be displayed above while still maintaining the collection view.
### Using saved search
Collections, by default, only display the child notes. However, it is possible to use the <a class="reference-link" href="Basic%20Concepts%20and%20Features/Navigation/Search.md">Search</a> functionality to display notes all across the tree, with advanced querying functionality.
To do so, simply start a <a class="reference-link" href="Basic%20Concepts%20and%20Features/Navigation/Search.md">Search</a> and go to the _Collection Properties_ tab in the <a class="reference-link" href="Basic%20Concepts%20and%20Features/UI%20Elements/Ribbon.md">Ribbon</a> and select a desired type of collection. To keep the search-based collection, use a <a class="reference-link" href="Note%20Types/Saved%20Search.md">Saved Search</a>.
> [!IMPORTANT]
> While in search, none of the collections will not display the child notes of the search results. The reason is that the search might hit a note multiple times, causing an exponential rise in the number of results.
### Creating a collection from scratch
By default, collections come with a default configuration and sometimes even sample notes. To create a collection completely from scratch:
1. Create a new note of type _Text_ (or any type).
2. In the <a class="reference-link" href="Basic%20Concepts%20and%20Features/UI%20Elements/Ribbon.md">Ribbon</a>, go to _Basic Properties_ and select _Collection_ as the note type.
3. Still in the ribbon, go to _Collection Properties_ and select the desired view type.
4. Consult the help page of the corresponding view type in order to understand how to configure them.
## Under the hood
Collections by themselves are simply notes with no content that rely on the <a class="reference-link" href="Basic%20Concepts%20and%20Features/Notes/Note%20List.md">Note List</a> mechanism (the one that lists the children notes at the bottom of a note) to display information.
By default, new collections use predefined <a class="reference-link" href="Advanced%20Usage/Templates.md">Templates</a> that are stored safely in the <a class="reference-link" href="Advanced%20Usage/Hidden%20Notes.md">Hidden Notes</a> to define some basic configuration such as the type of view, but also some <a class="reference-link" href="Advanced%20Usage/Attributes/Promoted%20Attributes.md">Promoted Attributes</a> to make editing easier.
Collections don't store their configuration (e.g. the position on the map, the hidden columns in a table) in the content of the note itself, but as attachments.

View File

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

Before

Width:  |  Height:  |  Size: 605 B

After

Width:  |  Height:  |  Size: 605 B

View File

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 68 KiB

View File

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 31 KiB

View File

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

View File

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

View File

Before

Width:  |  Height:  |  Size: 249 KiB

After

Width:  |  Height:  |  Size: 249 KiB

View File

Before

Width:  |  Height:  |  Size: 179 B

After

Width:  |  Height:  |  Size: 179 B

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 909 B

After

Width:  |  Height:  |  Size: 909 B

View File

Before

Width:  |  Height:  |  Size: 141 KiB

After

Width:  |  Height:  |  Size: 141 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 264 KiB

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 210 KiB

After

Width:  |  Height:  |  Size: 210 KiB

View File

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 7.6 KiB

View File

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

Before

Width:  |  Height:  |  Size: 1014 B

After

Width:  |  Height:  |  Size: 1014 B

View File

Before

Width:  |  Height:  |  Size: 9.6 KiB

After

Width:  |  Height:  |  Size: 9.6 KiB

View File

Before

Width:  |  Height:  |  Size: 966 B

After

Width:  |  Height:  |  Size: 966 B

View File

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 62 KiB

View File

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

Before

Width:  |  Height:  |  Size: 8.5 KiB

After

Width:  |  Height:  |  Size: 8.5 KiB

View File

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 42 KiB

View File

Before

Width:  |  Height:  |  Size: 338 KiB

After

Width:  |  Height:  |  Size: 338 KiB

View File

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

Some files were not shown because too many files have changed in this diff Show More