Merge branch 'develop' into build_improve-electron-forge_v3

This commit is contained in:
Panagiotis Papadopoulos 2025-03-15 12:09:52 +01:00
commit 3b8c645cca
156 changed files with 1567 additions and 1929 deletions

View File

@ -0,0 +1,11 @@
[Desktop Entry]
<% if (productName) { %>Name=<%= productName %>
<% } %><% if (description) { %>Comment=<%= description %>
<% } %><% if (genericName) { %>GenericName=<%= genericName %>
<% } %><% if (desktopExec) { %>Exec=<%= desktopExec %> %U
<% } %><% if (id) { %>Icon=<%= id %>
<% } %>Type=Application
StartupNotify=true
<% if (categories && categories.length) { %>Categories=<%= categories.join(';') %>;
<% } %><% if (mimeType && mimeType.length) { %>MimeType=<%= mimeType.join(';') %>;
<% } %>

View File

@ -16,7 +16,7 @@ chcp 65001
:: Get Current Trilium executable directory and compute data directory :: Get Current Trilium executable directory and compute data directory
SET DIR=%~dp0 SET DIR=%~dp0
set NODE_TLS_REJECT_UNAUTHORIZED=0 set NODE_TLS_REJECT_UNAUTHORIZED=0
cd %DIR% cd "%DIR%"
start trilium.exe start trilium.exe
GOTO END GOTO END

View File

@ -15,8 +15,9 @@ chcp 65001
:: Get Current Trilium executable directory and compute data directory :: Get Current Trilium executable directory and compute data directory
SET DIR=%~dp0 SET DIR=%~dp0
SET DIR=%DIR:~0,-1%
SET TRILIUM_DATA_DIR=%DIR%\trilium-data SET TRILIUM_DATA_DIR=%DIR%\trilium-data
cd %DIR% cd "%DIR%"
start trilium.exe start trilium.exe
GOTO END GOTO END

View File

@ -16,7 +16,7 @@ chcp 65001
:: Get Current Trilium executable directory and compute data directory :: Get Current Trilium executable directory and compute data directory
SET DIR=%~dp0 SET DIR=%~dp0
SET TRILIUM_SAFE_MODE=1 SET TRILIUM_SAFE_MODE=1
cd %DIR% cd "%DIR%"
start trilium.exe --disable-gpu start trilium.exe --disable-gpu
GOTO END GOTO END

View File

@ -9,7 +9,7 @@
"pOsGYCXsbNQG" "pOsGYCXsbNQG"
], ],
"title": "User Guide", "title": "User Guide",
"notePosition": 70, "notePosition": 90,
"prefix": null, "prefix": null,
"isExpanded": false, "isExpanded": false,
"type": "text", "type": "text",
@ -3525,20 +3525,28 @@
"dataFileName": "Content language & Right-to-le.md", "dataFileName": "Content language & Right-to-le.md",
"attachments": [ "attachments": [
{ {
"attachmentId": "RlBpP2KTDVIK", "attachmentId": "bqLn4gFZdqfX",
"title": "image.png", "title": "image.png",
"role": "image", "role": "image",
"mime": "image/jpg", "mime": "image/jpg",
"position": 10, "position": 10,
"dataFileName": "Content language & Right-t.png" "dataFileName": "Content language & Right-t.png"
}, },
{
"attachmentId": "RlBpP2KTDVIK",
"title": "image.png",
"role": "image",
"mime": "image/jpg",
"position": 10,
"dataFileName": "1_Content language & Right-t.png"
},
{ {
"attachmentId": "TlBagKsAj5ax", "attachmentId": "TlBagKsAj5ax",
"title": "image.png", "title": "image.png",
"role": "image", "role": "image",
"mime": "image/png", "mime": "image/png",
"position": 10, "position": 10,
"dataFileName": "1_Content language & Right-t.png" "dataFileName": "2_Content language & Right-t.png"
}, },
{ {
"attachmentId": "U9e8SLUEALiR", "attachmentId": "U9e8SLUEALiR",
@ -3546,7 +3554,7 @@
"role": "image", "role": "image",
"mime": "image/png", "mime": "image/png",
"position": 10, "position": 10,
"dataFileName": "2_Content language & Right-t.png" "dataFileName": "3_Content language & Right-t.png"
} }
] ]
}, },

View File

@ -5,28 +5,28 @@ It is also possible to configure most keyboard shortcuts in Options -> Keyboard
## Note navigation ## Note navigation
* `UP`, `DOWN` - go up/down in the list of notes, `CTRL-SHIFT-UP` and `CTRL-SHIFT-DOWN` work also from editor * <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
* `LEFT`, `RIGHT` - collapse/expand node * <kbd><span></span></kbd>, <kbd><span></span></kbd> - collapse/expand node
* `ALT+LEFT`, `ALT+RIGHT` - go back / forwards in the history * <kbd>Alt</kbd> + <kbd><span></span></kbd>, <kbd>Alt</kbd> + <kbd><span></span></kbd> - go back / forwards in the history
* `CTRL+J` - show ["Jump to" dialog](Navigation/Note%20Navigation.md) * <kbd>Ctrl</kbd> + <kbd>J</kbd> - show ["Jump to" dialog](Navigation/Note%20Navigation.md)
* `CTRL+.` - scroll to current note (useful when you scroll away from your note or your focus is currently in the editor) * <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)
* `BACKSPACE` - jumps to parent note * <kbd><span>Backspace</span></kbd> - jumps to parent note
* `ALT+C` - collapse whole note tree * <kbd>Alt</kbd> + <kbd>C</kbd> - collapse whole note tree
* `ALT+-` (alt with minus sign) - collapse subtree (if some subtree takes too much space on tree pane you can collapse it) * <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 `Ctrl+I`. Pressing this keyboard combination will then bring you to the note on which it is defined. Note that Trilium must be reloaded/restarted (Ctrl+R) for changes to be in effect. * 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). See demo of some of these features in [note navigation](Navigation/Note%20Navigation.md).
## Tabs ## Tabs
* `CTRL+click` - (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): Only in desktop (electron build):
* `CTRL+T` - opens empty tab * <kbd>Ctrl</kbd> + <kbd>T</kbd> - opens empty tab
* `CTRL+W` - closes active tab * <kbd>Ctrl</kbd> + <kbd>W</kbd> - closes active tab
* `CTRL+Tab` - activates next tab * <kbd>Ctrl</kbd> + <kbd>Tab</kbd> - activates next tab
* `CTRL+Shift+Tab` - activates previous tab * <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>Tab</kbd> - activates previous tab
## Creating notes ## Creating notes
@ -36,43 +36,43 @@ Only in desktop (electron build):
## Moving / cloning notes ## Moving / cloning notes
* `CTRL+UP`, `CTRL+DOWN` - move note up/down in the note list * <kbd>Ctrl</kbd> + <kbd><span></span></kbd> , Ctrl + <kbd><span></span></kbd> - move note up/down in the note list
* `CTRL+LEFT` - move note up in the note tree * <kbd>Ctrl</kbd> + <kbd><span></span></kbd> - move note up in the note tree
* `CTRL+RIGHT` - move note down in the note tree * <kbd>Ctrl</kbd>+<kbd><span></span></kbd> - move note down in the note tree
* `SHIFT+UP`, `SHIFT+DOWN` - multi-select note above/below * <kbd>Shift</kbd>+<kbd><span></span></kbd>, <kbd>Shift</kbd>`+`<kbd><span></span></kbd> - multi-select note above/below
* `CTRL+A` - select all notes in the current level * <kbd>Ctrl</kbd>+<kbd>A</kbd> - select all notes in the current level
* `SHIFT+click` - multi select note which you clicked on * <kbd>Shift</kbd>+<kbd>🖱 Left click</kbd> - multi select note which you clicked on
* `CTRL+C` - copies current note (or current selection) into clipboard (used for [cloning](Note/Cloning%20Notes.md) * <kbd>Ctrl</kbd>+<kbd>C</kbd> - copies current note (or current selection) into clipboard (used for [cloning](Note/Cloning%20Notes.md)
* `CTRL+X` - cuts current (or current selection) note into clipboard (used for moving notes) * <kbd>Ctrl</kbd>+<kbd>X</kbd> - cuts current (or current selection) note into clipboard (used for moving notes)
* `CTRL+V` - 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>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)
* `DEL` - delete note / sub-tree * <kbd>Del</kbd> - delete note / sub-tree
## Editing notes ## Editing notes
Trilium uses CKEditor 5 for the [text notes](../Note%20Types/Text.md) and CodeMirror 5 for [code notes](../Note%20Types/Code.md). Check the documentation of these projects to see all their built-in keyboard shortcuts. Trilium uses CKEditor 5 for the [text notes](../Note%20Types/Text.md) and CodeMirror 5 for [code notes](../Note%20Types/Code.md). Check the documentation of these projects to see all their built-in keyboard shortcuts.
* `ALT-F10` - bring up inline formatting toolbar (arrow keys `<-`,`->` to navigate, `ENTER` to apply) * <kbd>Alt</kbd>\-<kbd>F10</kbd> - bring up inline formatting toolbar (arrow keys <kbd><span></span></kbd>,<kbd><span></span></kbd> to navigate, <kbd>Enter</kbd> to apply)
* `ALT-F10` - again to bring up block formatting toolbar * <kbd>Alt</kbd>\-<kbd>F10</kbd> - again to bring up block formatting toolbar
* `ENTER` in tree pane switches from tree pane into note title. Enter from note title switches focus to text editor. `CTRL+.` switches back from editor to tree pane. * <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.
* `CTRL+K` - create / edit [external link](../Note%20Types/Text/Links.md) * <kbd>Ctrl</kbd>+<kbd>K</kbd> - create / edit [external link](../Note%20Types/Text/Links.md)
* `CTRL+L` - create [internal (note) link](../Note%20Types/Text/Links.md) * <kbd>Ctrl</kbd>+<kbd>L</kbd> - create [internal (note) link](../Note%20Types/Text/Links.md)
* `ALT+T` - inserts current date and time at caret position * <kbd>Alt</kbd>+<kbd>T</kbd> - inserts current date and time at caret position
* `CTRL+.` - 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 ## Runtime shortcuts
These are hooked in Electron to be similar to native browser keyboard shortcuts. These are hooked in Electron to be similar to native browser keyboard shortcuts.
* `F5`, `CTRL-R` - reloads trilium frontend * <kbd>F5</kbd>, <kbd>Ctrl</kbd>\-<kbd>R</kbd> - reloads Trilium front-end
* `CTRL+SHIFT+I` - show developer tools * <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>I</kbd> - show developer tools
* `CTRL+F` - show search dialog * <kbd>Ctrl</kbd>+<kbd>F</kbd> - show search dialog
* `CTRL+-` - zoom out * <kbd>Ctrl</kbd>+<kbd>-</kbd> - zoom out
* `CTRL+=` - zoom in * <kbd>Ctrl</kbd>+<kbd>=</kbd> - zoom in
## Other ## Other
* `ALT+O` - show SQL console (use only if you know what you're doing) * <kbd>Alt</kbd>+<kbd>O</kbd> - show SQL console (use only if you know what you're doing)
* `ALT+M` - distraction-free mode - display only note editor, everything else is hidden * <kbd>Alt</kbd>+<kbd>M</kbd> - distraction-free mode - display only note editor, everything else is hidden
* `F11` - toggle full screen * <kbd>F11</kbd> - toggle full screen
* `CTRL+S` - toggle [search](Navigation/Search.md) form in tree pane * <kbd>Ctrl</kbd> + <kbd>S</kbd> - toggle [search](Navigation/Search.md) form in tree pane
* `ALT+A` - show note [attributes](../Advanced%20Usage/Attributes.md) dialog * <kbd>Alt</kbd> +<kbd>A</kbd> - show note [attributes](../Advanced%20Usage/Attributes.md) dialog

View File

@ -11,7 +11,7 @@ This works identically to browser backwards / forwards, it's actually using buil
## Jump to note ## Jump to note
This is useful to quickly find and view arbitrary note - click on `Jump to` button on the top or press `CTRL-J`. Then type part of the note name and autocomplete will help you pick the desired note. This is useful to quickly find and view arbitrary note - click on `Jump to` button on the top or press <kbd>Ctrl</kbd> + <kbd>J</kbd> . Then type part of the note name and autocomplete will help you pick the desired note.
![](../../Attachments/jump-to.gif) ![](../../Attachments/jump-to.gif)

View File

@ -1,13 +1,13 @@
# Search # Search
## Local Search ## Local Search
Local search allows you to search within the currently displayed note. To initiate a local search, press CTRL-F. If using a web browser, this will be handled by the browser's native search functionality. In the desktop (electron) version, a separate dialog will apear. Local search allows you to search within the currently displayed note. To initiate a local search, press <kbd>Ctrl</kbd> + <kbd>F</kbd>. If using a web browser, this will be handled by the browser's native search functionality. In the desktop (electron) version, a separate dialog will apear.
## Note Search ## Note Search
Note search enables you to find notes by searching for text in the title, content, or [attributes](../../Advanced%20Usage/Attributes.md) of the notes. You also have the option to save your searches, which will create a special search note which is visible on your navigation tree and contains the search results as sub-items. Note search enables you to find notes by searching for text in the title, content, or [attributes](../../Advanced%20Usage/Attributes.md) of the notes. You also have the option to save your searches, which will create a special search note which is visible on your navigation tree and contains the search results as sub-items.
To search for notes, click on the magnifying glass icon on the toolbar or press the `CTRL-S` keyboard [shortcut](../Keyboard%20Shortcuts.md). To search for notes, click on the magnifying glass icon on the toolbar or press the <kbd>Ctrl</kbd> + <kbd>S</kbd> keyboard [shortcut](../Keyboard%20Shortcuts.md).
### Simple Note Search Examples ### Simple Note Search Examples

View File

@ -45,7 +45,7 @@ So now the "Bash" subtree appears on multiple locations in the hierarchy. Both t
![](../../Attachments/create-clone.gif) ![](../../Attachments/create-clone.gif)
In the demo, you can see how a clone can be created using the context menu. It's possible to do this also using the Add Link dialog or with CTRL+C and CTRL+V [keyboard shortcuts](../Keyboard%20Shortcuts.md). In the demo, you can see how a clone can be created using the context menu. It's possible to do this also using the Add Link dialog or with <kbd>Ctrl</kbd>+<kbd>C</kbd> and <kbd>Ctrl</kbd>+<kbd>V</kbd> [keyboard shortcuts](../Keyboard%20Shortcuts.md).
As seen in the demo, you can view the list of all available clones in the "Note Paths" tab in the Ribbon toolbar. As seen in the demo, you can view the list of all available clones in the "Note Paths" tab in the Ribbon toolbar.

View File

@ -77,7 +77,7 @@ Once you've created your custom theme:
2. In the theme selection dropdown, you should see your custom theme listed under the name you provided with the `#appTheme` [label](../Advanced%20Usage/Attributes.md). 2. In the theme selection dropdown, you should see your custom theme listed under the name you provided with the `#appTheme` [label](../Advanced%20Usage/Attributes.md).
3. Select your custom theme to activate it. 3. Select your custom theme to activate it.
If you make changes to your theme, press `CTRL-R` to reload the frontend and apply your updates. If you make changes to your theme, press <kbd>Ctrl</kbd> + <kbd>R</kbd> to reload the frontend and apply your updates.
### Sharing and Importing Themes ### Sharing and Importing Themes
@ -110,7 +110,7 @@ For example:
When Trilium's frontend starts, all notes labeled with `appCss` are automatically included in the style element of the HTML page. When Trilium's frontend starts, all notes labeled with `appCss` are automatically included in the style element of the HTML page.
After making changes, press `CTRL-R` to reload the frontend and apply your new styles. After making changes, press <kbd>Ctrl</kbd> + <kbd>R</kbd> to reload the frontend and apply your new styles.
![](Themes_image.png) ![](Themes_image.png)

View File

@ -13,14 +13,14 @@ You can easily rearrange the note tree by dragging and dropping notes, as demons
![Example of using keyboard keys to move a note](../../Attachments/move-note-with-keyboard.gif)Trilium offers efficient keyboard-based manipulation using the following [shortcuts](../Keyboard%20Shortcuts.md): ![Example of using keyboard keys to move a note](../../Attachments/move-note-with-keyboard.gif)Trilium offers efficient keyboard-based manipulation using the following [shortcuts](../Keyboard%20Shortcuts.md):
* `CTRL-UP` and `CTRL-DOWN`: Move the note up or down in the order. * <kbd>Ctrl</kbd> + <kbd><span></span></kbd> and <kbd>Ctrl</kbd> +<kbd><span></span></kbd>: Move the note up or down in the order.
* `CTRL-LEFT`: Move the note up in the hierarchy by changing its parent to the note's grandparent. * <kbd>Ctrl</kbd>+<kbd><span></span></kbd>: Move the note up in the hierarchy by changing its parent to the note's grandparent.
* `CTRL-RIGHT`: Move the note down in the hierarchy by setting its parent to the note currently above it (this action is best understood through a demo or hands-on experience). * <kbd>Ctrl</kbd>+<kbd><span></span></kbd>: Move the note down in the hierarchy by setting its parent to the note currently above it (this action is best understood through a demo or hands-on experience).
* `LEFT` and `RIGHT`: Expand and collapse a sub-tree. * <kbd><span></span></kbd> and <kbd><span></span></kbd>: Expand and collapse a sub-tree.
## Context Menu ## Context Menu
You can also move notes using the familiar cut and paste functions available in the context menu, or with the associated keyboard [shortcuts](../Keyboard%20Shortcuts.md): `CTRL-C` ( [copy](../Note/Cloning%20Notes.md)), `CTRL-X` (cut) and `CTRL-V` (paste). You can also move notes using the familiar cut and paste functions available in the context menu, or with the associated keyboard [shortcuts](../Keyboard%20Shortcuts.md): `CTRL-C` ( [copy](../Note/Cloning%20Notes.md)), <kbd>Ctrl</kbd> + <kbd>X</kbd> (cut) and <kbd>Ctrl</kbd> + <kbd>V</kbd> (paste).
## Multiple selection ## Multiple selection

View File

@ -13,7 +13,7 @@ Screenshot of the Zen Mode option in the global menu.
The Zen Mode can be activated by accessing the global menu and selecting the “Zen Mode” option: The Zen Mode can be activated by accessing the global menu and selecting the “Zen Mode” option:
Aside from the global menu, it's also possible to activate this mode by using a keyboard shortcut which is Alt+Z by default. Look for `toggleZenMode` in the shortcut configuration. Aside from the global menu, it's also possible to activate this mode by using a keyboard shortcut which is <kbd>Alt</kbd>+<kbd>Z</kbd> by default. Look for `toggleZenMode` in the shortcut configuration.
Once Zen Mode is activated, all the UI elements of the application will be hidden away, including the global menu. In that case, the Zen Mode can be deactivated either by pressing the ![](Zen%20mode_image.png)icon in the top-right corner of the window or by pressing the keyboard combination again. Once Zen Mode is activated, all the UI elements of the application will be hidden away, including the global menu. In that case, the Zen Mode can be deactivated either by pressing the ![](Zen%20mode_image.png)icon in the top-right corner of the window or by pressing the keyboard combination again.
@ -29,6 +29,6 @@ Screenshot of two notes side-by-side while Zen Mode is active, on Windows 11 wit
## Split windows and tabs ## Split windows and tabs
Tabs are completely hidden, however it's still possible to use keyboard shortcuts such as `firstTab` (Ctrl+1 by default), `secondTab` (Ctrl+2 by default). There are also some newer shortcuts such as `activateNextTab` (Ctrl+Tab) or `activatePreviousTab` (Ctrl+Shift+Tab) that allow easy navigation, however make sure that they are configured properly in the settings. Tabs are completely hidden, however it's still possible to use keyboard shortcuts such as `firstTab` (<kbd>Ctrl</kbd>+<kbd>1</kbd> by default), `secondTab` (<kbd>Ctrl</kbd>+<kbd>2</kbd> by default). There are also some newer shortcuts such as `activateNextTab` (<kbd>Ctrl</kbd>+<kbd>Tab</kbd>) or `activatePreviousTab` (<kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>Tab</kbd>) that allow easy navigation, however make sure that they are configured properly in the settings.
For the split view of notes, there are no keyboard shortcuts at the time of writing, but it's still possible to have them in Zen Mode by creating the split while the Zen Mode is off and then reactivating it afterwards. For the split view of notes, there are no keyboard shortcuts at the time of writing, but it's still possible to have them in Zen Mode by creating the split while the Zen Mode is off and then reactivating it afterwards.

View File

@ -12,7 +12,7 @@ This is essentially Trilium sources + node modules + node.js runtime packaged in
The problem with above steps is that once you close the SSH connection, the Trilium process is terminated. To avoid that, you have two options: The problem with above steps is that once you close the SSH connection, the Trilium process is terminated. To avoid that, you have two options:
* Kill it (with e.g. `CTRL-C`) and run again like this: `nohup ./trilium &`. * Kill it (with e.g. <kbd>Ctrl</kbd> + <kbd>C</kbd>) and run again like this: `nohup ./trilium &`.
* Configure systemd to automatically run Trilium in the background on every boot * Configure systemd to automatically run Trilium in the background on every boot
## Configure Trilium to auto-run on boot with systemd ## Configure Trilium to auto-run on boot with systemd

View File

@ -17,8 +17,8 @@ The position on the map and the zoom are saved inside the map note and restored
| | | | | | | |
| --- | --- | --- | | --- | --- | --- |
| 1 | | To create a marker, first navigate to the desired point on the map. Then press the ![](16_Geo%20map_image.png)button on the top-right of the map. <br> <br>If the button is not visible, make sure the button section is visible by pressing the chevron button ( ![](2_Geo%20map_image.png)) in the top-right of the map. | | 1 | | To create a marker, first navigate to the desired point on the map. Then press the ![](16_Geo%20map_image.png)button on the top-right of the map.  <br> <br>If the button is not visible, make sure the button section is visible by pressing the chevron button ( ![](2_Geo%20map_image.png)) in the top-right of the map. |
| 2 | ![](3_Geo%20map_image.png) | Once pressed, the map will enter in the insert mode, as illustrated by the notification. <br> <br>Simply click the point on the map where to place the marker, or the Escape key to cancel. | | 2 | ![](3_Geo%20map_image.png) | Once pressed, the map will enter in the insert mode, as illustrated by the notification.  <br> <br>Simply click the point on the map where to place the marker, or the Escape key to cancel. |
| 3 | ![](9_Geo%20map_image.png) | Enter the name of the marker/note to be created. | | 3 | ![](9_Geo%20map_image.png) | Enter the name of the marker/note to be created. |
| 4 | ![](17_Geo%20map_image.png) | Once confirmed, the marker will show up on the map and it will also be displayed as a child note of the map. | | 4 | ![](17_Geo%20map_image.png) | Once confirmed, the marker will show up on the map and it will also be displayed as a child note of the map. |
@ -36,7 +36,7 @@ It's possible to reposition existing markers by simply drag and dropping them to
As soon as the mouse is released, the new position is saved. As soon as the mouse is released, the new position is saved.
If moved by mistake, there is currently no way to undo the change. If the mouse was not yet released, it's possible to force a refresh of the page (Ctrl+R or Meta+R) to cancel it. If moved by mistake, there is currently no way to undo the change. If the mouse was not yet released, it's possible to force a refresh of the page (<kbd>Ctrl</kbd>+<kbd>R</kbd> ) to cancel it.
## Interaction with the markers ## Interaction with the markers
@ -66,7 +66,7 @@ The value of the attribute is made up of the latitude and longitude separated by
| | | | | | | |
| --- | --- | --- | | --- | --- | --- |
| 1 | ![](12_Geo%20map_image.png) | Go to Google Maps on the web and look for a desired location, right click on it and a context menu will show up. <br> <br>Simply click on the first item displaying the coordinates and they will be copied to clipboard. <br> <br>Then paste the value inside the text box into the `#geolocation` attribute of a child note of the map (don't forget to surround the value with a `"` character). | | 1 | ![](12_Geo%20map_image.png) | Go to Google Maps on the web and look for a desired location, right click on it and a context menu will show up.  <br> <br>Simply click on the first item displaying the coordinates and they will be copied to clipboard.  <br> <br>Then paste the value inside the text box into the `#geolocation` attribute of a child note of the map (don't forget to surround the value with a `"` character). |
| 2 | ![](5_Geo%20map_image.png) | In Trilium, create a child note under the map. | | 2 | ![](5_Geo%20map_image.png) | In Trilium, create a child note under the map. |
| 3 | ![](11_Geo%20map_image.png) | And then go to Owned Attributes and type `#geolocation="`, then paste from the clipboard as-is and then add the ending `"` character. Press Enter to confirm and the map should now be updated to contain the new note. | | 3 | ![](11_Geo%20map_image.png) | And then go to Owned Attributes and type `#geolocation="`, then paste from the clipboard as-is and then add the ending `"` character. Press Enter to confirm and the map should now be updated to contain the new note. |
@ -77,7 +77,7 @@ Similarly to the Google Maps approach:
| | | | | | | |
| --- | --- | --- | | --- | --- | --- |
| 1 | ![](1_Geo%20map_image.png) | Go to any location on openstreetmap.org and right click to bring up the context menu. Select the “Show address” item. | | 1 | ![](1_Geo%20map_image.png) | Go to any location on openstreetmap.org and right click to bring up the context menu. Select the “Show address” item. |
| 2 | ![](Geo%20map_image.png) | The address will be visible in the top-left of the screen, in the place of the search bar. <br> <br>Select the coordinates and copy them into the clipboard. | | 2 | ![](Geo%20map_image.png) | The address will be visible in the top-left of the screen, in the place of the search bar.  <br> <br>Select the coordinates and copy them into the clipboard. |
| 3 | ![](6_Geo%20map_image.png) | Simply paste the value inside the text box into the `#geolocation` attribute of a child note of the map and then it should be displayed on the map. | | 3 | ![](6_Geo%20map_image.png) | Simply paste the value inside the text box into the `#geolocation` attribute of a child note of the map and then it should be displayed on the map. |
## Adding GPS tracks (.gpx) ## Adding GPS tracks (.gpx)
@ -88,7 +88,7 @@ Trilium has basic support for displaying GPS tracks on the geo map.
| --- | --- | --- | | --- | --- | --- |
| 1 | ![](4_Geo%20map_image.png) | To add a track, simply drag & drop a .gpx file inside the geo map in the note tree. | | 1 | ![](4_Geo%20map_image.png) | To add a track, simply drag & drop a .gpx file inside the geo map in the note tree. |
| 2 | ![](15_Geo%20map_image.png) | In order for the file to be recognized as a GPS track, it needs to show up as `application/gpx+xml` in the _File type_ field. | | 2 | ![](15_Geo%20map_image.png) | In order for the file to be recognized as a GPS track, it needs to show up as `application/gpx+xml` in the _File type_ field. |
| 3 | ![](7_Geo%20map_image.png) | When going back to the map, the track should now be visible. <br> <br>The start and end points of the track are indicated by the two blue markers. | | 3 | ![](7_Geo%20map_image.png) | When going back to the map, the track should now be visible.  <br> <br>The start and end points of the track are indicated by the two blue markers. |
## Troubleshooting ## Troubleshooting
@ -96,4 +96,4 @@ Trilium has basic support for displaying GPS tracks on the geo map.
### Grid-like artifacts on the map ### Grid-like artifacts on the map
This occurs if the application is not at 100% zoom which causes the pixels of the map to not render correctly due to fractional scaling. The only possible solution is to set the UI zoom at 100% (default keyboard shortcut is Ctrl+0). This occurs if the application is not at 100% zoom which causes the pixels of the map to not render correctly due to fractional scaling. The only possible solution is to set the UI zoom at 100% (default keyboard shortcut is <kbd>Ctrl</kbd>+<kbd>0</kbd>).

View File

@ -65,7 +65,7 @@ CKEditor supports a markdown-like editing experience, recognising syntax and aut
Complete documentation for this feature is available in the [CKEditor documentation](https://ckeditor.com/docs/ckeditor5/latest/features/autoformat.html). Complete documentation for this feature is available in the [CKEditor documentation](https://ckeditor.com/docs/ckeditor5/latest/features/autoformat.html).
If autoformatting is not desirable, press `CTRL-Z` to revert the text to its original form. If autoformatting is not desirable, press <kbd>Ctrl</kbd> + <kbd>Z</kbd> to revert the text to its original form.
Note: The use of `#` for Heading 1 is not supported because it is reserved for the title. Start with `##` for Heading 2. More information is available [here](https://ckeditor.com/docs/ckeditor5/latest/features/headings.html#heading-levels). Note: The use of `#` for Heading 1 is not supported because it is reserved for the title. Start with `##` for Heading 2. More information is available [here](https://ckeditor.com/docs/ckeditor5/latest/features/headings.html#heading-levels).

Binary file not shown.

Before

Width:  |  Height:  |  Size: 89 KiB

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 115 KiB

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

View File

@ -3,7 +3,7 @@
External link is general web link targeting some external web resource - e.g. [https://en.wikipedia.org/wiki/South\_China\_Sea](https://en.wikipedia.org/wiki/South_China_Sea) is an external link to one Wikipedia page. External link is general web link targeting some external web resource - e.g. [https://en.wikipedia.org/wiki/South\_China\_Sea](https://en.wikipedia.org/wiki/South_China_Sea) is an external link to one Wikipedia page.
External links are done through CKEditor native links. To create an external link, select text and press `CTRL-K` or wait for the "balloon" to appear and click link icon there. External links are done through CKEditor native links. To create an external link, select text and press <kbd>Ctrl</kbd> + <kbd>K</kbd> or wait for the "balloon" to appear and click link icon there.
![](../../Attachments/create-external-link.gif) ![](../../Attachments/create-external-link.gif)
@ -11,7 +11,7 @@ You can follow external link by either double clicking (will open new tab/window
## Internal links to notes ## Internal links to notes
Links to internal notes are created a bit differently. To create link to note at current cursor position, press `CTRL-L`. Links to internal notes are created a bit differently. To create link to note at current cursor position, press <kbd>Ctrl</kbd> + <kbd>L</kbd>.
In the dialog you can see radio button to choose from different types of linking: In the dialog you can see radio button to choose from different types of linking:

View File

@ -5,7 +5,7 @@ As Trilium is currently in beta, encountering bugs is to be expected.
The first step in troubleshooting is often a restart. The first step in troubleshooting is often a restart.
If you experience an UI issue, the frontend may have entered an inconsistent state. Reload the application by pressing `CTRL-R`. This will reload the frontend. If you experience an UI issue, the frontend may have entered an inconsistent state. Reload the application by pressing <kbd>Ctrl</kbd> + <kbd>R</kbd>. This will reload the frontend.
If the issue persists or appears to be a backend problem, restart the entire application. For the desktop (Electron) build, simply close and reopen the window. If you're using a Docker build, restart the container. If the issue persists or appears to be a backend problem, restart the entire application. For the desktop (Electron) build, simply close and reopen the window. If you're using a Docker build, restart the container.

View File

@ -9,7 +9,7 @@ If you have trouble finding it the log files, there's also an in-app option in t
## Frontend logs ## Frontend logs
To provide frontend logs, we need to open the Developer Console. Often the easiest way is to press `CTRL-SHIFT-I` which should work in most browsers (and desktop app). Make sure that the error producing action happened right before you copy&paste the errors, the console is cleared on app restart. To provide frontend logs, we need to open the Developer Console. Often the easiest way is to press <kbd>Ctrl</kbd>\-<kbd>Shift</kbd>\-<kbd>I</kbd> which should work in most browsers (and desktop app). Make sure that the error producing action happened right before you copy&paste the errors, the console is cleared on app restart.
If that doesn't work, then: If that doesn't work, then:

View File

@ -1,4 +1,4 @@
# Refreshing the application # Refreshing the application
Some changes to the application will not take effect immediately and as such it might require to manually reload or refresh the application. Some changes to the application will not take effect immediately and as such it might require to manually reload or refresh the application.
To do so, simply press Ctrl+Shift+R. To do so, simply press <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>R</kbd>.

View File

@ -74,6 +74,7 @@ module.exports = {
config: { config: {
options: { options: {
...baseLinuxMakerConfigOptions, ...baseLinuxMakerConfigOptions,
desktopTemplate: path.resolve("./bin/electron-forge/desktop.ejs"),
id: "com.triliumnext.notes", id: "com.triliumnext.notes",
runtimeVersion: "24.08", runtimeVersion: "24.08",
base: "org.electronjs.Electron2.BaseApp", base: "org.electronjs.Electron2.BaseApp",

View File

@ -17,6 +17,32 @@
margin: 0 !important; margin: 0 !important;
} }
.ck-content .admonition {
--accent-color: var(--card-border-color);
border: 1px solid var(--accent-color);
box-shadow: var(--card-box-shadow);
background: var(--card-background-color);
border-radius: 0.5em;
padding: 1em;
margin: 1.25em 0;
margin-right: 14px;
position: relative;
}
.ck-content .admonition p:last-child {
margin-bottom: 0;
}
.ck-content .admonition p, h2 {
margin-top: 0;
}
.ck-content .admonition.note { --accent-color: #69c7ff; }
.ck-content .admonition.tip { --accent-color: #40c025; }
.ck-content .admonition.important { --accent-color: #9839f7; }
.ck-content .admonition.caution { --accent-color: #ff2e2e; }
.ck-content .admonition.warning { --accent-color: #e2aa03; }
/* /*
* CKEditor 5 (v41.0.0) content styles. * CKEditor 5 (v41.0.0) content styles.
* Generated on Fri, 26 Jan 2024 10:23:49 GMT. * Generated on Fri, 26 Jan 2024 10:23:49 GMT.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

233
package-lock.json generated
View File

@ -20,10 +20,11 @@
"@mermaid-js/layout-elk": "0.1.7", "@mermaid-js/layout-elk": "0.1.7",
"@mind-elixir/node-menu": "1.0.4", "@mind-elixir/node-menu": "1.0.4",
"@triliumnext/express-partial-content": "1.0.1", "@triliumnext/express-partial-content": "1.0.1",
"@types/html-minifier": "4.0.5",
"archiver": "7.0.1", "archiver": "7.0.1",
"async-mutex": "0.5.0", "async-mutex": "0.5.0",
"autocomplete.js": "0.38.1", "autocomplete.js": "0.38.1",
"axios": "1.8.2", "axios": "1.8.3",
"better-sqlite3": "11.8.1", "better-sqlite3": "11.8.1",
"boxicons": "2.1.4", "boxicons": "2.1.4",
"chardet": "2.1.0", "chardet": "2.1.0",
@ -48,14 +49,15 @@
"express": "4.21.2", "express": "4.21.2",
"express-rate-limit": "7.5.0", "express-rate-limit": "7.5.0",
"express-session": "1.18.1", "express-session": "1.18.1",
"force-graph": "1.49.3", "force-graph": "1.49.4",
"fs-extra": "11.3.0", "fs-extra": "11.3.0",
"helmet": "8.0.0", "helmet": "8.0.0",
"html": "1.0.0", "html": "1.0.0",
"html-minifier": "4.0.0",
"html2plaintext": "2.1.4", "html2plaintext": "2.1.4",
"http-proxy-agent": "7.0.2", "http-proxy-agent": "7.0.2",
"https-proxy-agent": "7.0.6", "https-proxy-agent": "7.0.6",
"i18next": "24.2.2", "i18next": "24.2.3",
"i18next-fs-backend": "2.6.0", "i18next-fs-backend": "2.6.0",
"image-type": "5.2.0", "image-type": "5.2.0",
"ini": "5.0.0", "ini": "5.0.0",
@ -73,7 +75,7 @@
"leaflet-gpx": "2.1.2", "leaflet-gpx": "2.1.2",
"mark.js": "8.11.1", "mark.js": "8.11.1",
"marked": "15.0.7", "marked": "15.0.7",
"mermaid": "11.4.1", "mermaid": "11.5.0",
"mime-types": "2.1.35", "mime-types": "2.1.35",
"mind-elixir": "4.4.1", "mind-elixir": "4.4.1",
"multer": "1.4.5-lts.1", "multer": "1.4.5-lts.1",
@ -163,11 +165,11 @@
"bootstrap": "5.3.3", "bootstrap": "5.3.3",
"cross-env": "7.0.3", "cross-env": "7.0.3",
"css-loader": "7.1.2", "css-loader": "7.1.2",
"electron": "34.3.2", "electron": "34.3.3",
"eslint": "9.22.0", "eslint": "9.22.0",
"esm": "3.2.25", "esm": "3.2.25",
"globals": "16.0.0", "globals": "16.0.0",
"happy-dom": "17.4.3", "happy-dom": "17.4.4",
"i18next-http-backend": "3.0.2", "i18next-http-backend": "3.0.2",
"jsdoc": "4.0.4", "jsdoc": "4.0.4",
"knockout": "3.5.1", "knockout": "3.5.1",
@ -364,9 +366,9 @@
} }
}, },
"node_modules/@babel/runtime": { "node_modules/@babel/runtime": {
"version": "7.26.0", "version": "7.26.10",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.0.tgz", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.10.tgz",
"integrity": "sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw==", "integrity": "sha512-2WJMeRQPHKSPemqk/awGrAiuFfzBmOIPXKizAsVhWH9YJqLZ0H+HS4c8loHGgW6utJ3E/ejXQUsiGaQy2NZ9Fw==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"regenerator-runtime": "^0.14.0" "regenerator-runtime": "^0.14.0"
@ -5245,6 +5247,16 @@
"@types/node": "*" "@types/node": "*"
} }
}, },
"node_modules/@types/clean-css": {
"version": "4.2.11",
"resolved": "https://registry.npmjs.org/@types/clean-css/-/clean-css-4.2.11.tgz",
"integrity": "sha512-Y8n81lQVTAfP2TOdtJJEsCoYl1AnOkqDqMvXb9/7pfgZZ7r8YrEyurrAvAoAjHOGXKRybay+5CsExqIH6liccw==",
"license": "MIT",
"dependencies": {
"@types/node": "*",
"source-map": "^0.6.0"
}
},
"node_modules/@types/cls-hooked": { "node_modules/@types/cls-hooked": {
"version": "4.3.9", "version": "4.3.9",
"resolved": "https://registry.npmjs.org/@types/cls-hooked/-/cls-hooked-4.3.9.tgz", "resolved": "https://registry.npmjs.org/@types/cls-hooked/-/cls-hooked-4.3.9.tgz",
@ -5693,6 +5705,17 @@
"dev": true, "dev": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/@types/html-minifier": {
"version": "4.0.5",
"resolved": "https://registry.npmjs.org/@types/html-minifier/-/html-minifier-4.0.5.tgz",
"integrity": "sha512-LfE7f7MFd+YUfZnlBz8W43P4NgSObWiqyKapANsWCj63Aqeqli8/9gVsGP4CwC8jPpTTYlTopKCk9rJSuht/ew==",
"license": "MIT",
"dependencies": {
"@types/clean-css": "*",
"@types/relateurl": "*",
"@types/uglify-js": "*"
}
},
"node_modules/@types/http-cache-semantics": { "node_modules/@types/http-cache-semantics": {
"version": "4.0.4", "version": "4.0.4",
"resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz", "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz",
@ -5934,6 +5957,12 @@
"@types/node": "*" "@types/node": "*"
} }
}, },
"node_modules/@types/relateurl": {
"version": "0.2.33",
"resolved": "https://registry.npmjs.org/@types/relateurl/-/relateurl-0.2.33.tgz",
"integrity": "sha512-bTQCKsVbIdzLqZhLkF5fcJQreE4y1ro4DIyVrlDNSCJRRwHhB8Z+4zXXa8jN6eDvc2HbRsEYgbvrnGvi54EpSw==",
"license": "MIT"
},
"node_modules/@types/responselike": { "node_modules/@types/responselike": {
"version": "1.0.3", "version": "1.0.3",
"resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.3.tgz", "resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.3.tgz",
@ -6104,6 +6133,15 @@
"dev": true, "dev": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/@types/uglify-js": {
"version": "3.17.5",
"resolved": "https://registry.npmjs.org/@types/uglify-js/-/uglify-js-3.17.5.tgz",
"integrity": "sha512-TU+fZFBTBcXj/GpDpDaBmgWk/gn96kMZ+uocaFUlV2f8a6WdMzzI44QBCmGcCiYR0Y6ZlNRiyUyKKt5nl/lbzQ==",
"license": "MIT",
"dependencies": {
"source-map": "^0.6.1"
}
},
"node_modules/@types/unist": { "node_modules/@types/unist": {
"version": "3.0.3", "version": "3.0.3",
"resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz", "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz",
@ -7320,9 +7358,9 @@
} }
}, },
"node_modules/axios": { "node_modules/axios": {
"version": "1.8.2", "version": "1.8.3",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.8.2.tgz", "resolved": "https://registry.npmjs.org/axios/-/axios-1.8.3.tgz",
"integrity": "sha512-ls4GYBm5aig9vWx8AWDSGLpnpDQRtWAfrjU+EuytuODrFBkqesN2RkOQCBzrA1RQNHw1SmRMSDDDSwzNAYQ6Rg==", "integrity": "sha512-iP4DebzoNlP/YN2dpwCgb8zoCmhtkajzS48JvwmkSkXvPI3DHc7m+XYL5tGnSlJtR6nImXZmdCuN5aP8dh1d8A==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"follow-redirects": "^1.15.6", "follow-redirects": "^1.15.6",
@ -8042,6 +8080,16 @@
"node": ">=6" "node": ">=6"
} }
}, },
"node_modules/camel-case": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/camel-case/-/camel-case-3.0.0.tgz",
"integrity": "sha512-+MbKztAYHXPr1jNTSKQF52VpcFjwY5RkR7fxksV8Doo4KAYc5Fl4UJRgthBbTmEx8C54DqahhbLJkDwjI3PI/w==",
"license": "MIT",
"dependencies": {
"no-case": "^2.2.0",
"upper-case": "^1.1.1"
}
},
"node_modules/caniuse-lite": { "node_modules/caniuse-lite": {
"version": "1.0.30001703", "version": "1.0.30001703",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001703.tgz", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001703.tgz",
@ -8283,6 +8331,18 @@
"license": "MIT", "license": "MIT",
"optional": true "optional": true
}, },
"node_modules/clean-css": {
"version": "4.2.4",
"resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.4.tgz",
"integrity": "sha512-EJUDT7nDVFDvaQgAo2G/PJvxmp1o/c6iXLbswsBbUFXi1Nr+AjA2cKmfbKDMjMvzEe75g3P6JkaDDAKk96A85A==",
"license": "MIT",
"dependencies": {
"source-map": "~0.6.0"
},
"engines": {
"node": ">= 4.0"
}
},
"node_modules/clean-stack": { "node_modules/clean-stack": {
"version": "2.2.0", "version": "2.2.0",
"resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz",
@ -10100,9 +10160,9 @@
} }
}, },
"node_modules/electron": { "node_modules/electron": {
"version": "34.3.2", "version": "34.3.3",
"resolved": "https://registry.npmjs.org/electron/-/electron-34.3.2.tgz", "resolved": "https://registry.npmjs.org/electron/-/electron-34.3.3.tgz",
"integrity": "sha512-n9tzmFexVLxipZXwMTY30H10f0X9k2OP0SkpSwL5VvnDZi0l/Hc+8CEArKkQPbbSf/IS7nxgc96gtTaR+XoSBg==", "integrity": "sha512-7m1FiO1mwc1K/UqqnnkG7Ik/kAngDzmLfHwcl+xaWgCQ+Sts9rlEqzOh6g1GHhDqebrbs4bO/aU+NDi32fCciQ==",
"hasInstallScript": true, "hasInstallScript": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
@ -12195,9 +12255,9 @@
} }
}, },
"node_modules/force-graph": { "node_modules/force-graph": {
"version": "1.49.3", "version": "1.49.4",
"resolved": "https://registry.npmjs.org/force-graph/-/force-graph-1.49.3.tgz", "resolved": "https://registry.npmjs.org/force-graph/-/force-graph-1.49.4.tgz",
"integrity": "sha512-blBqeFq3vdIzqGgvWrML9xA2R0nS5nvjHsEt9lcWVZ29IcdWQ6wa4G0CG/Uv8bP9olwpsJPZSJe3W8vNhiMCnQ==", "integrity": "sha512-TMbbXg3n0pjI8cmgNlv1IKEGewnd9LdwKVJ4cj4XzZXqP/Q5aSjsyuxzIITtkfDJ+KDsiLql1FHu19Lqrq41uQ==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@tweenjs/tween.js": "18 - 25", "@tweenjs/tween.js": "18 - 25",
@ -12819,9 +12879,9 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/happy-dom": { "node_modules/happy-dom": {
"version": "17.4.3", "version": "17.4.4",
"resolved": "https://registry.npmjs.org/happy-dom/-/happy-dom-17.4.3.tgz", "resolved": "https://registry.npmjs.org/happy-dom/-/happy-dom-17.4.4.tgz",
"integrity": "sha512-8mDGIKxi2hAg0DkEYjBHPi5QykWiqdNNQQWrwLXLfro1eAZk8+lSnzbUrnU25bamG9PjEQGoFrA32ezQNJQdww==", "integrity": "sha512-/Pb0ctk3HTZ5xEL3BZ0hK1AqDSAUuRQitOmROPHhfUYEWpmTImwfD8vFDGADmMAX0JYgbcgxWoLFKtsWhcpuVA==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
@ -12974,6 +13034,33 @@
"dev": true, "dev": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/html-minifier": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/html-minifier/-/html-minifier-4.0.0.tgz",
"integrity": "sha512-aoGxanpFPLg7MkIl/DDFYtb0iWz7jMFGqFhvEDZga6/4QTjneiD8I/NXL1x5aaoCp7FSIT6h/OhykDdPsbtMig==",
"license": "MIT",
"dependencies": {
"camel-case": "^3.0.0",
"clean-css": "^4.2.1",
"commander": "^2.19.0",
"he": "^1.2.0",
"param-case": "^2.1.1",
"relateurl": "^0.2.7",
"uglify-js": "^3.5.1"
},
"bin": {
"html-minifier": "cli.js"
},
"engines": {
"node": ">=6"
}
},
"node_modules/html-minifier/node_modules/commander": {
"version": "2.20.3",
"resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
"license": "MIT"
},
"node_modules/html2plaintext": { "node_modules/html2plaintext": {
"version": "2.1.4", "version": "2.1.4",
"resolved": "https://registry.npmjs.org/html2plaintext/-/html2plaintext-2.1.4.tgz", "resolved": "https://registry.npmjs.org/html2plaintext/-/html2plaintext-2.1.4.tgz",
@ -13209,9 +13296,9 @@
} }
}, },
"node_modules/i18next": { "node_modules/i18next": {
"version": "24.2.2", "version": "24.2.3",
"resolved": "https://registry.npmjs.org/i18next/-/i18next-24.2.2.tgz", "resolved": "https://registry.npmjs.org/i18next/-/i18next-24.2.3.tgz",
"integrity": "sha512-NE6i86lBCKRYZa5TaUDkU5S4HFgLIEJRLr3Whf2psgaxBleQ2LC1YW1Vc+SCgkAW7VEzndT6al6+CzegSUHcTQ==", "integrity": "sha512-lfbf80OzkocvX7nmZtu7nSTNbrTYR52sLWxPtlXX1zAhVw8WEnFk4puUkCR4B1dNQwbSpEHHHemcZu//7EcB7A==",
"funding": [ "funding": [
{ {
"type": "individual", "type": "individual",
@ -13228,7 +13315,7 @@
], ],
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@babel/runtime": "^7.23.2" "@babel/runtime": "^7.26.10"
}, },
"peerDependencies": { "peerDependencies": {
"typescript": "^5" "typescript": "^5"
@ -14716,6 +14803,12 @@
"dev": true, "dev": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/lower-case": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/lower-case/-/lower-case-1.1.4.tgz",
"integrity": "sha512-2Fgx1Ycm599x+WGpIYwJOvsjmXFzTSc34IwDWALRA/8AopUKAVPwfJ+h5+f85BCp0PWmmJcWzEpxOpoXycMpdA==",
"license": "MIT"
},
"node_modules/lowercase-keys": { "node_modules/lowercase-keys": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz",
@ -15068,43 +15161,44 @@
} }
}, },
"node_modules/mermaid": { "node_modules/mermaid": {
"version": "11.4.1", "version": "11.5.0",
"resolved": "https://registry.npmjs.org/mermaid/-/mermaid-11.4.1.tgz", "resolved": "https://registry.npmjs.org/mermaid/-/mermaid-11.5.0.tgz",
"integrity": "sha512-Mb01JT/x6CKDWaxigwfZYuYmDZ6xtrNwNlidKZwkSrDaY9n90tdrJTV5Umk+wP1fZscGptmKFXHsXMDEVZ+Q6A==", "integrity": "sha512-IYhyukID3zzDj1EihKiN1lp+PXNImoJ3Iyz73qeDAgnus4BNGsJV1n471P4PyeGxPVONerZxignwGxGTSwZnlg==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@braintree/sanitize-url": "^7.0.1", "@braintree/sanitize-url": "^7.0.4",
"@iconify/utils": "^2.1.32", "@iconify/utils": "^2.1.33",
"@mermaid-js/parser": "^0.3.0", "@mermaid-js/parser": "^0.3.0",
"@types/d3": "^7.4.3", "@types/d3": "^7.4.3",
"cytoscape": "^3.29.2", "cytoscape": "^3.29.3",
"cytoscape-cose-bilkent": "^4.1.0", "cytoscape-cose-bilkent": "^4.1.0",
"cytoscape-fcose": "^2.2.0", "cytoscape-fcose": "^2.2.0",
"d3": "^7.9.0", "d3": "^7.9.0",
"d3-sankey": "^0.12.3", "d3-sankey": "^0.12.3",
"dagre-d3-es": "7.0.11", "dagre-d3-es": "7.0.11",
"dayjs": "^1.11.10", "dayjs": "^1.11.13",
"dompurify": "^3.2.1", "dompurify": "^3.2.4",
"katex": "^0.16.9", "katex": "^0.16.9",
"khroma": "^2.1.0", "khroma": "^2.1.0",
"lodash-es": "^4.17.21", "lodash-es": "^4.17.21",
"marked": "^13.0.2", "marked": "^15.0.7",
"roughjs": "^4.6.6", "roughjs": "^4.6.6",
"stylis": "^4.3.1", "stylis": "^4.3.6",
"ts-dedent": "^2.2.0", "ts-dedent": "^2.2.0",
"uuid": "^9.0.1" "uuid": "^11.1.0"
} }
}, },
"node_modules/mermaid/node_modules/marked": { "node_modules/mermaid/node_modules/uuid": {
"version": "13.0.3", "version": "11.1.0",
"resolved": "https://registry.npmjs.org/marked/-/marked-13.0.3.tgz", "resolved": "https://registry.npmjs.org/uuid/-/uuid-11.1.0.tgz",
"integrity": "sha512-rqRix3/TWzE9rIoFGIn8JmsVfhiuC8VIQ8IdX5TfzmeBucdY05/0UlzKaw0eVtpcN/OdVFpBk7CjKGo9iHJ/zA==", "integrity": "sha512-0/A9rDy9P7cJ+8w1c9WD9V//9Wj15Ce2MPz8Ri6032usz+NfePxx5AcN3bN+r6ZL6jEo066/yNYB3tn4pQEx+A==",
"funding": [
"https://github.com/sponsors/broofa",
"https://github.com/sponsors/ctavan"
],
"license": "MIT", "license": "MIT",
"bin": { "bin": {
"marked": "bin/marked.js" "uuid": "dist/esm/bin/uuid"
},
"engines": {
"node": ">= 18"
} }
}, },
"node_modules/methods": { "node_modules/methods": {
@ -15938,6 +16032,15 @@
"dev": true, "dev": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/no-case": {
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/no-case/-/no-case-2.3.2.tgz",
"integrity": "sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ==",
"license": "MIT",
"dependencies": {
"lower-case": "^1.1.1"
}
},
"node_modules/node-abi": { "node_modules/node-abi": {
"version": "3.71.0", "version": "3.71.0",
"resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.71.0.tgz", "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.71.0.tgz",
@ -16568,6 +16671,15 @@
"wheel": "^1.0.0" "wheel": "^1.0.0"
} }
}, },
"node_modules/param-case": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/param-case/-/param-case-2.1.1.tgz",
"integrity": "sha512-eQE845L6ot89sk2N8liD8HAuH4ca6Vvr7VWAWwt7+kvvG5aBcPmmphQ68JsEG2qa9n1TykS2DLeMt363AAH8/w==",
"license": "MIT",
"dependencies": {
"no-case": "^2.2.0"
}
},
"node_modules/parent-module": { "node_modules/parent-module": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
@ -18115,6 +18227,15 @@
"integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==",
"license": "MIT" "license": "MIT"
}, },
"node_modules/relateurl": {
"version": "0.2.7",
"resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz",
"integrity": "sha512-G08Dxvm4iDN3MLM0EsP62EDV9IuhXPR6blNz6Utcp7zyV3tr4HVNINt6MpaRWbxoOHT3Q7YN2P+jaHX8vUbgog==",
"license": "MIT",
"engines": {
"node": ">= 0.10"
}
},
"node_modules/repeat-string": { "node_modules/repeat-string": {
"version": "1.6.1", "version": "1.6.1",
"resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz",
@ -19631,9 +19752,9 @@
} }
}, },
"node_modules/stylis": { "node_modules/stylis": {
"version": "4.3.4", "version": "4.3.6",
"resolved": "https://registry.npmjs.org/stylis/-/stylis-4.3.4.tgz", "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.3.6.tgz",
"integrity": "sha512-osIBl6BGUmSfDkyH2mB7EFvCJntXDrLhKjHTRj/rK6xLH0yuPrHULDRQzKokSOD4VoorhtKpfcfW1GAntu8now==", "integrity": "sha512-yQ3rwFWRfwNUY7H5vpU0wfdkNSnvnJinhF9830Swlaxl03zsOjCfmX0ugac+3LtK0lYSgwL/KXc8oYL3mG4YFQ==",
"license": "MIT" "license": "MIT"
}, },
"node_modules/sudo-prompt": { "node_modules/sudo-prompt": {
@ -20657,6 +20778,18 @@
"integrity": "sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ==", "integrity": "sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ==",
"license": "MIT" "license": "MIT"
}, },
"node_modules/uglify-js": {
"version": "3.19.3",
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.19.3.tgz",
"integrity": "sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==",
"license": "BSD-2-Clause",
"bin": {
"uglifyjs": "bin/uglifyjs"
},
"engines": {
"node": ">=0.8.0"
}
},
"node_modules/uid-safe": { "node_modules/uid-safe": {
"version": "2.1.5", "version": "2.1.5",
"resolved": "https://registry.npmjs.org/uid-safe/-/uid-safe-2.1.5.tgz", "resolved": "https://registry.npmjs.org/uid-safe/-/uid-safe-2.1.5.tgz",
@ -20861,6 +20994,12 @@
"browserslist": ">= 4.21.0" "browserslist": ">= 4.21.0"
} }
}, },
"node_modules/upper-case": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz",
"integrity": "sha512-WRbjgmYzgXkCV7zNVpy5YgrHgbBv126rMALQQMrmzOVC4GM2waQ9x7xtm8VU+1yF2kWyPzI9zbZ48n4vSxwfSA==",
"license": "MIT"
},
"node_modules/uri-js": { "node_modules/uri-js": {
"version": "4.4.1", "version": "4.4.1",
"resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",

View File

@ -80,10 +80,11 @@
"@mermaid-js/layout-elk": "0.1.7", "@mermaid-js/layout-elk": "0.1.7",
"@mind-elixir/node-menu": "1.0.4", "@mind-elixir/node-menu": "1.0.4",
"@triliumnext/express-partial-content": "1.0.1", "@triliumnext/express-partial-content": "1.0.1",
"@types/html-minifier": "4.0.5",
"archiver": "7.0.1", "archiver": "7.0.1",
"async-mutex": "0.5.0", "async-mutex": "0.5.0",
"autocomplete.js": "0.38.1", "autocomplete.js": "0.38.1",
"axios": "1.8.2", "axios": "1.8.3",
"better-sqlite3": "11.8.1", "better-sqlite3": "11.8.1",
"boxicons": "2.1.4", "boxicons": "2.1.4",
"chardet": "2.1.0", "chardet": "2.1.0",
@ -108,14 +109,15 @@
"express": "4.21.2", "express": "4.21.2",
"express-rate-limit": "7.5.0", "express-rate-limit": "7.5.0",
"express-session": "1.18.1", "express-session": "1.18.1",
"force-graph": "1.49.3", "force-graph": "1.49.4",
"fs-extra": "11.3.0", "fs-extra": "11.3.0",
"helmet": "8.0.0", "helmet": "8.0.0",
"html": "1.0.0", "html": "1.0.0",
"html-minifier": "4.0.0",
"html2plaintext": "2.1.4", "html2plaintext": "2.1.4",
"http-proxy-agent": "7.0.2", "http-proxy-agent": "7.0.2",
"https-proxy-agent": "7.0.6", "https-proxy-agent": "7.0.6",
"i18next": "24.2.2", "i18next": "24.2.3",
"i18next-fs-backend": "2.6.0", "i18next-fs-backend": "2.6.0",
"image-type": "5.2.0", "image-type": "5.2.0",
"ini": "5.0.0", "ini": "5.0.0",
@ -133,7 +135,7 @@
"leaflet-gpx": "2.1.2", "leaflet-gpx": "2.1.2",
"mark.js": "8.11.1", "mark.js": "8.11.1",
"marked": "15.0.7", "marked": "15.0.7",
"mermaid": "11.4.1", "mermaid": "11.5.0",
"mime-types": "2.1.35", "mime-types": "2.1.35",
"mind-elixir": "4.4.1", "mind-elixir": "4.4.1",
"multer": "1.4.5-lts.1", "multer": "1.4.5-lts.1",
@ -220,11 +222,11 @@
"bootstrap": "5.3.3", "bootstrap": "5.3.3",
"cross-env": "7.0.3", "cross-env": "7.0.3",
"css-loader": "7.1.2", "css-loader": "7.1.2",
"electron": "34.3.2", "electron": "34.3.3",
"eslint": "9.22.0", "eslint": "9.22.0",
"esm": "3.2.25", "esm": "3.2.25",
"globals": "16.0.0", "globals": "16.0.0",
"happy-dom": "17.4.3", "happy-dom": "17.4.4",
"i18next-http-backend": "3.0.2", "i18next-http-backend": "3.0.2",
"jsdoc": "4.0.4", "jsdoc": "4.0.4",
"knockout": "3.5.1", "knockout": "3.5.1",

View File

@ -9,9 +9,9 @@
"pOsGYCXsbNQG" "pOsGYCXsbNQG"
], ],
"title": "User Guide", "title": "User Guide",
"notePosition": 70, "notePosition": 110,
"prefix": null, "prefix": null,
"isExpanded": true, "isExpanded": false,
"type": "text", "type": "text",
"mime": "text/html", "mime": "text/html",
"attributes": [], "attributes": [],
@ -3299,7 +3299,7 @@
"title": "Note Types", "title": "Note Types",
"notePosition": 70, "notePosition": 70,
"prefix": null, "prefix": null,
"isExpanded": true, "isExpanded": false,
"type": "text", "type": "text",
"mime": "text/html", "mime": "text/html",
"attributes": [ "attributes": [
@ -3326,7 +3326,7 @@
"title": "Text", "title": "Text",
"notePosition": 10, "notePosition": 10,
"prefix": null, "prefix": null,
"isExpanded": true, "isExpanded": false,
"type": "text", "type": "text",
"mime": "text/markdown", "mime": "text/markdown",
"attributes": [ "attributes": [
@ -3525,20 +3525,28 @@
"dataFileName": "Content language & Right-to-le.html", "dataFileName": "Content language & Right-to-le.html",
"attachments": [ "attachments": [
{ {
"attachmentId": "RlBpP2KTDVIK", "attachmentId": "bqLn4gFZdqfX",
"title": "image.png", "title": "image.png",
"role": "image", "role": "image",
"mime": "image/jpg", "mime": "image/jpg",
"position": 10, "position": 10,
"dataFileName": "Content language & Right-t.png" "dataFileName": "Content language & Right-t.png"
}, },
{
"attachmentId": "RlBpP2KTDVIK",
"title": "image.png",
"role": "image",
"mime": "image/jpg",
"position": 10,
"dataFileName": "1_Content language & Right-t.png"
},
{ {
"attachmentId": "TlBagKsAj5ax", "attachmentId": "TlBagKsAj5ax",
"title": "image.png", "title": "image.png",
"role": "image", "role": "image",
"mime": "image/png", "mime": "image/png",
"position": 10, "position": 10,
"dataFileName": "1_Content language & Right-t.png" "dataFileName": "2_Content language & Right-t.png"
}, },
{ {
"attachmentId": "U9e8SLUEALiR", "attachmentId": "U9e8SLUEALiR",
@ -3546,7 +3554,7 @@
"role": "image", "role": "image",
"mime": "image/png", "mime": "image/png",
"position": 10, "position": 10,
"dataFileName": "2_Content language & Right-t.png" "dataFileName": "3_Content language & Right-t.png"
} }
] ]
}, },

View File

@ -25,16 +25,14 @@
<p>Select an existing day note, and the menubar contains a calendar widget. <p>Select an existing day note, and the menubar contains a calendar widget.
Select any day to create a note for that day. </p> Select any day to create a note for that day. </p>
<p> <p>
<img src="1_Day Notes_image.png" alt="" /> <img src="1_Day Notes_image.png" alt="">
</p> </p>
<p>This pattern works well also because of <a href="../../Basic%20Concepts/Note/Cloning%20Notes.html">Cloning Notes</a> functionality <p>This pattern works well also because of <a href="../../Basic%20Concepts/Note/Cloning%20Notes.html">Cloning Notes</a> functionality
- note can appear in multiple places in the note tree, so besides appearing - note can appear in multiple places in the note tree, so besides appearing
under day note, it can also be categorized into other notes.</p> under day note, it can also be categorized into other notes.</p>
<h2>Demo</h2>
<h2>Demo</h2>
<p> <p>
<img src="Day Notes_image.png" alt="" /> <img src="Day Notes_image.png" alt="">
</p> </p>
<p>You can see the structure of day notes appearing under "Journal" note <p>You can see the structure of day notes appearing under "Journal" note
- there's a note for the whole year 2017, under it, you have "12 - December" - there's a note for the whole year 2017, under it, you have "12 - December"
@ -43,9 +41,7 @@
from <a href="Task%20Manager.html">Task manager</a>).</p> from <a href="Task%20Manager.html">Task manager</a>).</p>
<p>You can also notice how this day note has <a href="../Attributes/Promoted%20Attributes.html">promoted attribute</a> "weight" <p>You can also notice how this day note has <a href="../Attributes/Promoted%20Attributes.html">promoted attribute</a> "weight"
where you can track your daily weight. This data is then used in <a href="Weight%20Tracker.html">Weight tracker</a>.</p> where you can track your daily weight. This data is then used in <a href="Weight%20Tracker.html">Weight tracker</a>.</p>
<h2>Templates</h2>
<h2>Templates</h2>
<p>Trilium provides <a href="../Attributes/Template.html">template</a> functionality, <p>Trilium provides <a href="../Attributes/Template.html">template</a> functionality,
and it could be used together with day notes.</p> and it could be used together with day notes.</p>
<p>You can define one of the following relations on the root of the journal <p>You can define one of the following relations on the root of the journal
@ -59,9 +55,7 @@
month or date, it will take a look at the root and attach a corresponding <code>~template</code> relation month or date, it will take a look at the root and attach a corresponding <code>~template</code> relation
to the newly created role. Using this, you can e.g. create your daily template to the newly created role. Using this, you can e.g. create your daily template
with e.g. checkboxes for daily routine etc.</p> with e.g. checkboxes for daily routine etc.</p>
<h2>Date pattern</h2>
<h2>Date pattern</h2>
<p>It's possible to customize the title of generated date notes by defining <p>It's possible to customize the title of generated date notes by defining
a <code>#datePattern</code> label on a root calendar note (identified by <code>#calendarRoot</code> label). a <code>#datePattern</code> label on a root calendar note (identified by <code>#calendarRoot</code> label).
Following are possible values:</p> Following are possible values:</p>
@ -77,9 +71,7 @@
<li><code>{ordinal}</code> is replaced with the ordinal date (e.g. 1st, 2nd, <li><code>{ordinal}</code> is replaced with the ordinal date (e.g. 1st, 2nd,
3rd) etc.</li> 3rd) etc.</li>
</ul> </ul>
<h2>Month pattern</h2>
<h2>Month pattern</h2>
<p>It is also possible to customize the title of generated month notes through <p>It is also possible to customize the title of generated month notes through
the <code>#monthPattern</code> attribute, much like <code>#datePattern</code>. the <code>#monthPattern</code> attribute, much like <code>#datePattern</code>.
The options are:</p> The options are:</p>
@ -94,9 +86,7 @@
</ul> </ul>
<p>The default is <code>{monthNumberPadded} - {month}</code> <p>The default is <code>{monthNumberPadded} - {month}</code>
</p> </p>
<h2>Implementation</h2>
<h2>Implementation</h2>
<p>Trilium has some special support for day notes in the form of <a href="https://triliumnext.github.io/Notes/backend_api/BackendScriptApi.html">backend Script API</a> - <p>Trilium has some special support for day notes in the form of <a href="https://triliumnext.github.io/Notes/backend_api/BackendScriptApi.html">backend Script API</a> -
see e.g. getDayNote() function.</p> see e.g. getDayNote() function.</p>
<p>Day (and year, month) notes are created with a label - e.g. <code>#dateNote="2018-08-16"</code> this <p>Day (and year, month) notes are created with a label - e.g. <code>#dateNote="2018-08-16"</code> this

View File

@ -16,11 +16,9 @@
<p>Task Manager is a <a href="../Attributes/Promoted%20Attributes.html">promoted attributes</a> and <p>Task Manager is a <a href="../Attributes/Promoted%20Attributes.html">promoted attributes</a> and
<a <a
href="../../Note%20Types/Code/Scripts.html">scripts</a>showcase present in the <a href="../Database.html">demo notes</a>.</p> href="../../Note%20Types/Code/Scripts.html">scripts</a>showcase present in the <a href="../Database.html">demo notes</a>.</p>
<h2>Demo</h2>
<h2>Demo</h2>
<p> <p>
<img src="../../Attachments/task-manager.png" alt="" /> <img src="../../Attachments/task-manager.png" alt="">
</p> </p>
<p>Task Manager manages outstanding (TODO) tasks and finished tasks (non-empty <p>Task Manager manages outstanding (TODO) tasks and finished tasks (non-empty
doneDate attribute). Outstanding tasks are further categorized by location doneDate attribute). Outstanding tasks are further categorized by location
@ -30,16 +28,12 @@
notes are <a href="../../Basic%20Concepts/Note/Cloning%20Notes.html">cloned</a> into notes are <a href="../../Basic%20Concepts/Note/Cloning%20Notes.html">cloned</a> into
day note to both todoDate note and doneDate note (with <a href="../../Basic%20Concepts/Navigation/Tree%20Concepts.html">prefix</a> of day note to both todoDate note and doneDate note (with <a href="../../Basic%20Concepts/Navigation/Tree%20Concepts.html">prefix</a> of
either "TODO" or "DONE").</p> either "TODO" or "DONE").</p>
<h2>Implementation</h2>
<h2>Implementation</h2>
<p>New tasks are created in the TODO note which has <code>~child:template</code> <p>New tasks are created in the TODO note which has <code>~child:template</code>
<a <a
href="../Attributes.html">relation</a>(see <a href="../Attributes/Attribute%20Inheritance.html">attribute inheritance</a>) href="../Attributes.html">relation</a>(see <a href="../Attributes/Attribute%20Inheritance.html">attribute inheritance</a>)
pointing to the task template.</p> pointing to the task template.</p>
<h3>Attributes</h3>
<h3>Attributes</h3>
<p>Task template defines several <a href="../Attributes/Promoted%20Attributes.html">promoted attributes</a> - <p>Task template defines several <a href="../Attributes/Promoted%20Attributes.html">promoted attributes</a> -
todoDate, doneDate, tags, location. Importantly it also defines <code>~runOnAttributeChange</code> relation todoDate, doneDate, tags, location. Importantly it also defines <code>~runOnAttributeChange</code> relation
- <a href="../../Note%20Types/Code/Events.html">event</a> handler which is - <a href="../../Note%20Types/Code/Events.html">event</a> handler which is
@ -47,12 +41,9 @@
when e.g. we fill out the doneDate attribute - meaning the task is done 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 and should be moved to "Done" note and removed from TODO, locations and
tags.</p> tags.</p>
<h3>New task button</h3>
<h3>New task button</h3>
<p>There's also "button" note which contains simple script which adds a button <p>There's also "button" note which contains simple script which adds a button
to create new note (task) in the TODO note.</p> to create new note (task) in the TODO note.</p><pre><code class="language-text-x-trilium-auto">api.addButtonToToolbar({
<pre><code class="language-text-x-trilium-auto">api.addButtonToToolbar({
title: 'New task', title: 'New task',
icon: 'check', icon: 'check',
shortcut: 'alt+n', shortcut: 'alt+n',
@ -71,12 +62,10 @@
} }
});</code></pre> });</code></pre>
<h3>CSS</h3> <h3>CSS</h3>
<p>In the demo screenshot above you may notice that TODO tasks are in red <p>In the demo screenshot above you may notice that TODO tasks are in red
color and DONE tasks are green.</p> color and DONE tasks are green.</p>
<p>This is done by having this CSS <a href="../../Note%20Types/Code.html">code note</a> which <p>This is done by having this CSS <a href="../../Note%20Types/Code.html">code note</a> which
defines extra CSS classes:</p> defines extra CSS classes:</p><pre><code class="language-text-x-trilium-auto">span.fancytree-node.todo .fancytree-title {
<pre><code class="language-text-x-trilium-auto">span.fancytree-node.todo .fancytree-title {
color: red !important; color: red !important;
} }

View File

@ -14,16 +14,14 @@
<div class="ck-content"> <div class="ck-content">
<p> <p>
<img src="Weight Tracker_image.png" alt="" /> <img src="Weight Tracker_image.png" alt="">
</p> </p>
<p>The <code>Weight Tracker</code> is a <a href="../../Note%20Types/Code/Script%20API.html">Script API</a> showcase <p>The <code>Weight Tracker</code> is a <a href="../../Note%20Types/Code/Script%20API.html">Script API</a> showcase
present in the <a href="../Database.html">demo notes</a>.</p> present in the <a href="../Database.html">demo notes</a>.</p>
<p>By adding <code>weight</code> as a <a href="../Attributes/Promoted%20Attributes.html">promoted attribute</a> in <p>By adding <code>weight</code> as a <a href="../Attributes/Promoted%20Attributes.html">promoted attribute</a> in
the <a href="../Attributes/Template.html">template</a> from which <a href="Day%20Notes.html">day notes</a> are the <a href="../Attributes/Template.html">template</a> from which <a href="Day%20Notes.html">day notes</a> are
created, you can aggregate the data and plot weight change over time.</p> created, you can aggregate the data and plot weight change over time.</p>
<h2>Implementation</h2>
<h2>Implementation</h2>
<p>The <code>Weight Tracker</code> note in the screenshot above is of the type <code>Render Note</code>. <p>The <code>Weight Tracker</code> note in the screenshot above is of the type <code>Render Note</code>.
That type of note doesn't have any useful content itself. Instead it is That type of note doesn't have any useful content itself. Instead it is
a placeholder where a <a href="../../Note%20Types/Code/Scripts.html">script</a> can a placeholder where a <a href="../../Note%20Types/Code/Scripts.html">script</a> can
@ -37,12 +35,9 @@
<a <a
href="https://www.chartjs.org/">chart.js</a>which is imported as an attachment, since it's not built into href="https://www.chartjs.org/">chart.js</a>which is imported as an attachment, since it's not built into
Trilium.</p> Trilium.</p>
<h3>Code</h3>
<h3>Code</h3>
<p>Here's the content of the script which is placed in a <a href="../../Note%20Types/Code.html">code note</a> of <p>Here's the content of the script which is placed in a <a href="../../Note%20Types/Code.html">code note</a> of
type <code>JS Frontend</code>:</p> type <code>JS Frontend</code>:</p><pre><code class="language-text-x-trilium-auto">async function getChartData() {
<pre><code class="language-text-x-trilium-auto">async function getChartData() {
const days = await api.runOnBackend(async () =&gt; { const days = await api.runOnBackend(async () =&gt; {
const notes = api.getNotesWithLabel('weight'); const notes = api.getNotesWithLabel('weight');
const days = []; const days = [];
@ -88,7 +83,6 @@ new chartjs.Chart(ctx, {
data: await getChartData() data: await getChartData()
});</code></pre> });</code></pre>
<h2>How to remove the Weight Tracker button from the top bar</h2> <h2>How to remove the Weight Tracker button from the top bar</h2>
<p>In the link map of the <code>Weight Tracker</code>, there is a note called <code>Button</code>. <p>In the link map of the <code>Weight Tracker</code>, there is a note called <code>Button</code>.
Open it and delete or comment out its contents. The <code>Weight Tracker</code> button Open it and delete or comment out its contents. The <code>Weight Tracker</code> button
will disappear after you restart Trilium.</p> will disappear after you restart Trilium.</p>

View File

@ -22,11 +22,9 @@
<p>These attributes play a crucial role in organizing, categorising, and <p>These attributes play a crucial role in organizing, categorising, and
enhancing the functionality of notes.</p> enhancing the functionality of notes.</p>
<p> <p>
<img src="Attributes_image.png" alt="" /> <img src="Attributes_image.png" alt="">
</p> </p>
<h2>Labels</h2>
<h2>Labels</h2>
<p>Labels in Trilium can be used for a variety of purposes:</p> <p>Labels in Trilium can be used for a variety of purposes:</p>
<ul> <ul>
<li><strong>Metadata</strong>: Assign labels with optional values for categorization, <li><strong>Metadata</strong>: Assign labels with optional values for categorization,
@ -39,9 +37,7 @@
</li> </li>
</ul> </ul>
<p>Labels are also searchable, enhancing note retrieval.</p> <p>Labels are also searchable, enhancing note retrieval.</p>
<h3>Common Labels for Advanced Configuration</h3>
<h3>Common Labels for Advanced Configuration</h3>
<ul> <ul>
<li><code>**disableVersioning**</code>: Disables automatic versioning, ideal <li><code>**disableVersioning**</code>: Disables automatic versioning, ideal
for large, unimportant notes like script libraries</li> for large, unimportant notes like script libraries</li>
@ -111,41 +107,29 @@
note's editor</li> note's editor</li>
<li><code>**viewType**</code>: Sets the view of child notes (grid or list)</li> <li><code>**viewType**</code>: Sets the view of child notes (grid or list)</li>
</ul> </ul>
<h2>Relations</h2>
<h2>Relations</h2>
<p>Relations define connections between notes, similar to links.</p> <p>Relations define connections between notes, similar to links.</p>
<h3>Uses</h3>
<h3>Uses</h3>
<ul> <ul>
<li><strong>Metadata Relationships</strong>: For example, linking a book note <li><strong>Metadata Relationships</strong>: For example, linking a book note
to an author note</li> to an author note</li>
<li><strong>Scripting</strong>: Attaching scripts to events or conditions <li><strong>Scripting</strong>: Attaching scripts to events or conditions
related to the note</li> related to the note</li>
</ul> </ul>
<h3>Common Relations</h3>
<h3>Common Relations</h3>
<ul> <ul>
<li><strong>Event-based Relations</strong>: Such as <code>runOnNoteCreation</code> or <code>runOnNoteChange</code>, <li><strong>Event-based Relations</strong>: Such as <code>runOnNoteCreation</code> or <code>runOnNoteChange</code>,
which trigger scripts on specific actions</li> which trigger scripts on specific actions</li>
<li><strong>Other Relations</strong>: Include <code>template</code>, <code>renderNote</code>, <code>widget</code>, <li><strong>Other Relations</strong>: Include <code>template</code>, <code>renderNote</code>, <code>widget</code>,
and sharing-related relations</li> and sharing-related relations</li>
</ul> </ul>
<h2>Multiplicity</h2>
<h2>Multiplicity</h2>
<p>Attributes in Trilium can be "multivalued", meaning multiple attributes <p>Attributes in Trilium can be "multivalued", meaning multiple attributes
with the same name can coexist.</p> with the same name can coexist.</p>
<h2>Attribute Definitions and Promoted Attributes</h2>
<h2>Attribute Definitions and Promoted Attributes</h2>
<p>Special labels create "label/attribute" definitions, enhancing the organization <p>Special labels create "label/attribute" definitions, enhancing the organization
and management of attributes. For more details, see <a href="Attributes/Promoted%20Attributes.html">Promoted attributes</a>.</p> and management of attributes. For more details, see <a href="Attributes/Promoted%20Attributes.html">Promoted attributes</a>.</p>
<h2>Attribute Inheritance</h2>
<h2>Attribute Inheritance</h2>
<p>Trilium supports attribute inheritance, allowing child notes to inherit <p>Trilium supports attribute inheritance, allowing child notes to inherit
attributes from their parents. For more information, see <a href="Attributes/Attribute%20Inheritance.html">Attribute inheritance</a>.</p> attributes from their parents. For more information, see <a href="Attributes/Attribute%20Inheritance.html">Attribute inheritance</a>.</p>
</div> </div>

View File

@ -14,27 +14,20 @@
<div class="ck-content"> <div class="ck-content">
<h2>1. Standard Inheritance</h2> <h2>1. Standard Inheritance</h2>
<p>In Trilium, attributes can be automatically inherited by child notes if <p>In Trilium, attributes can be automatically inherited by child notes if
they have the <code>isInheritable</code> flag set to <code>true</code>. This they have the <code>isInheritable</code> flag set to <code>true</code>. This
means the attribute (a key-value pair) is applied to the note and all its means the attribute (a key-value pair) is applied to the note and all its
descendants.</p> descendants.</p>
<h3>Example Use Case</h3>
<h3>Example Use Case</h3>
<p>The <code>archived</code> label can be set to be inheritable, allowing you <p>The <code>archived</code> label can be set to be inheritable, allowing you
to hide a whole subtree of notes from searches and other dialogs by applying to hide a whole subtree of notes from searches and other dialogs by applying
this label at the top level.</p> this label at the top level.</p>
<h2>2. Copying Inheritance</h2>
<h2>2. Copying Inheritance</h2>
<p>Copying inheritance differs from standard inheritance by using a <code>child:</code> prefix <p>Copying inheritance differs from standard inheritance by using a <code>child:</code> prefix
in the attribute name. This prefix causes new child notes to automatically in the attribute name. This prefix causes new child notes to automatically
receive specific attributes from the parent note. These attributes are receive specific attributes from the parent note. These attributes are
independent of the parent and will persist even if the note is moved elsewhere.</p> independent of the parent and will persist even if the note is moved elsewhere.</p>
<h3>How to Use</h3>
<h3>How to Use</h3>
<ul> <ul>
<li><strong>Syntax:</strong> <code>#child:attributeName</code> <li><strong>Syntax:</strong> <code>#child:attributeName</code>
</li> </li>
@ -42,16 +35,12 @@
as <code>#child:child:attributeName</code>, where each child down the hierarchy as <code>#child:child:attributeName</code>, where each child down the hierarchy
receives the appropriate attribute.</li> receives the appropriate attribute.</li>
</ul> </ul>
<h3>Example</h3>
<h3>Example</h3>
<p>If a parent note has the label <code>#child:exampleAttribute</code>, all <p>If a parent note has the label <code>#child:exampleAttribute</code>, all
newly created child notes will inherit the <code>#exampleAttribute</code> label. newly created child notes will inherit the <code>#exampleAttribute</code> label.
This can be useful for setting default properties for notes in a specific This can be useful for setting default properties for notes in a specific
section.</p> section.</p>
<h2>3. Template Inheritance</h2>
<h2>3. Template Inheritance</h2>
<p>Attributes can also be inherited from <a href="Template.html">templates</a>. <p>Attributes can also be inherited from <a href="Template.html">templates</a>.
When a new note is created using a template, it inherits the attributes When a new note is created using a template, it inherits the attributes
defined in that template. This is particularly useful for maintaining consistency defined in that template. This is particularly useful for maintaining consistency

View File

@ -17,7 +17,7 @@
are considered important and thus are "promoted" onto the main note UI. are considered important and thus are "promoted" onto the main note UI.
See example below:</p> See example below:</p>
<p> <p>
<img src="../../Attachments/promoted-attributes.png" alt="" /> <img src="../../Attachments/promoted-attributes.png" alt="">
</p> </p>
<p>You can see the note having kind of form with several fields. Each of <p>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 these is just regular attribute, the only difference is that they appear
@ -26,15 +26,13 @@
automation etc. but they are also inconveniently hidden. This allows you 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.</p> to select few of the important ones and push them to the front of the user.</p>
<p>Now, how do we make attribute to appear on the UI?</p> <p>Now, how do we make attribute to appear on the UI?</p>
<h2>Attribute definition</h2>
<h2>Attribute definition</h2>
<p>Attribute is always name-value pair where both name and value are strings.</p> <p>Attribute is always name-value pair where both name and value are strings.</p>
<p><em>Attribute definition</em> specifies how should this value be interpreted <p><em>Attribute definition</em> specifies how should this value be interpreted
- is it just string, or is it a date? Should we allow multiple values or - is it just string, or is it a date? Should we allow multiple values or
note? And importantly, should we <em>promote</em> the attribute or not?</p> note? And importantly, should we <em>promote</em> the attribute or not?</p>
<p> <p>
<img src="Promoted Attributes_image.png" alt="" /> <img src="Promoted Attributes_image.png" alt="">
</p> </p>
<p>You can notice tag attribute definition. These "definition" attributes <p>You can notice tag attribute definition. These "definition" attributes
define how the "value" attributes should behave.</p> define how the "value" attributes should behave.</p>
@ -43,9 +41,7 @@
meaning that it's also applied to all descendant note. So in a way, this 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 definition is used for the whole subtree while "value" attributes are applied
only for this note.</p> only for this note.</p>
<h3>Inverse relation</h3>
<h3>Inverse relation</h3>
<p>Some relations always occur in pairs - my favorite example is on the family. <p>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 If you have a note representing husband and note representing wife, then
there might be a relation between those two of <code>isPartnerOf</code>. there might be a relation between those two of <code>isPartnerOf</code>.

View File

@ -28,9 +28,7 @@
<li><strong>Child Note Duplication</strong>: All child notes of the template <li><strong>Child Note Duplication</strong>: All child notes of the template
are deep-duplicated to the instance note.</li> are deep-duplicated to the instance note.</li>
</ol> </ol>
<h2>Example</h2>
<h2>Example</h2>
<p>A typical example would be a "Book" template note, which might include:</p> <p>A typical example would be a "Book" template note, which might include:</p>
<ul> <ul>
<li><strong>Promoted Attributes</strong>: Such as publication year, author, <li><strong>Promoted Attributes</strong>: Such as publication year, author,
@ -41,18 +39,15 @@
etc.</li> etc.</li>
</ul> </ul>
<p> <p>
<img src="../../Attachments/template.png" alt="Template Example" /> <img src="../../Attachments/template.png" alt="Template Example">
</p> </p>
<h2>Instance Note</h2>
<h2>Instance Note</h2>
<p>An instance note is a note related to a template note. This relationship <p>An instance note is a note related to a template note. This relationship
means the instance note's content is initialized from the template, and means the instance note's content is initialized from the template, and
all attributes from the template are inherited.</p> all attributes from the template are inherited.</p>
<p>To create an instance note through the UI:</p> <p>To create an instance note through the UI:</p>
<p> <p>
<img src="../../Attachments/template-create-instance-n.png" alt="show child note templates" <img src="../../Attachments/template-create-instance-n.png" alt="show child note templates">
/>
</p> </p>
<p>For the template to appear in the menu, the template note must have the <code>#template</code> label. <p>For the template to appear in the menu, the template note must have the <code>#template</code> label.
Do not confuse this with the <code>~template</code> relation, which links Do not confuse this with the <code>~template</code> relation, which links
@ -61,9 +56,7 @@
them only in the workspace.</p> them only in the workspace.</p>
<p>Templates can also be added or changed after note creation by creating <p>Templates can also be added or changed after note creation by creating
a <code>~template</code> relation pointing to the desired template note.</p> a <code>~template</code> relation pointing to the desired template note.</p>
<h2>Additional Notes</h2>
<h2>Additional Notes</h2>
<p>From a visual perspective, templates can define <code>#iconClass</code> and <code>#cssClass</code> attributes, <p>From a visual perspective, templates can define <code>#iconClass</code> and <code>#cssClass</code> attributes,
allowing all instance notes (e.g., books) to display a specific icon and allowing all instance notes (e.g., books) to display a specific icon and
CSS style.</p> CSS style.</p>

View File

@ -14,15 +14,12 @@
<div class="ck-content"> <div class="ck-content">
<h3>Execute script</h3> <h3>Execute script</h3>
<p>For more complex scenarios, it is possible to type in a JavaScript expression <p>For more complex scenarios, it is possible to type in a JavaScript expression
in order to apply the necessary changes.</p> in order to apply the necessary changes.</p>
<p>To apply a suffix (<code>- suffix</code> in this example), to the note <p>To apply a suffix (<code>- suffix</code> in this example), to the note
title:</p> title:</p><pre><code class="language-application-javascript-env-backend">note.title = note.title + " - suffix";</code></pre>
<pre><code class="language-application-javascript-env-backend">note.title = note.title + " - suffix";</code></pre>
<p>To alter attributes of a note in a bulk action, such as setting the <code>#shareAlias</code> label <p>To alter attributes of a note in a bulk action, such as setting the <code>#shareAlias</code> label
to the title of the note:</p> to the title of the note:</p><pre><code class="language-application-javascript-env-backend">note.setLabel("shareAlias", note.title)</code></pre>
<pre><code class="language-application-javascript-env-backend">note.setLabel("shareAlias", note.title)</code></pre>
</div> </div>
</div> </div>
</body> </body>

View File

@ -26,12 +26,10 @@
</li> </li>
<li>The environment variables will override any matching values from config.ini</li> <li>The environment variables will override any matching values from config.ini</li>
</ol> </ol>
<p>For example, if you have this in your config.ini:</p> <p>For example, if you have this in your config.ini:</p><pre><code class="language-text-x-trilium-auto">[Network]
<pre><code class="language-text-x-trilium-auto">[Network]
host=localhost host=localhost
port=8080</code></pre> port=8080</code></pre>
<p>You can override these values using environment variables:</p> <p>You can override these values using environment variables:</p><pre><code class="language-text-x-trilium-auto">TRILIUM_NETWORK_HOST=0.0.0.0
<pre><code class="language-text-x-trilium-auto">TRILIUM_NETWORK_HOST=0.0.0.0
TRILIUM_NETWORK_PORT=9000</code></pre> TRILIUM_NETWORK_PORT=9000</code></pre>
<p>The code will:</p> <p>The code will:</p>
<ol> <ol>

View File

@ -17,13 +17,10 @@
open a public REST endpoint. This opens a way for various integrations open a public REST endpoint. This opens a way for various integrations
with other services - a simple example would be creating new note from with other services - a simple example would be creating new note from
Slack by issuing a slash command (e.g. <code>/trilium buy milk</code>).</p> Slack by issuing a slash command (e.g. <code>/trilium buy milk</code>).</p>
<h2>Create note from outside Trilium</h2>
<h2>Create note from outside Trilium</h2>
<p>Let's take a look at an example. The goal is to provide a REST endpoint <p>Let's take a look at an example. The goal is to provide a REST endpoint
to which we can send title and content and Trilium will create a note.</p> to which we can send title and content and Trilium will create a note.</p>
<p>We'll start with creating a JavaScript backend <a href="../Note%20Types/Code.html">code note</a> containing:</p> <p>We'll start with creating a JavaScript backend <a href="../Note%20Types/Code.html">code note</a> containing:</p><pre><code class="language-text-x-trilium-auto">const {req, res} = api;
<pre><code class="language-text-x-trilium-auto">const {req, res} = api;
const {secret, title, content} = req.body; const {secret, title, content} = req.body;
if (req.method == 'POST' &amp;&amp; secret === 'secret-password') { if (req.method == 'POST' &amp;&amp; secret === 'secret-password') {
@ -47,11 +44,8 @@ else {
<li>relation <code>~targetNote</code> pointing to a note where new notes should <li>relation <code>~targetNote</code> pointing to a note where new notes should
be saved</li> be saved</li>
</ul> </ul>
<h3>Explanation</h3>
<h3>Explanation</h3> <p>Let's test this by using an HTTP client to send a request:</p><pre><code class="language-text-x-trilium-auto">POST http://my.trilium.org/custom/create-note
<p>Let's test this by using an HTTP client to send a request:</p>
<pre><code class="language-text-x-trilium-auto">POST http://my.trilium.org/custom/create-note
Content-Type: application/json Content-Type: application/json
{ {
@ -75,32 +69,23 @@ Content-Type: application/json
<p>Once we pass these checks we will just create the desired note using <p>Once we pass these checks we will just create the desired note using
<a <a
href="../Note%20Types/Code/Script%20API.html">Script API</a>.</p> href="../Note%20Types/Code/Script%20API.html">Script API</a>.</p>
<h2>Custom resource provider</h2>
<h2>Custom resource provider</h2>
<p>Another common use case is that you want to just expose a file note - <p>Another common use case is that you want to just expose a file note -
in such case you create label <code>customResourceProvider</code> (value in such case you create label <code>customResourceProvider</code> (value
is again path regex).</p> is again path regex).</p>
<p>For more information, see <a href="Custom%20Resource%20Providers.html">Custom Resource Providers</a>.</p> <p>For more information, see <a href="Custom%20Resource%20Providers.html">Custom Resource Providers</a>.</p>
<h2>Advanced concepts</h2>
<h2>Advanced concepts</h2>
<p><code>api.req</code> and <code>api.res</code> are Express.js objects - you <p><code>api.req</code> and <code>api.res</code> are Express.js objects - you
can always look into its <a href="https://expressjs.com/en/api.html">documentation</a> for can always look into its <a href="https://expressjs.com/en/api.html">documentation</a> for
details.</p> details.</p>
<h3>Parameters</h3>
<h3>Parameters</h3> <p>REST request paths often contain parameters in the URL, e.g.:</p><pre><code class="language-text-x-trilium-auto">http://my.trilium.org/custom/notes/123</code></pre>
<p>REST request paths often contain parameters in the URL, e.g.:</p>
<pre><code class="language-text-x-trilium-auto">http://my.trilium.org/custom/notes/123</code></pre>
<p>The last part is dynamic so the matching of the URL must also be dynamic <p>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 <code>customRequestHandler</code> value - for this reason the matching is done with regular expressions. Following <code>customRequestHandler</code> value
would match it:</p> would match it:</p><pre><code class="language-text-x-trilium-auto">notes/([0-9]+)</code></pre>
<pre><code class="language-text-x-trilium-auto">notes/([0-9]+)</code></pre>
<p>Additionally, this also defines a matching group with the use of parenthesis <p>Additionally, this also defines a matching group with the use of parenthesis
which then makes it easier to extract the value. The matched groups are which then makes it easier to extract the value. The matched groups are
available in <code>api.pathParams</code>:</p> available in <code>api.pathParams</code>:</p><pre><code class="language-text-x-trilium-auto">const noteId = api.pathParams[0];</code></pre>
<pre><code class="language-text-x-trilium-auto">const noteId = api.pathParams[0];</code></pre>
<p>Often you also need query params (as in e.g. <code>http://my.trilium.org/custom/notes?noteId=123</code>), <p>Often you also need query params (as in e.g. <code>http://my.trilium.org/custom/notes?noteId=123</code>),
you can get those with standard express <code>req.query.noteId</code>.</p> you can get those with standard express <code>req.query.noteId</code>.</p>
</div> </div>

View File

@ -17,9 +17,7 @@
fonts, stylesheets) to be publicly accessible via a URL.</p> fonts, stylesheets) to be publicly accessible via a URL.</p>
<p>A potential use case for this is to add embed a custom font alongside <p>A potential use case for this is to add embed a custom font alongside
a theme.</p> a theme.</p>
<h2>Steps for creating a custom resource provider</h2>
<h2>Steps for creating a custom resource provider</h2>
<ol> <ol>
<li>Import a file such as an image or a font into Trilium by drag &amp; drop.</li> <li>Import a file such as an image or a font into Trilium by drag &amp; drop.</li>
<li>Select the file and go to the <em>Owned Attributes</em> section.</li> <li>Select the file and go to the <em>Owned Attributes</em> section.</li>
@ -40,13 +38,10 @@
such as <code>hello/.*</code> which will be accessible via <code>/custom/hello/1</code>, <code>/custom/hello/2</code>, <code>/custom/hello/world</code>, such as <code>hello/.*</code> which will be accessible via <code>/custom/hello/1</code>, <code>/custom/hello/2</code>, <code>/custom/hello/world</code>,
etc.</li> etc.</li>
</ul> </ul>
<h2>Using it in a theme</h2>
<h2>Using it in a theme</h2>
<p>For example, if you have a custom font to be imported by the theme, first <p>For example, if you have a custom font to be imported by the theme, first
upload a font file into Trilium and assign it the <code>#customResourceProvider=fonts/myfont.ttf</code> attribute.</p> upload a font file into Trilium and assign it the <code>#customResourceProvider=fonts/myfont.ttf</code> attribute.</p>
<p>Then modify the theme CSS to point to:</p> <p>Then modify the theme CSS to point to:</p><pre><code class="language-text-css">@font-face {
<pre><code class="language-text-css">@font-face {
font-family: customFont; font-family: customFont;
src: url("/custom/fonts/myfont.ttf"); src: url("/custom/fonts/myfont.ttf");
} }

View File

@ -17,9 +17,7 @@
which contains all notes, tree structure, metadata, and most of the configuration. which contains all notes, tree structure, metadata, and most of the configuration.
The database file is named <code>document.db</code> and is stored in the The database file is named <code>document.db</code> and is stored in the
application's default <a href="../Installation%20%26%20Setup/Data%20directory.html">Data directory</a>.</p> application's default <a href="../Installation%20%26%20Setup/Data%20directory.html">Data directory</a>.</p>
<h2>Demo Notes</h2>
<h2>Demo Notes</h2>
<p>When you run Trilium for the first time, it will generate a new database <p>When you run Trilium for the first time, it will generate a new database
containing demo notes. These notes showcase its many features, such as:</p> containing demo notes. These notes showcase its many features, such as:</p>
<ul> <ul>
@ -34,9 +32,7 @@
<li><a href="../Basic%20Concepts/Themes.html">Custom CSS Themes</a> <li><a href="../Basic%20Concepts/Themes.html">Custom CSS Themes</a>
</li> </li>
</ul> </ul>
<h3>Restoring Demo Notes</h3>
<h3>Restoring Demo Notes</h3>
<p>There are some cases in which you may want to restore the original demo <p>There are some cases in which you may want to restore the original demo
notes. For example, if you experimented with some of the more advanced notes. For example, if you experimented with some of the more advanced
features and want to see the original reference, or if you simply want features and want to see the original reference, or if you simply want
@ -52,18 +48,14 @@
<li>Click "Import into note"</li> <li>Click "Import into note"</li>
<li>Select the .zip archive to import it</li> <li>Select the .zip archive to import it</li>
</ul> </ul>
<h2>Manually Modifying the Database</h2>
<h2>Manually Modifying the Database</h2>
<p>Trilium provides a lot of flexibility, and with it, opportunities for <p>Trilium provides a lot of flexibility, and with it, opportunities for
advanced users to tweak it. If you need to explore or modify the database advanced users to tweak it. If you need to explore or modify the database
directly, you can use a tool such as <a href="https://sqlitebrowser.org/">SQLite Browser</a> to directly, you can use a tool such as <a href="https://sqlitebrowser.org/">SQLite Browser</a> to
work directly on the database file.</p> work directly on the database file.</p>
<p>See <a href="Database/Manually%20altering%20the%20database.html">Manually altering the database</a> for <p>See <a href="Database/Manually%20altering%20the%20database.html">Manually altering the database</a> for
more information.</p> more information.</p>
<h2>How to Reset the Database</h2>
<h2>How to Reset the Database</h2>
<p>If you are experimenting with Trilium and want to return it to its original <p>If you are experimenting with Trilium and want to return it to its original
state, you can do that by deleting the current database. When you restart state, you can do that by deleting the current database. When you restart
the application, it will generate a new database containing the original the application, it will generate a new database containing the original

View File

@ -18,21 +18,15 @@
<p>If you are doing any advanced development or troubleshooting where you <p>If you are doing any advanced development or troubleshooting where you
manually modify the database, you might want to consider creating backups manually modify the database, you might want to consider creating backups
of your <code>document.db</code> file.</p> of your <code>document.db</code> file.</p>
<h2>Modifying it internally using the SQL Console</h2>
<h2>Modifying it internally using the SQL Console</h2>
<p>The SQL Console is Trilium's built-in database editor.</p> <p>The SQL Console is Trilium's built-in database editor.</p>
<p>See <a href="Manually%20altering%20the%20database/SQL%20Console.html">SQL Console</a>.</p> <p>See <a href="Manually%20altering%20the%20database/SQL%20Console.html">SQL Console</a>.</p>
<h2>Externally modifying the database</h2>
<h2>Externally modifying the database</h2>
<p>Sometimes the SQL Console cannot be used (for example if the application <p>Sometimes the SQL Console cannot be used (for example if the application
cannot start).</p> cannot start).</p>
<p>When making external modifications, consider closing the desktop application. <p>When making external modifications, consider closing the desktop application.
If modifying the server database, then stop the service or Docker container.</p> If modifying the server database, then stop the service or Docker container.</p>
<h3>Using DB Browser for SQLite</h3>
<h3>Using DB Browser for SQLite</h3>
<p>DB Browser for SQLite is a cross-platform editor that can be used to alter <p>DB Browser for SQLite is a cross-platform editor that can be used to alter
the database using a graphical user interface.</p> the database using a graphical user interface.</p>
<p>To do so:</p> <p>To do so:</p>
@ -47,13 +41,10 @@
<li>Close the application or close the database.</li> <li>Close the application or close the database.</li>
</ol> </ol>
<p> <p>
<img src="Manually altering the data.png" alt="" /> <img src="Manually altering the data.png" alt="">
</p> </p>
<h3>Using the SQLite CLI</h3>
<h3>Using the SQLite CLI</h3> <p>First, start the SQLite 3 CLI by specifying the path to the database:</p><pre><code class="language-text-x-trilium-auto">sqlite3 ~/.local/share/trilium-data/document.db</code></pre>
<p>First, start the SQLite 3 CLI by specifying the path to the database:</p>
<pre><code class="language-text-x-trilium-auto">sqlite3 ~/.local/share/trilium-data/document.db</code></pre>
<ul> <ul>
<li>In the prompt simply type the statement and make sure it ends with a <code>;</code> character.</li> <li>In the prompt simply type the statement and make sure it ends with a <code>;</code> character.</li>
<li>To exit, simply type <code>.quit</code> and enter.</li> <li>To exit, simply type <code>.quit</code> and enter.</li>

View File

@ -17,11 +17,9 @@
<p>It can be accessed by going to the <a href="../../../Basic%20Concepts/UI%20Elements">global menu</a> <p>It can be accessed by going to the <a href="../../../Basic%20Concepts/UI%20Elements">global menu</a>
Advanced → Open SQL Console.</p> Advanced → Open SQL Console.</p>
<p> <p>
<img src="SQL Console_image.png" alt="" /> <img src="SQL Console_image.png" alt="">
</p> </p>
<h3>Interaction</h3>
<h3>Interaction</h3>
<ul> <ul>
<li> <li>
<p>Hovering the mouse over one of the tables listed at the top of the document <p>Hovering the mouse over one of the tables listed at the top of the document
@ -32,23 +30,20 @@
</li> </li>
<li> <li>
<p>To run the statement, press the <p>To run the statement, press the
<img src="3_SQL Console_image.png" alt="" <img src="3_SQL Console_image.png" alt="">icon.</p>
/>icon.</p>
</li> </li>
<li> <li>
<p>For queries that return a result, the data will displayed in a table.</p> <p>For queries that return a result, the data will displayed in a table.</p>
<p> <p>
<img src="1_SQL Console_image.png" alt="" /> <img src="1_SQL Console_image.png" alt="">
</p> </p>
</li> </li>
</ul> </ul>
<h3>Saved SQL console</h3>
<h3>Saved SQL console</h3>
<p>SQL queries or commands can be saved into a dedicated note.</p> <p>SQL queries or commands can be saved into a dedicated note.</p>
<p>To do so, simply write the query and press the <p>To do so, simply write the query and press the
<img src="2_SQL Console_image.png" <img src="2_SQL Console_image.png"
alt="" />button. Once saved, the note will appear in <a href="../../Advanced%20Showcases/Day%20Notes.html">Day Notes</a>.</p> alt="">button. Once saved, the note will appear in <a href="../../Advanced%20Showcases/Day%20Notes.html">Day Notes</a>.</p>
<ul> <ul>
<li>The SQL expression will not be displayed by default, but it can still <li>The SQL expression will not be displayed by default, but it can still
be viewed by going to the note context menu and selecting <em>Note source</em>.</li> be viewed by going to the note context menu and selecting <em>Note source</em>.</li>

View File

@ -38,9 +38,7 @@
name]: [Book title], [Publication year]". There's no artificial intelligence name]: [Book title], [Publication year]". There's no artificial intelligence
here, the idea is to just prompt you to manually fill in the pieces of here, the idea is to just prompt you to manually fill in the pieces of
information into the note title by yourself.</p> information into the note title by yourself.</p>
<h2>Dynamic value</h2>
<h2>Dynamic value</h2>
<p>The value of <code>#titleTemplate</code> is evaluated at the point of note's <p>The value of <code>#titleTemplate</code> is evaluated at the point of note's
creation as a JavaScript string, which means it can be enriched with the creation as a JavaScript string, which means it can be enriched with the
help of JS string interpolation with dynamic data.</p> help of JS string interpolation with dynamic data.</p>

View File

@ -19,16 +19,12 @@
<p><a href="https://github.com/Nriver/trilium-py">trilium-py</a> is a third-party <p><a href="https://github.com/Nriver/trilium-py">trilium-py</a> is a third-party
Python implementation for ETAPI client, you can use Python to communicate Python implementation for ETAPI client, you can use Python to communicate
with Trilium.</p> with Trilium.</p>
<h2>Authentication</h2>
<h2>Authentication</h2>
<p>All operations have to be authenticated using a token. You can get this <p>All operations have to be authenticated using a token. You can get this
token either from Options -&gt; ETAPI or programmatically using the <code>/auth/login</code> REST token either from Options -&gt; ETAPI or programmatically using the <code>/auth/login</code> REST
call (see the <a href="https://github.com/TriliumNext/Notes/blob/master/src/etapi/etapi.openapi.yaml">spec</a>):</p> call (see the <a href="https://github.com/TriliumNext/Notes/blob/master/src/etapi/etapi.openapi.yaml">spec</a>):</p><pre><code class="language-text-x-trilium-auto">GET https://myserver.com/etapi/app-info
<pre><code class="language-text-x-trilium-auto">GET https://myserver.com/etapi/app-info
Authorization: ETAPITOKEN</code></pre> Authorization: ETAPITOKEN</code></pre>
<p>Alternatively, since 0.56 you can also use basic auth format:</p> <p>Alternatively, since 0.56 you can also use basic auth format:</p><pre><code class="language-text-x-trilium-auto">GET https://myserver.com/etapi/app-info
<pre><code class="language-text-x-trilium-auto">GET https://myserver.com/etapi/app-info
Authorization: Basic BATOKEN</code></pre> Authorization: Basic BATOKEN</code></pre>
<ul> <ul>
<li>Where <code>BATOKEN = BASE64(username + ':' + password)</code> - this is <li>Where <code>BATOKEN = BASE64(username + ':' + password)</code> - this is

View File

@ -16,23 +16,17 @@
<p>Note map is a visualisation of connections between notes.</p> <p>Note map is a visualisation of connections between notes.</p>
<p>This provides an insight into a structure ("web") of notes.</p> <p>This provides an insight into a structure ("web") of notes.</p>
<p>There are two types of note map:</p> <p>There are two types of note map:</p>
<h2>Link Map</h2>
<h2>Link Map</h2>
<p>Shows <a href="Attributes.html">relations</a> between notes:</p> <p>Shows <a href="Attributes.html">relations</a> between notes:</p>
<p> <p>
<img src="1_Note Map_image.png" alt="" /> <img src="1_Note Map_image.png" alt="">
</p> </p>
<h2>Tree Map</h2>
<h2>Tree Map</h2>
<p>Shows hierarchical map of notes:</p> <p>Shows hierarchical map of notes:</p>
<p> <p>
<img src="Note Map_image.png" alt="" /> <img src="Note Map_image.png" alt="">
</p> </p>
<h2>See also</h2>
<h2>See also</h2>
<p><a href="Relation%20Map.html">Relation map</a> is a similar concept, with <p><a href="Relation%20Map.html">Relation map</a> is a similar concept, with
some differences:</p> some differences:</p>
<ul> <ul>

View File

@ -16,17 +16,15 @@
<p>Relation map is a type of <a href="../Basic%20Concepts/Navigation/Tree%20Concepts.html">note</a> which <p>Relation map is a type of <a href="../Basic%20Concepts/Navigation/Tree%20Concepts.html">note</a> which
visualizes notes and their <a href="Attributes.html">relations</a>. See visualizes notes and their <a href="Attributes.html">relations</a>. See
an example:</p> an example:</p>
<h2>Development process demo</h2>
<h2>Development process demo</h2>
<p>This is a basic example how you can create simple diagram using relation <p>This is a basic example how you can create simple diagram using relation
maps:</p> maps:</p>
<p> <p>
<img src="../Attachments/relation-map-dev-process.png" alt="" /> <img src="../Attachments/relation-map-dev-process.png" alt="">
</p> </p>
<p>And this is how you can create it:</p> <p>And this is how you can create it:</p>
<p> <p>
<img src="Relation Map_relation-map-.gif" alt="" /> <img src="Relation Map_relation-map-.gif" alt="">
</p> </p>
<p>We start completely from scratch by first creating new note called "Development <p>We start completely from scratch by first creating new note called "Development
process" and changing its type to "Relation map". After that we create process" and changing its type to "Relation map". After that we create
@ -37,17 +35,15 @@
are actually notes which have been created under "Development process" are actually notes which have been created under "Development process"
note - you can click on them and write some content. Connections between note - you can click on them and write some content. Connections between
notes are called "<a href="Attributes.html">relations</a>".</p> notes are called "<a href="Attributes.html">relations</a>".</p>
<h2>Family demo</h2>
<h2>Family demo</h2>
<p>This is more complicated demo using some advanced concepts. Resulting <p>This is more complicated demo using some advanced concepts. Resulting
diagram is here:</p> diagram is here:</p>
<p> <p>
<img src="../Attachments/relation-map-family.png" alt="" /> <img src="../Attachments/relation-map-family.png" alt="">
</p> </p>
<p>This is how you get to it:</p> <p>This is how you get to it:</p>
<p> <p>
<img src="../Attachments/relation-map-family-demo.gif" alt="" /> <img src="../Attachments/relation-map-family-demo.gif" alt="">
</p> </p>
<p>There are several steps here:</p> <p>There are several steps here:</p>
<ul> <ul>
@ -82,17 +78,13 @@
<p>Relation definitions mentioned above come from "Person template" note <p>Relation definitions mentioned above come from "Person template" note
which is assigned to any child of "My Family Tree" relation note. You can which is assigned to any child of "My Family Tree" relation note. You can
play with the whole thing in the <a href="Database.html">demo notes</a>.</p> play with the whole thing in the <a href="Database.html">demo notes</a>.</p>
<h2>Details</h2>
<h2>Details</h2>
<p>You can specify which relations should be displayed with comma delimited <p>You can specify which relations should be displayed with comma delimited
names of relations in <code>displayRelations</code> label.</p> names of relations in <code>displayRelations</code> label.</p>
<p>Alternatively, you can specify comma delimited list of relation names <p>Alternatively, you can specify comma delimited list of relation names
in <code>hideRelations</code> which will display all relations, except for in <code>hideRelations</code> which will display all relations, except for
the ones defined in the label.</p> the ones defined in the label.</p>
<h2>See also</h2>
<h2>See also</h2>
<ul> <ul>
<li><a href="Note%20Map.html">Note map</a> is a similar concept</li> <li><a href="Note%20Map.html">Note map</a> is a similar concept</li>
</ul> </ul>

View File

@ -16,21 +16,17 @@
<p>Trilium allows you to share selected notes as <strong>publicly accessible</strong> read-only <p>Trilium allows you to share selected notes as <strong>publicly accessible</strong> read-only
documents. This feature is particularly useful for publishing content directly documents. This feature is particularly useful for publishing content directly
from your Trilium notes, making it accessible to others online.</p> from your Trilium notes, making it accessible to others online.</p>
<h2>Prerequisites</h2>
<h2>Prerequisites</h2>
<p>To use the sharing feature, you must have a <a href="../Installation%20%26%20Setup/Server%20Installation.html">server installation</a> of <p>To use the sharing feature, you must have a <a href="../Installation%20%26%20Setup/Server%20Installation.html">server installation</a> of
Trilium. This is necessary because the notes will be hosted from the server.</p> Trilium. This is necessary because the notes will be hosted from the server.</p>
<h2>How to Share a Note</h2>
<h2>How to Share a Note</h2>
<ol> <ol>
<li> <li>
<p><strong>Enable Sharing</strong>: To share a note, toggle the <code>Shared</code> switch <p><strong>Enable Sharing</strong>: To share a note, toggle the <code>Shared</code> switch
within the note's interface. Once sharing is enabled, an URL will appear, within the note's interface. Once sharing is enabled, an URL will appear,
which you can click to access the shared note.</p> which you can click to access the shared note.</p>
<p> <p>
<img src="../Attachments/share-single-note.png" alt="Share Note" /> <img src="../Attachments/share-single-note.png" alt="Share Note">
</p> </p>
</li> </li>
<li> <li>
@ -38,47 +34,33 @@
note in your browser. If your server is not configured with a public IP, note in your browser. If your server is not configured with a public IP,
the URL will refer to <code>localhost (127.0.0.1)</code>.</p> the URL will refer to <code>localhost (127.0.0.1)</code>.</p>
<p> <p>
<img src="../Attachments/share-single-note-web.png" alt="Shared Note Example" <img src="../Attachments/share-single-note-web.png" alt="Shared Note Example">
/>
</p> </p>
</li> </li>
</ol> </ol>
<h2>Sharing a Note Subtree</h2>
<h2>Sharing a Note Subtree</h2>
<p>When you share a note, you actually share the entire subtree of notes <p>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 beneath it. If the note has child notes, they will also be included in
the shared content. For example, sharing the "Formatting" subtree will the shared content. For example, sharing the "Formatting" subtree will
display a page with basic navigation for exploring all the notes within display a page with basic navigation for exploring all the notes within
that subtree.</p> that subtree.</p>
<p> <p>
<img src="../Attachments/share-multiple-notes-web.png" alt="Shared Subtree Example" <img src="../Attachments/share-multiple-notes-web.png" alt="Shared Subtree Example">
/>
</p> </p>
<h2>Viewing All Shared Notes</h2>
<h2>Viewing All Shared Notes</h2>
<p>You can view a list of all shared notes by clicking on "Show Shared Notes <p>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 Subtree." This allows you to manage and navigate through all the notes
you have made public.</p> you have made public.</p>
<h2>Security Considerations</h2>
<h2>Security Considerations</h2>
<p>Shared notes are published on the open internet and can be accessed by <p>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 anyone with the URL. The URL's randomness does not provide security, so
it is crucial not to share sensitive information through this feature.</p> it is crucial not to share sensitive information through this feature.</p>
<h3>Password Protection</h3>
<h3>Password Protection</h3>
<p>To protect shared notes with a username and password, you can use the <code>#shareCredentials</code> attribute. <p>To protect shared notes with a username and password, you can use the <code>#shareCredentials</code> attribute.
Add this label to the note with the format <code>#shareCredentials="username:password"</code>. Add this label to the note with the format <code>#shareCredentials="username:password"</code>.
To protect an entire subtree, make sure the label is <a href="Attributes/Attribute%20Inheritance.html">inheritable</a>.</p> To protect an entire subtree, make sure the label is <a href="Attributes/Attribute%20Inheritance.html">inheritable</a>.</p>
<h2>Advanced Sharing Options</h2>
<h2>Advanced Sharing Options</h2> <h3>Customizing the Appearance of Shared Notes</h3>
<h3>Customizing the Appearance of Shared Notes</h3>
<p>The default shared page is basic in design, but you can customize it using <p>The default shared page is basic in design, but you can customize it using
your own CSS:</p> your own CSS:</p>
<ul> <ul>
@ -91,22 +73,18 @@
<a <a
href="../Basic%20Concepts/Themes.html">default stylesheet</a>.</li> href="../Basic%20Concepts/Themes.html">default stylesheet</a>.</li>
</ul> </ul>
<h3>Adding JavaScript</h3>
<h3>Adding JavaScript</h3>
<p>You can inject custom JavaScript into the shared note using the <code>~shareJs</code> relation. <p>You can inject custom JavaScript into the shared note using the <code>~shareJs</code> relation.
This allows you to access note attributes or traverse the note tree using This allows you to access note attributes or traverse the note tree using
the <code>fetchNote()</code> API, which retrieves note data based on its the <code>fetchNote()</code> API, which retrieves note data based on its
ID.</p> ID.</p>
<p>Example:</p> <p>Example:</p><pre><code class="language-application-javascript-env-backend">const currentNote = await fetchNote();
<pre><code class="language-application-javascript-env-backend">const currentNote = await fetchNote();
const parentNote = await fetchNote(currentNote.parentNoteIds[0]); const parentNote = await fetchNote(currentNote.parentNoteIds[0]);
for (const attr of parentNote.attributes) { for (const attr of parentNote.attributes) {
console.log(attr.type, attr.name, attr.value); console.log(attr.type, attr.name, attr.value);
}</code></pre> }</code></pre>
<h3>Creating Human-Readable URL Aliases</h3> <h3>Creating Human-Readable URL Aliases</h3>
<p>Shared notes typically have URLs like <code>http://domain.tld/share/knvU8aJy4dJ7</code>, <p>Shared notes typically have URLs like <code>http://domain.tld/share/knvU8aJy4dJ7</code>,
where the last part is the note's ID. You can make these URLs more user-friendly where the last part is the note's ID. You can make these URLs more user-friendly
by adding the <code>#shareAlias</code> label to individual notes (e.g., <code>#shareAlias=highlighting</code>). by adding the <code>#shareAlias</code> label to individual notes (e.g., <code>#shareAlias=highlighting</code>).
@ -117,32 +95,24 @@ for (const attr of parentNote.attributes) {
<li>Using slashes (<code>/</code>) within aliases to create subpaths is not <li>Using slashes (<code>/</code>) within aliases to create subpaths is not
supported.</li> supported.</li>
</ol> </ol>
<h3>Viewing and Managing Shared Notes</h3>
<h3>Viewing and Managing Shared Notes</h3>
<p>All shared notes are grouped under an automatically managed "Shared Notes" <p>All shared notes are grouped under an automatically managed "Shared Notes"
section. From here, you can view, share, or unshare notes by moving or section. From here, you can view, share, or unshare notes by moving or
cloning them within this section.</p> cloning them within this section.</p>
<p> <p>
<img src="../Attachments/shared-list.png" alt="Shared Notes List" /> <img src="../Attachments/shared-list.png" alt="Shared Notes List">
</p> </p>
<h3>Setting a Custom Favicon</h3>
<h3>Setting a Custom Favicon</h3>
<p>To customize the favicon for your shared pages, create a relation <code>~shareFavicon</code> pointing <p>To customize the favicon for your shared pages, create a relation <code>~shareFavicon</code> pointing
to a file note containing the favicon (e.g., in <code>.ico</code> format).</p> to a file note containing the favicon (e.g., in <code>.ico</code> format).</p>
<h3>Sharing a Note as the Root</h3>
<h3>Sharing a Note as the Root</h3>
<p>You can designate a specific note or folder as the root of your shared <p>You can designate a specific note or folder as the root of your shared
content by adding the <code>#shareRoot</code> label. This note will be linked content by adding the <code>#shareRoot</code> label. This note will be linked
when visiting <code>[http://domain.tld/share](http://domain/share)</code>, when visiting <code>[http://domain.tld/share](http://domain/share)</code>,
making it easier to use Trilium as a fully-fledged website. Consider combining making it easier to use Trilium as a fully-fledged website. Consider combining
this with the <code>#shareIndex</code> label, which will display a list of this with the <code>#shareIndex</code> label, which will display a list of
all shared notes.</p> all shared notes.</p>
<h2>Additional Options</h2>
<h2>Additional Options</h2>
<ul> <ul>
<li><strong>Raw Note Sharing</strong>: Use the <code>#shareRaw</code> label <li><strong>Raw Note Sharing</strong>: Use the <code>#shareRaw</code> label
to share a note without any HTML wrapper.</li> to share a note without any HTML wrapper.</li>
@ -152,9 +122,7 @@ for (const attr of parentNote.attributes) {
<li><strong>Shared Notes Index</strong>: For text notes with the <code>#shareIndex</code> label, <li><strong>Shared Notes Index</strong>: For text notes with the <code>#shareIndex</code> label,
the content will display a list of all shared note roots.</li> the content will display a list of all shared note roots.</li>
</ul> </ul>
<h2>Limitations</h2>
<h2>Limitations</h2>
<p>While the sharing feature is powerful, it has some limitations:</p> <p>While the sharing feature is powerful, it has some limitations:</p>
<ul> <ul>
<li><strong>No Relation Map Support</strong> <li><strong>No Relation Map Support</strong>

View File

@ -26,27 +26,23 @@
<tbody> <tbody>
<tr> <tr>
<td> <td>
<img src="1_Serving directly the conte.png" alt="" /> <img src="1_Serving directly the conte.png" alt="">
</td> </td>
<td> <td>
<img src="Serving directly the conte.png" alt="" /> <img src="Serving directly the conte.png" alt="">
</td> </td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<h2>By adding an attribute to the note</h2>
<h2>By adding an attribute to the note</h2>
<p>Simply add the <code>#shareRaw</code> attribute and the note will always <p>Simply add the <code>#shareRaw</code> attribute and the note will always
be rendered <em>raw</em> when accessed from the share URL.</p> be rendered <em>raw</em> when accessed from the share URL.</p>
<h2>By altering the URL</h2>
<h2>By altering the URL</h2>
<p>Append <code>?raw</code> to the URL to display a note in its raw format <p>Append <code>?raw</code> to the URL to display a note in its raw format
regardless of whether the <code>#shareRaw</code> attribute is added on the regardless of whether the <code>#shareRaw</code> attribute is added on the
note.</p> note.</p>
<p> <p>
<img src="Serving directly the conte.png" alt="" /> <img src="Serving directly the conte.png" alt="">
</p> </p>
</div> </div>
</div> </div>

View File

@ -15,23 +15,17 @@
<div class="ck-content"> <div class="ck-content">
<p>Trilium can import ENEX files which are used by Evernote for backup/export. <p>Trilium can import ENEX files which are used by Evernote for backup/export.
One ENEX file represents content (notes and resources) of one notebook.</p> One ENEX file represents content (notes and resources) of one notebook.</p>
<h2>Export ENEX from Evernote</h2>
<h2>Export ENEX from Evernote</h2>
<p>To export ENEX file, you need to have a <em>legacy</em> desktop version <p>To export ENEX file, you need to have a <em>legacy</em> desktop version
of Evernote (i.e. not web/mobile). Right click on notebook and select export of Evernote (i.e. not web/mobile). Right click on notebook and select export
and follow the wizard.</p> and follow the wizard.</p>
<h2>Import ENEX in Trilium</h2>
<h2>Import ENEX in Trilium</h2>
<p>Once you have ENEX file, you can import it to Trilium. Right click on <p>Once you have ENEX file, you can import it to Trilium. Right click on
some note (to which you want to import the file), click on "Import" and some note (to which you want to import the file), click on "Import" and
select the ENEX file.</p> select the ENEX file.</p>
<p>After importing the ENEX file, go over the imported notes and resources <p>After importing the ENEX file, go over the imported notes and resources
to be sure the import went well, and you didn't lose any data.</p> to be sure the import went well, and you didn't lose any data.</p>
<h2>Limitations</h2>
<h2>Limitations</h2>
<p>All resources (except for images) are created as note's attachments.</p> <p>All resources (except for images) are created as note's attachments.</p>
<p>HTML inside ENEX files is not exactly valid so some formatting maybe broken <p>HTML inside ENEX files is not exactly valid so some formatting maybe broken
or lost. You can report major problems into <a href="https://github.com/TriliumNext/Notes/issues">Trilium issue tracker</a>. or lost. You can report major problems into <a href="https://github.com/TriliumNext/Notes/issues">Trilium issue tracker</a>.

View File

@ -16,20 +16,14 @@
<p>Trilium Notes supports importing Markdown restricted to the <a href="https://spec.commonmark.org/current/">CommonMark specification</a> (where <p>Trilium Notes supports importing Markdown restricted to the <a href="https://spec.commonmark.org/current/">CommonMark specification</a> (where
<a <a
href="https://github.com/TriliumNext/Notes/issues/2026">tables are not supported</a>)</p> href="https://github.com/TriliumNext/Notes/issues/2026">tables are not supported</a>)</p>
<h2>Import</h2>
<h2>Import</h2> <h3>Clipboard import</h3>
<h3>Clipboard import</h3>
<p>If you want to import just a chunk of markdown from clipboard, you can <p>If you want to import just a chunk of markdown from clipboard, you can
do it from editor block menu:</p> do it from editor block menu:</p>
<p> <p>
<img src="../../Attachments/markdown-inline-import.gif" alt="" /> <img src="../../Attachments/markdown-inline-import.gif" alt="">
</p> </p>
<h3>File import</h3>
<h3>File import</h3>
<p>You can also import Markdown files from files:</p> <p>You can also import Markdown files from files:</p>
<ul> <ul>
<li>single markdown file (with .md extension)</li> <li>single markdown file (with .md extension)</li>
@ -44,30 +38,22 @@
</ul> </ul>
<p>[[gifs/markdown-file-import.gif]]</p> <p>[[gifs/markdown-file-import.gif]]</p>
<p> <p>
<img src="../../Attachments/markdown-file-import.gif" alt="" /> <img src="../../Attachments/markdown-file-import.gif" alt="">
</p> </p>
<h2>Export</h2>
<h2>Export</h2> <h3>Subtree export</h3>
<h3>Subtree export</h3>
<p>You can export whole subtree to ZIP archive which will have directory <p>You can export whole subtree to ZIP archive which will have directory
structured modelled after subtree structure:</p> structured modelled after subtree structure:</p>
<p> <p>
<img src="../../Attachments/markdown-export-subtree.gif" alt="" /> <img src="../../Attachments/markdown-export-subtree.gif" alt="">
</p> </p>
<h3>Single note export</h3>
<h3>Single note export</h3>
<p>If you want to export just single note without its subtree, you can do <p>If you want to export just single note without its subtree, you can do
it from Note actions menu:</p> it from Note actions menu:</p>
<p> <p>
<img src="../../Attachments/markdown-export-note.gif" alt="" /> <img src="../../Attachments/markdown-export-note.gif" alt="">
</p> </p>
<h3>Exporting protected notes</h3>
<h3>Exporting protected notes</h3>
<p>If you want to export protected notes, enter a protected session first! <p>If you want to export protected notes, enter a protected session first!
This will export the notes in an unencrypted form, so if you reimport into This will export the notes in an unencrypted form, so if you reimport into
Trilium, make sure to re-protect these notes.</p> Trilium, make sure to re-protect these notes.</p>

View File

@ -15,9 +15,7 @@
<div class="ck-content"> <div class="ck-content">
<p><strong>This page describes a method to migrate via EverNote Legacy, but this app is no longer available/working.</strong> <p><strong>This page describes a method to migrate via EverNote Legacy, but this app is no longer available/working.</strong>
</p> </p>
<h2>Prep Onenote notes for best compatibility</h2>
<h2>Prep Onenote notes for best compatibility</h2>
<ul> <ul>
<li>Remove Onenote Tags and replace with Emoji if possible (Onenote Tags will <li>Remove Onenote Tags and replace with Emoji if possible (Onenote Tags will
get imported into trilium as an image which clutters the Trilium tree somewhat)</li> get imported into trilium as an image which clutters the Trilium tree somewhat)</li>
@ -31,12 +29,8 @@
list (Sometimes the numbered list will start at 1 again in Trilum if there list (Sometimes the numbered list will start at 1 again in Trilum if there
is an extra space in the list in OneNote).</li> is an extra space in the list in OneNote).</li>
</ul> </ul>
<h2>Migration Procedure</h2>
<h2>Migration Procedure</h2> <h3>Import into Evernote from OneNote:</h3>
<h3>Import into Evernote from OneNote:</h3>
<ul> <ul>
<li>Install <a href="https://web.archive.org/web/20230327110646/https://help.evernote.com/hc/en-us/articles/360052560314">Evernote Legacy</a>. <li>Install <a href="https://web.archive.org/web/20230327110646/https://help.evernote.com/hc/en-us/articles/360052560314">Evernote Legacy</a>.
Current versions of Evernote do not have this functionality. (Requires Current versions of Evernote do not have this functionality. (Requires
@ -48,16 +42,12 @@
<p>If exporting all sections at a time, they will not be grouped in folders <p>If exporting all sections at a time, they will not be grouped in folders
- they will all be added to a single folder, but the order will be kept, - they will all be added to a single folder, but the order will be kept,
so you can re-group into folders after importing to Trilium</p> so you can re-group into folders after importing to Trilium</p>
<h3>Export from Evernote</h3>
<h3>Export from Evernote</h3>
<ul> <ul>
<li>Right click on the created notebook in Evernote and choose "Export Notes…"</li> <li>Right click on the created notebook in Evernote and choose "Export Notes…"</li>
<li>Use the default export format of .enex</li> <li>Use the default export format of .enex</li>
</ul> </ul>
<h3>Cleanup enex file (optional)</h3>
<h3>Cleanup enex file (optional)</h3>
<ul> <ul>
<li> <li>
<p>If the Onenote header (that is at the top of each Onenote page) is not <p>If the Onenote header (that is at the top of each Onenote page) is not
@ -67,9 +57,7 @@
</p> </p>
</li> </li>
</ul> </ul>
<h3>Import into Trilium</h3>
<h3>Import into Trilium</h3>
<ul> <ul>
<li>In Trilium, right click on the root node and choose Import (all default <li>In Trilium, right click on the root node and choose Import (all default
options should be fine).</li> options should be fine).</li>
@ -77,9 +65,7 @@
<li>Be patient. Large .enex files may take a few minutes to process</li> <li>Be patient. Large .enex files may take a few minutes to process</li>
<li>Repeat import for each .enex file</li> <li>Repeat import for each .enex file</li>
</ul> </ul>
<h2>Other importing notes:</h2>
<h2>Other importing notes:</h2>
<ul> <ul>
<li>Centered text in Onenote will be left-justified after importing into Trilium</li> <li>Centered text in Onenote will be left-justified after importing into Trilium</li>
<li>Internal onenote links will obviously be broken, but the link still exists <li>Internal onenote links will obviously be broken, but the link still exists

View File

@ -20,119 +20,111 @@
Keyboard shortcuts. Using <code>global:</code> prefix, you can assign a shortcut Keyboard shortcuts. Using <code>global:</code> prefix, you can assign a shortcut
which will work even without Trilium being in focus (requires app restart which will work even without Trilium being in focus (requires app restart
to take effect).</p> to take effect).</p>
<h2>Note navigation</h2>
<h2>Note navigation</h2>
<ul> <ul>
<li><code>UP</code>, <code>DOWN</code> - go up/down in the list of notes, <code>CTRL-SHIFT-UP</code> and <code>CTRL-SHIFT-DOWN</code> work <li><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</li> also from editor</li>
<li><code>LEFT</code>, <code>RIGHT</code> - collapse/expand node</li> <li><kbd><span></span></kbd>, <kbd><span></span></kbd> - collapse/expand node</li>
<li><code>ALT+LEFT</code>, <code>ALT+RIGHT</code> - go back / forwards in the <li><kbd>Alt</kbd> + <kbd><span></span></kbd>, <kbd>Alt</kbd> + <kbd><span></span></kbd> -
history</li> go back / forwards in the history</li>
<li><code>CTRL+J</code> - show <a href="Navigation/Note%20Navigation.html">"Jump to" dialog</a> <li><kbd>Ctrl</kbd> + <kbd>J</kbd> - show <a href="Navigation/Note%20Navigation.html">"Jump to" dialog</a>
</li> </li>
<li><code>CTRL+.</code> - scroll to current note (useful when you scroll away <li><kbd>Ctrl</kbd> + <kbd>.</kbd> - scroll to current note (useful when you
from your note or your focus is currently in the editor)</li> scroll away from your note or your focus is currently in the editor)</li>
<li><code>BACKSPACE</code> - jumps to parent note</li> <li><kbd><span>Backspace</span></kbd> - jumps to parent note</li>
<li><code>ALT+C</code> - collapse whole note tree</li> <li><kbd>Alt</kbd> + <kbd>C</kbd> - collapse whole note tree</li>
<li><code>ALT+-</code> (alt with minus sign) - collapse subtree (if some subtree <li><kbd>Alt</kbd> + <kbd>-</kbd> (alt with minus sign) - collapse subtree (if
takes too much space on tree pane you can collapse it)</li> some subtree takes too much space on tree pane you can collapse it)</li>
<li>you can define a <a href="../Advanced%20Usage/Attributes.html">label</a> <code>#keyboardShortcut</code> with <li>you can define a <a href="../Advanced%20Usage/Attributes.html">label</a> <code>#keyboardShortcut</code> with
e.g. value <code>Ctrl+I</code>. Pressing this keyboard combination will e.g. value <kbd>Ctrl</kbd> + <kbd>I</kbd> . Pressing this keyboard combination
then bring you to the note on which it is defined. Note that Trilium must will then bring you to the note on which it is defined. Note that Trilium
be reloaded/restarted (Ctrl+R) for changes to be in effect.</li> must be reloaded/restarted (<kbd>Ctrl</kbd> + <kbd>R</kbd> ) for changes to
be in effect.</li>
</ul> </ul>
<p>See demo of some of these features in <a href="Navigation/Note%20Navigation.html">note navigation</a>.</p> <p>See demo of some of these features in <a href="Navigation/Note%20Navigation.html">note navigation</a>.</p>
<h2>Tabs</h2>
<h2>Tabs</h2>
<ul> <ul>
<li><code>CTRL+click</code> - (or middle mouse click) on note link opens note <li><kbd>Ctrl</kbd> + <kbd>🖱 Left click</kbd> - (or middle mouse click) on note
in a new tab</li> link opens note in a new tab</li>
</ul> </ul>
<p>Only in desktop (electron build):</p> <p>Only in desktop (electron build):</p>
<ul> <ul>
<li><code>CTRL+T</code> - opens empty tab</li> <li><kbd>Ctrl</kbd> + <kbd>T</kbd> - opens empty tab</li>
<li><code>CTRL+W</code> - closes active tab</li> <li><kbd>Ctrl</kbd> + <kbd>W</kbd> - closes active tab</li>
<li><code>CTRL+Tab</code> - activates next tab</li> <li><kbd>Ctrl</kbd> + <kbd>Tab</kbd> - activates next tab</li>
<li><code>CTRL+Shift+Tab</code> - activates previous tab</li> <li><kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>Tab</kbd> - activates previous tab</li>
</ul> </ul>
<h2>Creating notes</h2>
<h2>Creating notes</h2>
<ul> <ul>
<li><code>CTRL+O</code> - creates new note after the current note</li> <li><code>CTRL+O</code> - creates new note after the current note</li>
<li><code>CTRL+P</code> - creates new sub-note into current note</li> <li><code>CTRL+P</code> - creates new sub-note into current note</li>
<li><code>F2</code> - edit <a href="Navigation/Note%20Navigation.html">prefix</a> of <li><code>F2</code> - edit <a href="Navigation/Note%20Navigation.html">prefix</a> of
current note clone</li> current note clone</li>
</ul> </ul>
<h2>Moving / cloning notes</h2>
<h2>Moving / cloning notes</h2>
<ul> <ul>
<li><code>CTRL+UP</code>, <code>CTRL+DOWN</code> - move note up/down in the <li><kbd>Ctrl</kbd> + <kbd><span></span></kbd> , Ctrl + <kbd><span></span></kbd> -
note list</li> move note up/down in the note list</li>
<li><code>CTRL+LEFT</code> - move note up in the note tree</li> <li><kbd>Ctrl</kbd> + <kbd><span></span></kbd> - move note up in the note tree</li>
<li><code>CTRL+RIGHT</code> - move note down in the note tree</li> <li><kbd>Ctrl</kbd>+<kbd><span></span></kbd> - move note down in the note
<li><code>SHIFT+UP</code>, <code>SHIFT+DOWN</code> - multi-select note above/below</li> tree</li>
<li><code>CTRL+A</code> - select all notes in the current level</li> <li><kbd>Shift</kbd>+<kbd><span></span></kbd>, <kbd>Shift</kbd><code>+</code><kbd><span></span></kbd> -
<li><code>SHIFT+click</code> - multi select note which you clicked on</li> multi-select note above/below</li>
<li><code>CTRL+C</code> - copies current note (or current selection) into clipboard <li><kbd>Ctrl</kbd>+<kbd>A</kbd> - select all notes in the current level</li>
(used for <a href="Note/Cloning%20Notes.html">cloning</a> <li><kbd>Shift</kbd>+<kbd>🖱 Left click</kbd> - multi select note which you
clicked on</li>
<li><kbd>Ctrl</kbd>+<kbd>C</kbd> - copies current note (or current selection)
into clipboard (used for <a href="Note/Cloning%20Notes.html">cloning</a>
</li> </li>
<li><code>CTRL+X</code> - cuts current (or current selection) note into clipboard <li><kbd>Ctrl</kbd>+<kbd>X</kbd> - cuts current (or current selection) note
(used for moving notes)</li> into clipboard (used for moving notes)</li>
<li><code>CTRL+V</code> - pastes note(s) as sub-note into current note (which <li><kbd>Ctrl</kbd>+<kbd>V</kbd> - pastes note(s) as sub-note into current
is either move or clone depending on whether it was copied or cut into note (which is either move or clone depending on whether it was copied
clipboard)</li> or cut into clipboard)</li>
<li><code>DEL</code> - delete note / sub-tree</li> <li><kbd>Del</kbd> - delete note / sub-tree</li>
</ul> </ul>
<h2>Editing notes</h2>
<h2>Editing notes</h2>
<p>Trilium uses CKEditor 5 for the <a href="../Note%20Types/Text.html">text notes</a> and <p>Trilium uses CKEditor 5 for the <a href="../Note%20Types/Text.html">text notes</a> and
CodeMirror 5 for <a href="../Note%20Types/Code.html">code notes</a>. Check CodeMirror 5 for <a href="../Note%20Types/Code.html">code notes</a>. Check
the documentation of these projects to see all their built-in keyboard the documentation of these projects to see all their built-in keyboard
shortcuts.</p> shortcuts.</p>
<ul> <ul>
<li><code>ALT-F10</code> - bring up inline formatting toolbar (arrow keys <code>&lt;-</code>,<code>-&gt;</code> to <li><kbd>Alt</kbd>-<kbd>F10</kbd> - bring up inline formatting toolbar (arrow
navigate, <code>ENTER</code> to apply)</li> keys <kbd><span></span></kbd>,<kbd><span></span></kbd> to navigate, <kbd>Enter</kbd> to
<li><code>ALT-F10</code> - again to bring up block formatting toolbar</li> apply)</li>
<li><code>ENTER</code> in tree pane switches from tree pane into note title. <li><kbd>Alt</kbd>-<kbd>F10</kbd> - again to bring up block formatting toolbar</li>
Enter from note title switches focus to text editor. <code>CTRL+.</code> switches <li><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.</li> back from editor to tree pane.</li>
<li><code>CTRL+K</code> - create / edit <a href="../Note%20Types/Text/Links.html">external link</a> <li><kbd>Ctrl</kbd>+<kbd>K</kbd> - create / edit <a href="../Note%20Types/Text/Links.html">external link</a>
</li> </li>
<li><code>CTRL+L</code> - create <a href="../Note%20Types/Text/Links.html">internal (note) link</a> <li><kbd>Ctrl</kbd>+<kbd>L</kbd> - create <a href="../Note%20Types/Text/Links.html">internal (note) link</a>
</li> </li>
<li><code>ALT+T</code> - inserts current date and time at caret position</li> <li><kbd>Alt</kbd>+<kbd>T</kbd> - inserts current date and time at caret position</li>
<li><code>CTRL+.</code> - jump away from the editor to tree pane and scroll <li><kbd>Ctrl</kbd>+<kbd>.</kbd> - jump away from the editor to tree pane and
to current note</li> scroll to current note</li>
</ul> </ul>
<h2>Runtime shortcuts</h2>
<h2>Runtime shortcuts</h2>
<p>These are hooked in Electron to be similar to native browser keyboard <p>These are hooked in Electron to be similar to native browser keyboard
shortcuts.</p> shortcuts.</p>
<ul> <ul>
<li><code>F5</code>, <code>CTRL-R</code> - reloads trilium frontend</li> <li><kbd>F5</kbd>, <kbd>Ctrl</kbd>-<kbd>R</kbd> - reloads Trilium front-end</li>
<li><code>CTRL+SHIFT+I</code> - show developer tools</li> <li><kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>I</kbd> - show developer tools</li>
<li><code>CTRL+F</code> - show search dialog</li> <li><kbd>Ctrl</kbd>+<kbd>F</kbd> - show search dialog</li>
<li><code>CTRL+-</code> - zoom out</li> <li><kbd>Ctrl</kbd>+<kbd>-</kbd> - zoom out</li>
<li><code>CTRL+=</code> - zoom in</li> <li><kbd>Ctrl</kbd>+<kbd>=</kbd> - zoom in</li>
</ul> </ul>
<h2>Other</h2>
<h2>Other</h2>
<ul> <ul>
<li><code>ALT+O</code> - show SQL console (use only if you know what you're <li><kbd>Alt</kbd>+<kbd>O</kbd> - show SQL console (use only if you know what
doing)</li> you're doing)</li>
<li><code>ALT+M</code> - distraction-free mode - display only note editor, <li><kbd>Alt</kbd>+<kbd>M</kbd> - distraction-free mode - display only note
everything else is hidden</li> editor, everything else is hidden</li>
<li><code>F11</code> - toggle full screen</li> <li><kbd>F11</kbd> - toggle full screen</li>
<li><code>CTRL+S</code> - toggle <a href="Navigation/Search.html">search</a> form <li><kbd>Ctrl</kbd> + <kbd>S</kbd> - toggle <a href="Navigation/Search.html">search</a> form
in tree pane</li> in tree pane</li>
<li><code>ALT+A</code> - show note <a href="../Advanced%20Usage/Attributes.html">attributes</a> dialog</li> <li><kbd>Alt</kbd> +<kbd>A</kbd> - show note <a href="../Advanced%20Usage/Attributes.html">attributes</a> dialog</li>
</ul> </ul>
</div> </div>
</div> </div>

View File

@ -15,15 +15,13 @@
<div class="ck-content"> <div class="ck-content">
<p>To easily access selected notes, you can bookmark them. See demo:</p> <p>To easily access selected notes, you can bookmark them. See demo:</p>
<p> <p>
<img src="../../Attachments/bookmarks.gif" alt="" /> <img src="../../Attachments/bookmarks.gif" alt="">
</p> </p>
<h2>Bookmark folder</h2>
<h2>Bookmark folder</h2>
<p>Space in the left panel is limited, and you might want to bookmark many <p>Space in the left panel is limited, and you might want to bookmark many
items. One possible solution is to bookmark a folder, so it shows its children:</p> items. One possible solution is to bookmark a folder, so it shows its children:</p>
<p> <p>
<img src="../../Attachments/bookmark-folder.png" alt="" /> <img src="../../Attachments/bookmark-folder.png" alt="">
</p> </p>
<p>To do this, you need to add a <code>#bookmarkFolder</code> label to the <p>To do this, you need to add a <code>#bookmarkFolder</code> label to the
note.</p> note.</p>

View File

@ -17,7 +17,7 @@
"zoom into") a specific note and its subtree by hiding all parent and sibling "zoom into") a specific note and its subtree by hiding all parent and sibling
notes. Demo:</p> notes. Demo:</p>
<p> <p>
<img src="../../Attachments/note-hoisting.gif" alt="" /> <img src="../../Attachments/note-hoisting.gif" alt="">
</p> </p>
<p>In addition to showing only this subtree, this also narrows both full <p>In addition to showing only this subtree, this also narrows both full
text search and <a href="Note%20Navigation.html">“jump to note”</a> to just text search and <a href="Note%20Navigation.html">“jump to note”</a> to just

View File

@ -15,28 +15,22 @@
<div class="ck-content"> <div class="ck-content">
<p>One of the Trilium's goals is to provide fast and comfortable navigation <p>One of the Trilium's goals is to provide fast and comfortable navigation
between notes.</p> between notes.</p>
<h2>Backwards and forward</h2>
<h2>Backwards and forward</h2>
<p>You can use alt-left and alt-right to move back and forward in history <p>You can use alt-left and alt-right to move back and forward in history
of viewed pages.</p> of viewed pages.</p>
<p>This works identically to browser backwards / forwards, it's actually <p>This works identically to browser backwards / forwards, it's actually
using built-in browser support for this.</p> using built-in browser support for this.</p>
<p> <p>
<img src="Note Navigation_image.png" alt="" /> <img src="Note Navigation_image.png" alt="">
</p> </p>
<h2>Jump to note</h2>
<h2>Jump to note</h2>
<p>This is useful to quickly find and view arbitrary note - click on <code>Jump to</code> button <p>This is useful to quickly find and view arbitrary note - click on <code>Jump to</code> button
on the top or press <code>CTRL-J</code>. Then type part of the note name on the top or press <kbd>Ctrl</kbd> + <kbd>J</kbd> . Then type part of the
and autocomplete will help you pick the desired note.</p> note name and autocomplete will help you pick the desired note.</p>
<p> <p>
<img src="../../Attachments/jump-to.gif" alt="" /> <img src="../../Attachments/jump-to.gif" alt="">
</p> </p>
<h3>Recent notes</h3>
<h3>Recent notes</h3>
<p>Jump to note also has the ability to show the list of recently viewed <p>Jump to note also has the ability to show the list of recently viewed
/ edited notes and quickly jump to it.</p> / edited notes and quickly jump to it.</p>
<p>To access this functionality, click on <code>Jump to</code> button on the <p>To access this functionality, click on <code>Jump to</code> button on the
@ -44,7 +38,7 @@
will show the list of recent notes.</p> will show the list of recent notes.</p>
<p>Alternatively you can click on the "time" icon on the right.</p> <p>Alternatively you can click on the "time" icon on the right.</p>
<p> <p>
<img src="../../Attachments/recent-notes.gif" alt="" /> <img src="../../Attachments/recent-notes.gif" alt="">
</p> </p>
</div> </div>
</div> </div>

View File

@ -14,24 +14,19 @@
<div class="ck-content"> <div class="ck-content">
<h2>Local Search</h2> <h2>Local Search</h2>
<p>Local search allows you to search within the currently displayed note. <p>Local search allows you to search within the currently displayed note.
To initiate a local search, press CTRL-F. If using a web browser, this To initiate a local search, press <kbd>Ctrl</kbd> + <kbd>F</kbd>. If using
will be handled by the browser's native search functionality. In the desktop a web browser, this will be handled by the browser's native search functionality.
(electron) version, a separate dialog will apear.</p> In the desktop (electron) version, a separate dialog will apear.</p>
<h2>Note Search</h2>
<h2>Note Search</h2>
<p>Note search enables you to find notes by searching for text in the title, <p>Note search enables you to find notes by searching for text in the title,
content, or <a href="../../Advanced%20Usage/Attributes.html">attributes</a> of content, or <a href="../../Advanced%20Usage/Attributes.html">attributes</a> of
the notes. You also have the option to save your searches, which will create the notes. You also have the option to save your searches, which will create
a special search note which is visible on your navigation tree and contains a special search note which is visible on your navigation tree and contains
the search results as sub-items.</p> the search results as sub-items.</p>
<p>To search for notes, click on the magnifying glass icon on the toolbar <p>To search for notes, click on the magnifying glass icon on the toolbar
or press the <code>CTRL-S</code> keyboard <a href="../Keyboard%20Shortcuts.html">shortcut</a>.</p> or press the <kbd>Ctrl</kbd> + <kbd>S</kbd> keyboard <a href="../Keyboard%20Shortcuts.html">shortcut</a>.</p>
<h3>Simple Note Search Examples</h3>
<h3>Simple Note Search Examples</h3>
<ul> <ul>
<li><code>rings tolkien</code>: Full-text search to find notes containing <li><code>rings tolkien</code>: Full-text search to find notes containing
both "rings" and "tolkien".</li> both "rings" and "tolkien".</li>
@ -62,9 +57,7 @@
match a regular expression (regex). This feature has been available since match a regular expression (regex). This feature has been available since
Trilium 0.52.</li> Trilium 0.52.</li>
</ul> </ul>
<h3>Advanced Use Cases</h3>
<h3>Advanced Use Cases</h3>
<ul> <ul>
<li><code>~author.relations.son.title = 'Christopher Tolkien'</code>: Search <li><code>~author.relations.son.title = 'Christopher Tolkien'</code>: Search
for notes with an "author" relation to a note that has a "son" relation for notes with an "author" relation to a note that has a "son" relation
@ -105,16 +98,11 @@
<li><code>note.children.title = 'sub-note'</code>: Find notes with a child <li><code>note.children.title = 'sub-note'</code>: Find notes with a child
named "sub-note".</li> named "sub-note".</li>
</ul> </ul>
<h3>Search with Note Properties</h3>
<h3>Search with Note Properties</h3>
<p>Notes have properties that can be used in searches, such as <code>noteId</code>, <code>dateModified</code>, <code>dateCreated</code>, <code>isProtected</code>, <code>type</code>, <code>title</code>, <code>text</code>, <code>content</code>, <code>rawContent</code>, <code>ownedLabelCount</code>, <code>labelCount</code>, <code>ownedRelationCount</code>, <code>relationCount</code>, <code>ownedRelationCountIncludingLinks</code>, <code>relationCountIncludingLinks</code>, <code>ownedAttributeCount</code>, <code>attributeCount</code>, <code>targetRelationCount</code>, <code>targetRelationCountIncludingLinks</code>, <code>parentCount</code>, <code>childrenCount</code>, <code>isArchived</code>, <code>contentSize</code>, <code>noteSize</code>, <p>Notes have properties that can be used in searches, such as <code>noteId</code>, <code>dateModified</code>, <code>dateCreated</code>, <code>isProtected</code>, <code>type</code>, <code>title</code>, <code>text</code>, <code>content</code>, <code>rawContent</code>, <code>ownedLabelCount</code>, <code>labelCount</code>, <code>ownedRelationCount</code>, <code>relationCount</code>, <code>ownedRelationCountIncludingLinks</code>, <code>relationCountIncludingLinks</code>, <code>ownedAttributeCount</code>, <code>attributeCount</code>, <code>targetRelationCount</code>, <code>targetRelationCountIncludingLinks</code>, <code>parentCount</code>, <code>childrenCount</code>, <code>isArchived</code>, <code>contentSize</code>, <code>noteSize</code>,
and <code>revisionCount</code>.</p> and <code>revisionCount</code>.</p>
<p>These properties can be accessed via the <code>note.</code> prefix, e.g., <code>note.type = code AND note.mime = 'application/json'</code>.</p> <p>These properties can be accessed via the <code>note.</code> prefix, e.g., <code>note.type = code AND note.mime = 'application/json'</code>.</p>
<h3>Order by and Limit</h3><pre><code class="language-text-x-trilium-auto">#author=Tolkien orderBy #publicationDate desc, note.title limit 10</code></pre>
<h3>Order by and Limit</h3>
<pre><code class="language-text-x-trilium-auto">#author=Tolkien orderBy #publicationDate desc, note.title limit 10</code></pre>
<p>This example will:</p> <p>This example will:</p>
<ol> <ol>
<li>Find notes with the author label "Tolkien".</li> <li>Find notes with the author label "Tolkien".</li>
@ -123,27 +111,16 @@
are equal.</li> are equal.</li>
<li>Limit the results to the first 10 notes.</li> <li>Limit the results to the first 10 notes.</li>
</ol> </ol>
<h3>Negation</h3>
<h3>Negation</h3> <p>Some queries can only be expressed with negation:</p><pre><code class="language-text-x-trilium-auto">#book AND not(note.ancestor.title = 'Tolkien')</code></pre>
<p>Some queries can only be expressed with negation:</p>
<pre><code class="language-text-x-trilium-auto">#book AND not(note.ancestor.title = 'Tolkien')</code></pre>
<p>This query finds all book notes not in the "Tolkien" subtree.</p> <p>This query finds all book notes not in the "Tolkien" subtree.</p>
<h2>Under the Hood</h2>
<h2>Under the Hood</h2> <h3>Label and Relation Shortcuts</h3>
<p>The "full" syntax for searching by labels is:</p><pre><code class="language-text-x-trilium-auto">note.labels.publicationYear = 1954</code></pre>
<p>For relations:</p><pre><code class="language-text-x-trilium-auto">note.relations.author.title *=* Tolkien</code></pre>
<h3>Label and Relation Shortcuts</h3> <p>However, common label and relation searches have shortcut syntax:</p><pre><code class="language-text-x-trilium-auto">#publicationYear = 1954
<p>The "full" syntax for searching by labels is:</p>
<pre><code class="language-text-x-trilium-auto">note.labels.publicationYear = 1954</code></pre>
<p>For relations:</p>
<pre><code class="language-text-x-trilium-auto">note.relations.author.title *=* Tolkien</code></pre>
<p>However, common label and relation searches have shortcut syntax:</p>
<pre><code class="language-text-x-trilium-auto">#publicationYear = 1954
#author.title *=* Tolkien</code></pre> #author.title *=* Tolkien</code></pre>
<h3>Separating Full-Text and Attribute Parts</h3> <h3>Separating Full-Text and Attribute Parts</h3>
<p>Search syntax allows combining full-text search with attribute-based search <p>Search syntax allows combining full-text search with attribute-based search
seamlessly. For example, <code>tolkien #book</code> contains:</p> seamlessly. For example, <code>tolkien #book</code> contains:</p>
<ol> <ol>
@ -155,28 +132,20 @@
<p>Trilium detects the separation between full text search and attribute/property <p>Trilium detects the separation between full text search and attribute/property
search by looking for certain special characters or words that denote attributes search by looking for certain special characters or words that denote attributes
and properties (e.g., #, ~, note.). If you need to include these in full-text and properties (e.g., #, ~, note.). If you need to include these in full-text
search, escape them with a backslash so they are processed as regular text:</p> search, escape them with a backslash so they are processed as regular text:</p><pre><code class="language-text-x-trilium-auto">"note.txt"
<pre><code class="language-text-x-trilium-auto">"note.txt"
\#hash \#hash
#myLabel = 'Say "Hello World"'</code></pre> #myLabel = 'Say "Hello World"'</code></pre>
<h3>Escaping Special Characters</h3> <h3>Escaping Special Characters</h3>
<p>Special characters can be enclosed in quotes or escaped with a backslash <p>Special characters can be enclosed in quotes or escaped with a backslash
to be used in full-text search:</p> to be used in full-text search:</p><pre><code class="language-text-x-trilium-auto">"note.txt"
<pre><code class="language-text-x-trilium-auto">"note.txt"
\#hash \#hash
#myLabel = 'Say "Hello World"'</code></pre> #myLabel = 'Say "Hello World"'</code></pre>
<p>Three types of quotes are supported: single, double, and backtick.</p> <p>Three types of quotes are supported: single, double, and backtick.</p>
<h3>Type Coercion</h3>
<h3>Type Coercion</h3> <p>Label values are technically strings but can be coerced for numeric comparisons:</p><pre><code class="language-text-x-trilium-auto">note.dateCreated =* '2019-05'</code></pre>
<p>Label values are technically strings but can be coerced for numeric comparisons:</p>
<pre><code class="language-text-x-trilium-auto">note.dateCreated =* '2019-05'</code></pre>
<p>This finds notes created in May 2019. Numeric operators like <code>#publicationYear &gt;= 1960</code> convert <p>This finds notes created in May 2019. Numeric operators like <code>#publicationYear &gt;= 1960</code> convert
string values to numbers for comparison.</p> string values to numbers for comparison.</p>
<h2>Auto-Trigger Search from URL</h2>
<h2>Auto-Trigger Search from URL</h2>
<p>You can open Trilium and automatically trigger a search by including the <p>You can open Trilium and automatically trigger a search by including the
search <a href="https://meyerweb.com/eric/tools/dencoder/">url encoded</a> string search <a href="https://meyerweb.com/eric/tools/dencoder/">url encoded</a> string
in the URL:</p> in the URL:</p>

View File

@ -15,13 +15,9 @@
<div class="ck-content"> <div class="ck-content">
<p>This page explains the basic concepts related to the tree structure of <p>This page explains the basic concepts related to the tree structure of
notes in TriliumNext.</p> notes in TriliumNext.</p>
<h2>Note</h2>
<h2>Note</h2>
<p>A note is the central entity in TriliumNext. For more details, see <a href="../Note.html">Note</a>.</p> <p>A note is the central entity in TriliumNext. For more details, see <a href="../Note.html">Note</a>.</p>
<h2>Branch</h2>
<h2>Branch</h2>
<p>A branch describes the placement of a note within the note tree. Essentially, <p>A branch describes the placement of a note within the note tree. Essentially,
it is a tuple of <code>parentNoteId</code> and <code>noteId</code>, indicating it is a tuple of <code>parentNoteId</code> and <code>noteId</code>, indicating
that the given note is placed as a child under the specified parent note.</p> that the given note is placed as a child under the specified parent note.</p>
@ -29,9 +25,7 @@
multiple locations within the tree. This concept is referred to as " multiple locations within the tree. This concept is referred to as "
<a <a
href="../Note/Cloning%20Notes.html">cloning</a>."</p> href="../Note/Cloning%20Notes.html">cloning</a>."</p>
<h2>Prefix</h2>
<h2>Prefix</h2>
<p>A prefix is a branch-specific title modifier for a note. If you place <p>A prefix is a branch-specific title modifier for a note. If you place
your note in two different locations within the tree and want to alter your note in two different locations within the tree and want to alter
the title slightly in one of those placements, you can use a prefix.</p> the title slightly in one of those placements, you can use a prefix.</p>
@ -41,9 +35,7 @@
note is protected. This can be useful if you want part of the title to note is protected. This can be useful if you want part of the title to
remain visible in the tree for easier navigation, even when the note is remain visible in the tree for easier navigation, even when the note is
protected.</p> protected.</p>
<h2>Subtree</h2>
<h2>Subtree</h2>
<p>A subtree consists of a particular note (the subtree root) and all its <p>A subtree consists of a particular note (the subtree root) and all its
children and descendants. Some operations, such as exporting, work on entire children and descendants. Some operations, such as exporting, work on entire
subtrees.</p> subtrees.</p>

View File

@ -27,19 +27,17 @@
<li> <li>
<p>easy entering of workspace: </p> <p>easy entering of workspace: </p>
<p> <p>
<img src="1_Workspace_image.png" alt="" /> <img src="1_Workspace_image.png" alt="">
</p> </p>
</li> </li>
<li> <li>
<p>visual identification of workspace in tabs: <p>visual identification of workspace in tabs:
<br /> <br>
<img src="Workspace_image.png" alt="" /> <img src="Workspace_image.png" alt="">
</p> </p>
</li> </li>
</ul> </ul>
<h3>How to use workspaces</h3>
<h3>How to use workspaces</h3>
<p>Let's say you have identified the workspaces and their subtrees. Define <p>Let's say you have identified the workspaces and their subtrees. Define
on the root of this subtree following labels:</p> on the root of this subtree following labels:</p>
<ul> <ul>

View File

@ -15,9 +15,7 @@
<div class="ck-content"> <div class="ck-content">
<p>Note is a central entity in Trilium. Main attributes of note are title <p>Note is a central entity in Trilium. Main attributes of note are title
and content.</p> and content.</p>
<h3>Note types</h3>
<h3>Note types</h3>
<ul> <ul>
<li><a href="../Note%20Types/Text.html">text note</a> - this is default note <li><a href="../Note%20Types/Text.html">text note</a> - this is default note
type which allows you to put rich text, images etc.</li> type which allows you to put rich text, images etc.</li>
@ -44,23 +42,17 @@
</ul> </ul>
<p>In Trilium there's no specific "folder" note type. Any note can have children <p>In Trilium there's no specific "folder" note type. Any note can have children
and thus be a folder.</p> and thus be a folder.</p>
<h3>Root note</h3>
<h3>Root note</h3>
<p>There's one special note called "root note" which is root of the note <p>There's one special note called "root note" which is root of the note
tree. All other notes are placed below it in the structure.</p> tree. All other notes are placed below it in the structure.</p>
<h3>Tree structure</h3>
<h3>Tree structure</h3>
<p>Importantly, note itself doesn't carry information on its placement in <p>Importantly, note itself doesn't carry information on its placement in
note tree. See <a href="Note/Cloning%20Notes.html">cloning</a> for details.</p> note tree. See <a href="Note/Cloning%20Notes.html">cloning</a> for details.</p>
<p>Tree structure of notes can resemble file system - but compared to that <p>Tree structure of notes can resemble file system - but compared to that
notes in Trilium can act as both file and directory - meaning that note notes in Trilium can act as both file and directory - meaning that note
can both have its own content and have children. "Leaf note" is a note can both have its own content and have children. "Leaf note" is a note
which doesn't have any children.</p> which doesn't have any children.</p>
<h3>Deleting / undeleting notes</h3>
<h3>Deleting / undeleting notes</h3>
<p>When you delete a note in Trilium, it is actually only marked for deletion <p>When you delete a note in Trilium, it is actually only marked for deletion
(soft-delete) - the actual content, title, attributes etc. are not deleted, (soft-delete) - the actual content, title, attributes etc. are not deleted,
only hidden.</p> only hidden.</p>
@ -79,9 +71,7 @@
<p>After the 7 days (configurable) the notes will be "erased" - their title, <p>After the 7 days (configurable) the notes will be "erased" - their title,
content, revisions and attributes will be erased, and it will not be possible content, revisions and attributes will be erased, and it will not be possible
anymore to recover them (unless you restore <a href="../Installation%20%26%20Setup/Backup.html">backup</a>).</p> anymore to recover them (unless you restore <a href="../Installation%20%26%20Setup/Backup.html">backup</a>).</p>
<h2>See also</h2>
<h2>See also</h2>
<ul> <ul>
<li><a href="Note/Read-Only%20Notes.html">Read-only note</a> <li><a href="Note/Read-Only%20Notes.html">Read-only note</a>
</li> </li>

View File

@ -22,7 +22,7 @@
<p>You can control whether archived notes are displayed in the note tree <p>You can control whether archived notes are displayed in the note tree
with a setting:</p> with a setting:</p>
<p> <p>
<img src="../../Attachments/hide-archived.png" alt="" /> <img src="../../Attachments/hide-archived.png" alt="">
</p> </p>
</div> </div>
</div> </div>

View File

@ -14,7 +14,6 @@
<div class="ck-content"> <div class="ck-content">
<h2>Motivation</h2> <h2>Motivation</h2>
<p>Trilium's core feature is the ability to structure your notes into hierarchical <p>Trilium's core feature is the ability to structure your notes into hierarchical
tree-like structure.</p> tree-like structure.</p>
<p>It is expected then that you'll have an elaborate and deep note hierarchy <p>It is expected then that you'll have an elaborate and deep note hierarchy
@ -47,9 +46,7 @@
a programming language and a tool (shell) very much tied into Linux. It a programming language and a tool (shell) very much tied into Linux. It
seems it belongs to both of these, I can't (and don't want to) choose one seems it belongs to both of these, I can't (and don't want to) choose one
over the other.</p> over the other.</p>
<h2>Solution</h2>
<h2>Solution</h2>
<p>The solution to the problem shown above is to allow notes to have multiple <p>The solution to the problem shown above is to allow notes to have multiple
parents.</p> parents.</p>
<p>I call these "clones", but that is a bit misleading - there's no original <p>I call these "clones", but that is a bit misleading - there's no original
@ -94,31 +91,26 @@
<p>So now the "Bash" subtree appears on multiple locations in the hierarchy. <p>So now the "Bash" subtree appears on multiple locations in the hierarchy.
Both the Bash subtrees are the same and contain the same sub-categories Both the Bash subtrees are the same and contain the same sub-categories
and notes.</p> and notes.</p>
<h3>Demo</h3>
<h3>Demo</h3>
<p> <p>
<img src="../../Attachments/create-clone.gif" alt="" /> <img src="../../Attachments/create-clone.gif" alt="">
</p> </p>
<p>In the demo, you can see how a clone can be created using the context <p>In the demo, you can see how a clone can be created using the context
menu. It's possible to do this also using the Add Link dialog or with CTRL+C menu. It's possible to do this also using the Add Link dialog or with <kbd>Ctrl</kbd>+<kbd>C</kbd> and <kbd>Ctrl</kbd>+<kbd>V</kbd>
and CTRL+V <a href="../Keyboard%20Shortcuts.html">keyboard shortcuts</a>.</p> <a
href="../Keyboard%20Shortcuts.html">keyboard shortcuts</a>.</p>
<p>As seen in the demo, you can view the list of all available clones in <p>As seen in the demo, you can view the list of all available clones in
the "Note Paths" tab in the Ribbon toolbar.</p> the "Note Paths" tab in the Ribbon toolbar.</p>
<p>Titles of cloned notes in the tree view have an asterisk to the right <p>Titles of cloned notes in the tree view have an asterisk to the right
to easily see that the note is also placed into some other location.</p> to easily see that the note is also placed into some other location.</p>
<h2>Prefix</h2>
<h2>Prefix</h2>
<p>Since notes can be categorized into multiple places, it's recommended <p>Since notes can be categorized into multiple places, it's recommended
to choose a generalized name that fits into all locations instead of something to choose a generalized name that fits into all locations instead of something
more specific to avoid confusion. In some cases this isn't possible so more specific to avoid confusion. In some cases this isn't possible so
Trilium provides "branch prefixes", which is shown before the note name Trilium provides "branch prefixes", which is shown before the note name
in the tree and as such provides a specific kind of context. The prefix in the tree and as such provides a specific kind of context. The prefix
is location specific, so it's displayed only in the tree pane.</p> is location specific, so it's displayed only in the tree pane.</p>
<h2>Deleting notes/clones</h2>
<h2>Deleting notes/clones</h2>
<p>With clones, it might not be immediately obvious how deleting works.</p> <p>With clones, it might not be immediately obvious how deleting works.</p>
<p>If you try to delete a note, it works like this:</p> <p>If you try to delete a note, it works like this:</p>
<ol> <ol>

View File

@ -14,7 +14,7 @@
<div class="ck-content"> <div class="ck-content">
<p> <p>
<img src="Export as PDF_image.png" alt="" /> <img src="Export as PDF_image.png" alt="">
</p> </p>
<p>Screenshot of the note contextual menu indicating the “Export as PDF” <p>Screenshot of the note contextual menu indicating the “Export as PDF”
option.</p> option.</p>
@ -22,8 +22,7 @@
as PDF. On the server or PWA (mobile), the option is not available due as PDF. On the server or PWA (mobile), the option is not available due
to technical constraints and it will be hidden.</p> to technical constraints and it will be hidden.</p>
<p>To print a note, select the <p>To print a note, select the
<img src="1_Export as PDF_image.png" alt="" <img src="1_Export as PDF_image.png" alt="">button to the right of the note and select <em>Export as PDF</em>.</p>
/>button to the right of the note and select <em>Export as PDF</em>.</p>
<p>Afterwards you will be prompted to select where to save the PDF file. <p>Afterwards you will be prompted to select where to save the PDF file.
Upon confirmation, the resulting PDF will be opened automatically using Upon confirmation, the resulting PDF will be opened automatically using
the default/system application configured for PDFs.</p> the default/system application configured for PDFs.</p>
@ -32,24 +31,18 @@
<a <a
href="#root/OeKBfN6JbMIq/jRV1MPt4mNSP/hrC6xn7hnDq5">report the issue</a>. In this case, it's best to offer a sample note (click href="#root/OeKBfN6JbMIq/jRV1MPt4mNSP/hrC6xn7hnDq5">report the issue</a>. In this case, it's best to offer a sample note (click
on the on the
<img src="1_Export as PDF_image.png" alt="" />button, select Export note → This note and all of its descendants → HTML <img src="1_Export as PDF_image.png" alt="">button, select Export note → This note and all of its descendants → HTML
in ZIP archive). Make sure not to accidentally leak any personal information.</p> in ZIP archive). Make sure not to accidentally leak any personal information.</p>
<h2>Landscape mode</h2>
<h2>Landscape mode</h2>
<p>When exporting to PDF, there are no customizable settings such as page <p>When exporting to PDF, there are no customizable settings such as page
orientation, size, etc. However, it is possible to specify a given note orientation, size, etc. However, it is possible to specify a given note
to be printed as a PDF in landscape mode by adding the <code>#printLandscape</code> attribute to be printed as a PDF in landscape mode by adding the <code>#printLandscape</code> attribute
to it (see <a href="#root/9QRytp0ZYFIf/PnO38wN0ffOA">[missing note]</a>).</p> to it (see <a href="#root/9QRytp0ZYFIf/PnO38wN0ffOA">[missing note]</a>).</p>
<h2>Page size</h2>
<h2>Page size</h2>
<p>By default, the resulting PDF will be in Letter format. It is possible <p>By default, the resulting PDF will be in Letter format. It is possible
to adjust it to another page size via the <code>#printPageSize</code> attribute, to adjust it to another page size via the <code>#printPageSize</code> attribute,
with one of the following values: <code>A0</code>, <code>A1</code>, <code>A2</code>, <code>A3</code>, <code>A4</code>, <code>A5</code>, <code>A6</code>, <code>Legal</code>, <code>Letter</code>, <code>Tabloid</code>, <code>Ledger</code>.</p> with one of the following values: <code>A0</code>, <code>A1</code>, <code>A2</code>, <code>A3</code>, <code>A4</code>, <code>A5</code>, <code>A6</code>, <code>Legal</code>, <code>Letter</code>, <code>Tabloid</code>, <code>Ledger</code>.</p>
<h2>Keyboard shortcut</h2>
<h2>Keyboard shortcut</h2>
<p>It's possible to trigger the export to PDF from the keyboard by going <p>It's possible to trigger the export to PDF from the keyboard by going
to <em>Keyboard shortcuts</em> and assigning a key combination for the <code>exportAsPdf</code> action.</p> to <em>Keyboard shortcuts</em> and assigning a key combination for the <code>exportAsPdf</code> action.</p>
</div> </div>

View File

@ -20,12 +20,10 @@
the css class names is not necessary. While editing a note, click on the the css class names is not necessary. While editing a note, click on the
icon next to the title to bring up a chooser gallery:</p> icon next to the title to bring up a chooser gallery:</p>
<p> <p>
<img src="../../Attachments/note-icon-change.png" alt="change note icon" <img src="../../Attachments/note-icon-change.png" alt="change note icon">
/>
</p> </p>
<p> <p>
<img src="../../Attachments/note-icon-gallery.png" alt="note icon gallery" <img src="../../Attachments/note-icon-gallery.png" alt="note icon gallery">
/>
</p> </p>
</div> </div>
</div> </div>

View File

@ -15,18 +15,14 @@
<div class="ck-content"> <div class="ck-content">
<p>Trilium supports seamless versioning of notes by storing snapshots ("revisions") <p>Trilium supports seamless versioning of notes by storing snapshots ("revisions")
of notes at regular intervals.</p> of notes at regular intervals.</p>
<h2>Note Revisions Snapshot Interval</h2>
<h2>Note Revisions Snapshot Interval</h2>
<p>Time interval of taking note snapshot is configurable in the Options -&gt; <p>Time interval of taking note snapshot is configurable in the Options -&gt;
Other dialog. This provides a tradeoff between more revisions and more Other dialog. This provides a tradeoff between more revisions and more
data to store.</p> data to store.</p>
<p>To turn off note versioning for a particular note (or subtree), add <code>disableVersioning</code> <p>To turn off note versioning for a particular note (or subtree), add <code>disableVersioning</code>
<a <a
href="../../Advanced%20Usage/Attributes.html">label</a>to the note.</p> href="../../Advanced%20Usage/Attributes.html">label</a>to the note.</p>
<h2>Note Revision Snapshots Limit</h2>
<h2>Note Revision Snapshots Limit</h2>
<p>The limit on the number of note snapshots can be configured in the Options <p>The limit on the number of note snapshots can be configured in the Options
-&gt; Other dialog. The note revision snapshot number limit refers to the -&gt; Other dialog. The note revision snapshot number limit refers to the
maximum number of revisions that can be saved for each note. Where -1 means maximum number of revisions that can be saved for each note. Where -1 means
@ -39,7 +35,7 @@
<p>Note revisions can be accessed through the button on the right of ribbon <p>Note revisions can be accessed through the button on the right of ribbon
toolbar.</p> toolbar.</p>
<p> <p>
<img src="../../Attachments/note-revisions.png" alt="" /> <img src="../../Attachments/note-revisions.png" alt="">
</p> </p>
</div> </div>
</div> </div>

View File

@ -41,18 +41,13 @@
cannot read or edit protected notes, they can still delete or move them cannot read or edit protected notes, they can still delete or move them
outside of the protected session.</li> outside of the protected session.</li>
</ul> </ul>
<h2>Using Protected Notes</h2>
<h2>Using Protected Notes</h2>
<p>By default, notes are unprotected. To protect a note, simply click on <p>By default, notes are unprotected. To protect a note, simply click on
the shield icon next to the note's title, as shown here:</p> the shield icon next to the note's title, as shown here:</p>
<p> <p>
<img src="../../Attachments/protecting-note.gif" alt="example animation of unlocking protected notes" <img src="../../Attachments/protecting-note.gif" alt="example animation of unlocking protected notes">
/>
</p> </p>
<h2>What is Encrypted?</h2>
<h2>What is Encrypted?</h2>
<p>Trilium encrypts the data within protected notes but not their metadata. <p>Trilium encrypts the data within protected notes but not their metadata.
Specifically:</p> Specifically:</p>
<p><strong>Encrypted:</strong> <p><strong>Encrypted:</strong>
@ -71,9 +66,7 @@
<li><a href="../../Advanced%20Usage/Attributes.html">Attributes</a> <li><a href="../../Advanced%20Usage/Attributes.html">Attributes</a>
</li> </li>
</ul> </ul>
<h2>Encryption Details</h2>
<h2>Encryption Details</h2>
<p>The following steps outline how encryption and decryption work in Trilium:</p> <p>The following steps outline how encryption and decryption work in Trilium:</p>
<ol> <ol>
<li>The user enters a password.</li> <li>The user enters a password.</li>
@ -105,9 +98,7 @@
</ul> </ul>
</li> </li>
</ol> </ol>
<h2>Sharing Protected Notes</h2>
<h2>Sharing Protected Notes</h2>
<p>Protected notes cannot be shared in the same way as regular notes. Their <p>Protected notes cannot be shared in the same way as regular notes. Their
encryption ensures that only authorized users with the correct password encryption ensures that only authorized users with the correct password
can access them.</p> can access them.</p>

View File

@ -17,14 +17,10 @@
in Trilium can be set to read-only. When a note is in read-only mode, it in Trilium can be set to read-only. When a note is in read-only mode, it
is presented to the user in a non-editable view, with the option to switch is presented to the user in a non-editable view, with the option to switch
to editing mode if needed.</p> to editing mode if needed.</p>
<h2>Setting Read-Only Mode with a Label</h2>
<h2>Setting Read-Only Mode with a Label</h2>
<p>To set a note as read-only, add the <code>readOnly</code> <a href="../../Advanced%20Usage/Attributes.html">label</a> to <p>To set a note as read-only, add the <code>readOnly</code> <a href="../../Advanced%20Usage/Attributes.html">label</a> to
the note.</p> the note.</p>
<h2>Automatic Read-Only Mode</h2>
<h2>Automatic Read-Only Mode</h2>
<p>For optimization purposes, Trilium will automatically set very large notes <p>For optimization purposes, Trilium will automatically set very large notes
to read-only. Displaying such lengthy notes in editing mode can slow down to read-only. Displaying such lengthy notes in editing mode can slow down
performance, especially when editing is unnecessary.</p> performance, especially when editing is unnecessary.</p>

View File

@ -14,14 +14,11 @@
<div class="ck-content"> <div class="ck-content">
<h2>Sorting Notes</h2> <h2>Sorting Notes</h2>
<p>You can sort notes by right-clicking the parent note in the note tree <p>You can sort notes by right-clicking the parent note in the note tree
and selecting Advanced -&gt; Sort notes by ... This will sort existing and selecting Advanced -&gt; Sort notes by ... This will sort existing
notes, but will not automatically sort future notes added to this parent notes, but will not automatically sort future notes added to this parent
note</p> note</p>
<h2>Automatic/Permanent Sorting</h2>
<h2>Automatic/Permanent Sorting</h2>
<p>Child notes can be automatically sorted by attaching specific <a href="../../Advanced%20Usage/Attributes.html">labels</a> to <p>Child notes can be automatically sorted by attaching specific <a href="../../Advanced%20Usage/Attributes.html">labels</a> to
the parent note:</p> the parent note:</p>
<ul> <ul>

View File

@ -14,17 +14,14 @@
<div class="ck-content"> <div class="ck-content">
<h2>Default Themes</h2> <h2>Default Themes</h2>
<p>Trilium comes with a couple pre-installed color themes, with the default <p>Trilium comes with a couple pre-installed color themes, with the default
being a light theme. To switch to a dark theme or any other available theme, being a light theme. To switch to a dark theme or any other available theme,
navigate to the Options menu (accessible via the app icon in the top-left navigate to the Options menu (accessible via the app icon in the top-left
corner), select the Appearance tab, and choose your preferred theme.</p> corner), select the Appearance tab, and choose your preferred theme.</p>
<p> <p>
<img src="../Attachments/dark-theme.png" alt="Dark Theme" /> <img src="../Attachments/dark-theme.png" alt="Dark Theme">
</p> </p>
<h2>Creating Custom CSS Themes</h2>
<h2>Creating Custom CSS Themes</h2>
<p>Trilium supports custom user themes, allowing you to personalize the application's <p>Trilium supports custom user themes, allowing you to personalize the application's
appearance. To create a custom theme, follow these steps:</p> appearance. To create a custom theme, follow these steps:</p>
<ol> <ol>
@ -34,8 +31,7 @@
your note, where <code>my-theme-name</code> is the name of your custom theme.</li> your note, where <code>my-theme-name</code> is the name of your custom theme.</li>
<li><strong>Define Your Styles</strong>: Write your custom CSS within the <li><strong>Define Your Styles</strong>: Write your custom CSS within the
note. Below is an example of a custom theme:</li> note. Below is an example of a custom theme:</li>
</ol> </ol><pre><code class="language-text-x-trilium-auto">@font-face {
<pre><code class="language-text-x-trilium-auto">@font-face {
font-family: 'Raleway'; font-family: 'Raleway';
font-style: normal; font-style: normal;
font-weight: 400; font-weight: 400;
@ -89,7 +85,6 @@ body .CodeMirror {
filter: invert(100%) hue-rotate(180deg); filter: invert(100%) hue-rotate(180deg);
}</code></pre> }</code></pre>
<h3>Activating Your Custom Theme</h3> <h3>Activating Your Custom Theme</h3>
<p>Once you've created your custom theme:</p> <p>Once you've created your custom theme:</p>
<ol> <ol>
<li>Go to "Menu" -&gt; "Options" -&gt; "Appearance."</li> <li>Go to "Menu" -&gt; "Options" -&gt; "Appearance."</li>
@ -97,29 +92,23 @@ body .CodeMirror {
under the name you provided with the <code>#appTheme</code> <a href="../Advanced%20Usage/Attributes.html">label</a>.</li> under the name you provided with the <code>#appTheme</code> <a href="../Advanced%20Usage/Attributes.html">label</a>.</li>
<li>Select your custom theme to activate it.</li> <li>Select your custom theme to activate it.</li>
</ol> </ol>
<p>If you make changes to your theme, press <code>CTRL-R</code> to reload the <p>If you make changes to your theme, press <kbd>Ctrl</kbd> + <kbd>R</kbd> to
frontend and apply your updates.</p> reload the frontend and apply your updates.</p>
<h3>Sharing and Importing Themes</h3>
<h3>Sharing and Importing Themes</h3>
<p>Custom themes can be exported as <code>.tar</code> archives, which can be <p>Custom themes can be exported as <code>.tar</code> archives, which can be
shared with other users. However, be cautious when importing themes from shared with other users. However, be cautious when importing themes from
untrusted sources, as they may contain executable scripts that could pose untrusted sources, as they may contain executable scripts that could pose
security risks.</p> security risks.</p>
<p>An example user theme, <em>Steel Blue</em>, is available in the <a href="#root/xjSsCcvVZf6H">demo document</a>.</p> <p>An example user theme, <em>Steel Blue</em>, is available in the <a href="#root/xjSsCcvVZf6H">demo document</a>.</p>
<p> <p>
<img src="../Attachments/steel-blue.png" alt="Steel Blue Theme" /> <img src="../Attachments/steel-blue.png" alt="Steel Blue Theme">
</p> </p>
<h3>Using Custom CSS for Specific Purposes</h3>
<h3>Using Custom CSS for Specific Purposes</h3>
<p>In addition to full themes, Trilium allows for custom CSS that isn't tied <p>In addition to full themes, Trilium allows for custom CSS that isn't tied
to a theme. This can be particularly useful in scripting contexts, where to a theme. This can be particularly useful in scripting contexts, where
you might want to modify specific UI elements, such as changing the colors you might want to modify specific UI elements, such as changing the colors
of notes in the tree view.</p> of notes in the tree view.</p>
<h3>Applying Custom CSS</h3>
<h3>Applying Custom CSS</h3>
<p>To use custom CSS:</p> <p>To use custom CSS:</p>
<ol> <ol>
<li><strong>Create a CSS Code Note</strong>: Create a new <a href="../Note%20Types/Code.html">code note</a> with <li><strong>Create a CSS Code Note</strong>: Create a new <a href="../Note%20Types/Code.html">code note</a> with
@ -128,21 +117,18 @@ body .CodeMirror {
Annotate the note with the <code>#appCss</code> <a href="../Advanced%20Usage/Attributes.html">label</a>.</li> Annotate the note with the <code>#appCss</code> <a href="../Advanced%20Usage/Attributes.html">label</a>.</li>
<li><strong>Write Your CSS</strong>: Add your custom CSS rules to the note.</li> <li><strong>Write Your CSS</strong>: Add your custom CSS rules to the note.</li>
</ol> </ol>
<p>For example:</p> <p>For example:</p><pre><code class="language-text-x-trilium-auto">/* Custom CSS to style specific elements */
<pre><code class="language-text-x-trilium-auto">/* Custom CSS to style specific elements */
.tree-item { .tree-item {
color: #ff6347; /* Change tree item color */ color: #ff6347; /* Change tree item color */
}</code></pre> }</code></pre>
<p>When Trilium's frontend starts, all notes labeled with <code>appCss</code> are <p>When Trilium's frontend starts, all notes labeled with <code>appCss</code> are
automatically included in the style element of the HTML page.</p> automatically included in the style element of the HTML page.</p>
<p>After making changes, press <code>CTRL-R</code> to reload the frontend and <p>After making changes, press <kbd>Ctrl</kbd> + <kbd>R</kbd> to reload the frontend
apply your new styles.</p> and apply your new styles.</p>
<p> <p>
<img src="Themes_image.png" alt="" /> <img src="Themes_image.png" alt="">
</p> </p>
<h3>Styling Specific Notes in the Tree</h3>
<h3>Styling Specific Notes in the Tree</h3>
<p>To apply specific styles to certain notes in the tree:</p> <p>To apply specific styles to certain notes in the tree:</p>
<ul> <ul>
<li><strong>Use the</strong> <code>**cssClass**</code> <strong>Attribute</strong>: <li><strong>Use the</strong> <code>**cssClass**</code> <strong>Attribute</strong>:
@ -154,15 +140,11 @@ body .CodeMirror {
</ul> </ul>
<p>For example, if you want to style notes of a specific type, such as notes <p>For example, if you want to style notes of a specific type, such as notes
containing PNG images, you can target them with classes like <code>type-image mime-image-png</code>.</p> containing PNG images, you can target them with classes like <code>type-image mime-image-png</code>.</p>
<h3>User-Provided Themes</h3>
<h3>User-Provided Themes</h3>
<p>A gallery of user-created themes is available, showcasing the variety <p>A gallery of user-created themes is available, showcasing the variety
of customizations that the Trilium community has developed. For more information, of customizations that the Trilium community has developed. For more information,
visit the <a href="Themes/Theme%20Gallery.html">Theme Gallery</a>.</p> visit the <a href="Themes/Theme%20Gallery.html">Theme Gallery</a>.</p>
<h3>Asset Path Management</h3>
<h3>Asset Path Management</h3>
<p>When referencing built-in assets like images in your custom themes or <p>When referencing built-in assets like images in your custom themes or
CSS, you can avoid hardcoding version numbers by using the <code>vX</code> alias. CSS, you can avoid hardcoding version numbers by using the <code>vX</code> alias.
For example, instead of specifying <code>/assets/v0.57.0-beta/images/icon-grey.png</code>, For example, instead of specifying <code>/assets/v0.57.0-beta/images/icon-grey.png</code>,

View File

@ -14,9 +14,7 @@
<div class="ck-content"> <div class="ck-content">
<p>These are user-created themes which were made publicly available:</p> <p>These are user-created themes which were made publicly available:</p>
<h2>Legacy Themes</h2>
<h2>Legacy Themes</h2>
<p>These themes may or may not be compatible with the latest versions of <p>These themes may or may not be compatible with the latest versions of
TriliumNext and are based on the original/legacy theme.</p> TriliumNext and are based on the original/legacy theme.</p>
<table> <table>

View File

@ -16,10 +16,10 @@
<p>The global menu configures the current window (zoom, keeping the window <p>The global menu configures the current window (zoom, keeping the window
on top) and offers access to some more advanced options.</p> on top) and offers access to some more advanced options.</p>
<p> <p>
<img src="2_Global menu_image.png" width="245" height="332"> <img src="2_Global menu_image.png" alt="">
</p> </p>
<h2>Accessing the global menu</h2> <h2>Accessing the global menu</h2>
<p>See&nbsp;<a class="reference-link" href="Vertical%20and%20horizontal%20layout.html">Vertical and horizontal layout</a>&nbsp;since <p>See <a href="Vertical%20and%20horizontal%20layout.html">Vertical and horizontal layout</a> since
the position of the global menu is changed based on which layout has been the position of the global menu is changed based on which layout has been
selected.</p> selected.</p>
</div> </div>

View File

@ -16,7 +16,7 @@
<h2>Position of the Launch bar</h2> <h2>Position of the Launch bar</h2>
<p>Depending on the layout selected, the launcher bar will either be on the <p>Depending on the layout selected, the launcher bar will either be on the
left side of the screen with buttons displayed vertically or at the top left side of the screen with buttons displayed vertically or at the top
of the screen. See&nbsp;<a class="reference-link" href="Vertical%20and%20horizontal%20layout.html">Vertical and horizontal layout</a>&nbsp;for of the screen. See <a href="Vertical%20and%20horizontal%20layout.html">Vertical and horizontal layout</a> for
more information.</p> more information.</p>
<h2>Terminology</h2> <h2>Terminology</h2>
<ul> <ul>
@ -31,42 +31,41 @@
<p>There are two ways to configure the launch bar:</p> <p>There are two ways to configure the launch bar:</p>
<ul> <ul>
<li>Right click in the empty space between launchers on the launch bar and <li>Right click in the empty space between launchers on the launch bar and
select <i>Configure Launchbar.</i> select <em>Configure Launchbar.</em>
</li> </li>
<li>Click on the&nbsp;<a class="reference-link" href="Global%20menu.html">Global menu</a>&nbsp;and <li>Click on the <a href="Global%20menu.html">Global menu</a> and select <em>Configure Launchbar</em>.</li>
select <i>Configure Launchbar</i>.</li>
</ul> </ul>
<p>This will open a new tab with the&nbsp;<a class="reference-link" href="Note%20Tree.html">Note Tree</a>&nbsp;listing <p>This will open a new tab with the <a href="Note%20Tree.html">Note Tree</a> listing
the launchers.</p> the launchers.</p>
<p> <p>
<img src="Launch Bar_image.png" width="355" height="104"> <img src="Launch Bar_image.png" alt="">
</p> </p>
<p>Expanding <i>Available Launchers</i> section will show the list of launchers <p>Expanding <em>Available Launchers</em> section will show the list of launchers
that are not displayed on the launch bar. The <i>Visible Launchers</i> will that are not displayed on the launch bar. The <em>Visible Launchers</em> will
show the ones that are currently displayed.</p> show the ones that are currently displayed.</p>
<h3>Adding/removing and reordering launchers</h3> <h3>Adding/removing and reordering launchers</h3>
<p>To display a new launcher in the launch bar, first look for it in the <i>Available Launchers</i> section. <p>To display a new launcher in the launch bar, first look for it in the <em>Available Launchers</em> section.
Then right click it and select <i>Move to visible launchers</i>. It is also Then right click it and select <em>Move to visible launchers</em>. It is
possible to drag and drop the item manually.</p> also possible to drag and drop the item manually.</p>
<p>Similarly, to remove it from the launch bar, simply look for it in <i>Visible Launchers</i> then <p>Similarly, to remove it from the launch bar, simply look for it in <em>Visible Launchers</em> then
right click it and select <i>Move to available launchers </i>or use drag-and-drop.</p> right click it and select <em>Move to available launchers</em> or use drag-and-drop.</p>
<p>Drag-and-drop the items in the&nbsp;tree&nbsp;in order to change their <p>Drag-and-drop the items in the tree in order to change their order. See 
order. See&nbsp;<a class="reference-link" href="Note%20Tree.html">Note Tree</a>&nbsp;for <a
more interaction options, including using keyboard shortcuts.</p> href="Note%20Tree.html">Note Tree</a> for more interaction options, including using keyboard shortcuts.</p>
<h2>Customizing the launcher</h2> <h2>Customizing the launcher</h2>
<ul> <ul>
<li>The icon of a launcher can be changed just like a normal note. See&nbsp; <li>The icon of a launcher can be changed just like a normal note. See 
<a <a
class="reference-link" href="../Note/Note%20Icons.html">Note Icons</a>&nbsp;for more information.</li> href="../Note/Note%20Icons.html">Note Icons</a> for more information.</li>
<li>The title of the launcher can also be changed.</li> <li>The title of the launcher can also be changed.</li>
</ul> </ul>
<h3>Resetting</h3> <h3>Resetting</h3>
<p>Resetting allows restoring the original configuration of Trilium for the <p>Resetting allows restoring the original configuration of Trilium for the
launcher bar, or for a portion of it. Simply right click a launcher (or launcher bar, or for a portion of it. Simply right click a launcher (or
even the entire <i>Launch Bar</i> section) and select <i>Reset</i> to bring even the entire <em>Launch Bar</em> section) and select <em>Reset</em> to bring
it back to the original state.</p> it back to the original state.</p>
<h3>Creating new launchers / types of launchers</h3> <h3>Creating new launchers / types of launchers</h3>
<p>Right click either the <i>Available launchers</i> or <i>Visible launchers</i> sections <p>Right click either the <em>Available launchers</em> or <em>Visible launchers</em> sections
and select one of the options:</p> and select one of the options:</p>
<ol> <ol>
<li> <li>
@ -74,38 +73,35 @@
<br>A note launcher will simply navigate to a specified note.</p> <br>A note launcher will simply navigate to a specified note.</p>
<ol> <ol>
<li>Set the <code>target</code> promoted attribute to the note to navigate to.</li> <li>Set the <code>target</code> promoted attribute to the note to navigate to.</li>
<li>Optionally, set <code>hoistedNote</code> to hoist a particular note. See&nbsp; <li>Optionally, set <code>hoistedNote</code> to hoist a particular note. See 
<a <a
class="reference-link" href="../Navigation/Note%20Hoisting.html">Note Hoisting</a>&nbsp;for more information.</li> href="../Navigation/Note%20Hoisting.html">Note Hoisting</a> for more information.</li>
<li>Optionally, set a <code>keyboardShortcut</code> to trigger the launcher.</li> <li>Optionally, set a <code>keyboardShortcut</code> to trigger the launcher.</li>
</ol> </ol>
<p>&nbsp;</p>
</li> </li>
<li> <li>
<p><strong>Script Launcher</strong> <p><strong>Script Launcher</strong>
<br>An advanced launcher which will run a script upon pressing. See&nbsp; <br>An advanced launcher which will run a script upon pressing. See <a href="../../Note%20Types/Code/Scripts.html">Scripts</a> for
<a more information.</p>
class="reference-link" href="../../Note%20Types/Code/Scripts.html">Scripts</a>&nbsp;for more information.</p>
<ol> <ol>
<li>Set <code>script</code> to point to the desired script to run.</li> <li>Set <code>script</code> to point to the desired script to run.</li>
<li>Optionally, set a <code>keyboardShortcut</code> to trigger the launcher.</li> <li>Optionally, set a <code>keyboardShortcut</code> to trigger the launcher.</li>
</ol> </ol>
<p>&nbsp;</p>
</li> </li>
<li> <li>
<p><strong>Custom Widget</strong> <p><strong>Custom Widget</strong>
</p> </p>
<p>Allows defining a custom widget to be rendered inside the launcher. See&nbsp; <p>Allows defining a custom widget to be rendered inside the launcher. See 
<a <a
class="reference-link" href="../../Developer%20Guides/Widget%20Basics.html">Widget Basics</a>&nbsp;for more information.</p> href="../../Developer%20Guides/Widget%20Basics.html">Widget Basics</a> for more information.</p>
<p>&nbsp;</p>
</li> </li>
<li><strong>Spacers</strong> <li>
<p><strong>Spacers</strong>
<br>Launchers that create some distance between other launchers for better <br>Launchers that create some distance between other launchers for better
visual distinction.</li> visual distinction.</p>
</li>
</ol> </ol>
<p>Launchers are configured via predefined&nbsp;<a class="reference-link" <p>Launchers are configured via predefined <a href="../../Advanced%20Usage/Attributes/Promoted%20Attributes.html">Promoted Attributes</a>.</p>
href="../../Advanced%20Usage/Attributes/Promoted%20Attributes.html">Promoted Attributes</a>.</p>
</div> </div>
</div> </div>
</body> </body>

View File

@ -16,7 +16,7 @@
<p>This page explains how to manipulate the note tree in TriliumNext, focusing <p>This page explains how to manipulate the note tree in TriliumNext, focusing
on moving notes.</p> on moving notes.</p>
<p> <p>
<img src="1_Note Tree_image.png" width="284" height="459"> <img src="1_Note Tree_image.png" alt="">
</p> </p>
<h2>Drag and Drop</h2> <h2>Drag and Drop</h2>
<p> <p>
@ -30,31 +30,32 @@
<a <a
href="../Keyboard%20Shortcuts.html">shortcuts</a>:</p> href="../Keyboard%20Shortcuts.html">shortcuts</a>:</p>
<ul> <ul>
<li><code>CTRL-UP</code> and <code>CTRL-DOWN</code>: Move the note up or down <li><kbd>Ctrl</kbd> + <kbd><span></span></kbd> and <kbd>Ctrl</kbd> +<kbd><span></span></kbd>:
in the order.</li> Move the note up or down in the order.</li>
<li><code>CTRL-LEFT</code>: Move the note up in the hierarchy by changing <li><kbd>Ctrl</kbd>+<kbd><span></span></kbd>: Move the note up in the hierarchy
its parent to the note's grandparent.</li> by changing its parent to the note's grandparent.</li>
<li><code>CTRL-RIGHT</code>: Move the note down in the hierarchy by setting <li><kbd>Ctrl</kbd>+<kbd><span></span></kbd>: Move the note down in the hierarchy
its parent to the note currently above it (this action is best understood by setting its parent to the note currently above it (this action is best
through a demo or hands-on experience).</li> understood through a demo or hands-on experience).</li>
<li><code>LEFT</code> and <code>RIGHT</code>: Expand and collapse a sub-tree.</li> <li><kbd><span></span></kbd> and <kbd><span></span></kbd>: Expand and collapse
a sub-tree.</li>
</ul> </ul>
<h2>Context Menu</h2> <h2>Context Menu</h2>
<p>You can also move notes using the familiar cut and paste functions available <p>You can also move notes using the familiar cut and paste functions available
in the context menu, or with the associated keyboard <a href="../Keyboard%20Shortcuts.html">shortcuts</a>: <code>CTRL-C</code> ( in the context menu, or with the associated keyboard <a href="../Keyboard%20Shortcuts.html">shortcuts</a>: <code>CTRL-C</code> (
<a <a
href="../Note/Cloning%20Notes.html">copy</a>), <code>CTRL-X</code> (cut) and <code>CTRL-V</code> (paste).</p> href="../Note/Cloning%20Notes.html">copy</a>), <kbd>Ctrl</kbd> + <kbd>X</kbd> (cut) and <kbd>Ctrl</kbd> + <kbd>V</kbd> (paste).</p>
<h2>Multiple selection</h2> <h2>Multiple selection</h2>
<p>It is possible to select multiple notes at one time.</p> <p>It is possible to select multiple notes at one time.</p>
<p>To do so, first select the note to start the selection with. Then hold <p>To do so, first select the note to start the selection with. Then hold
Shift and click on the note to end the selection with. All the notes between Shift and click on the note to end the selection with. All the notes between
the start and the end note will be selected as well.</p> the start and the end note will be selected as well.</p>
<p> <p>
<img src="Note Tree_image.png" width="233" height="205"> <img src="Note Tree_image.png" alt="">
</p> </p>
<p>In the right-click menu, operations such as Cut, Copy, Move to, Clone <p>In the right-click menu, operations such as Cut, Copy, Move to, Clone
to or Delete will apply to all the selected notes. It is also possible to or Delete will apply to all the selected notes. It is also possible
to apply&nbsp;<a class="reference-link" href="../../Advanced%20Usage/Bulk%20actions.html">Bulk actions</a>&nbsp;to to apply <a href="../../Advanced%20Usage/Bulk%20actions.html">Bulk actions</a> to
them. The rest of the options will not be available and will appear disabled them. The rest of the options will not be available and will appear disabled
in the menu.</p> in the menu.</p>
</div> </div>

View File

@ -13,16 +13,15 @@
<h1 data-trilium-h1>Ribbon</h1> <h1 data-trilium-h1>Ribbon</h1>
<div class="ck-content"> <div class="ck-content">
<figure class="image"> <p>
<img style="aspect-ratio:1073/202;" src="Ribbon_image.png" width="1073" <img src="Ribbon_image.png" alt="">
height="202"> </p>
</figure>
<p>The ribbon allows changing options, attributes and viewing information <p>The ribbon allows changing options, attributes and viewing information
about the current note.</p> about the current note.</p>
<h2>Settings</h2> <h2>Settings</h2>
<p>It is possible to change whether some ribbon items will be automatically <p>It is possible to change whether some ribbon items will be automatically
open when navigating to a new note. To do so, in&nbsp;<a class="reference-link" open when navigating to a new note. To do so, in <a href="Options.html">Settings</a>,
href="Options.html">Settings</a>, go to <i>Appearance</i> and look for the <i>Ribbon widgets</i> section.</p> go to <em>Appearance</em> and look for the <em>Ribbon widgets</em> section.</p>
</div> </div>
</div> </div>
</body> </body>

View File

@ -18,52 +18,47 @@
<h3>Vertical layout</h3> <h3>Vertical layout</h3>
<p>The vertical layout is Trilium's original layout:</p> <p>The vertical layout is Trilium's original layout:</p>
<ul> <ul>
<li>The&nbsp;<a class="reference-link" href="Launch%20Bar.html">Launcher Bar</a>&nbsp;is <li>The <a href="Launch%20Bar.html">Launcher Bar</a> is positioned on the
positioned on the left side of the screen, with buttons being laid out left side of the screen, with buttons being laid out vertically.</li>
vertically.</li> <li>The tab bar is at the top, but to the right of the <a href="Note%20Tree.html">Note Tree</a>.</li>
<li>The tab bar is at the top, but to the right of the&nbsp;<a class="reference-link" <li>The <a href="Quick%20search.html">Quick search</a> is at the top of the 
<a
href="Note%20Tree.html">Note Tree</a>.</li> href="Note%20Tree.html">Note Tree</a>.</li>
<li>The&nbsp;<a class="reference-link" href="Quick%20search.html">Quick search</a>&nbsp;is <li>The <a href="Note%20Tree.html">Note Tree</a> can be collapsed by pressing
at the top of the&nbsp;<a class="reference-link" href="Note%20Tree.html">Note Tree</a>.</li> the
<li>The&nbsp;<a class="reference-link" href="Note%20Tree.html">Note Tree</a>&nbsp;can <img src="6_Vertical and horizontal la.png" alt="">button at the bottom of the <a href="Launch%20Bar.html">Launcher Bar</a>.</li>
be collapsed by pressing the <li>The <a href="Global%20menu.html">Global menu</a> can be accessed via the
<img src="6_Vertical and horizontal la.png" <img
width="11" height="11">button at the bottom of the&nbsp;<a class="reference-link" href="Launch%20Bar.html">Launcher Bar</a>.</li> src="5_Vertical and horizontal la.png" alt="">icon at the top of the <a href="Launch%20Bar.html">Launcher Bar</a>.</li>
<li>The&nbsp;<a class="reference-link" href="Global%20menu.html">Global menu</a>&nbsp;can
be accessed via the
<img src="5_Vertical and horizontal la.png" width="26"
height="23">icon at the top of the&nbsp;<a class="reference-link" href="Launch%20Bar.html">Launcher Bar</a>.</li>
</ul> </ul>
<p> <p>
<img src="4_Vertical and horizontal la.png" width="1043" height="684"> <img src="4_Vertical and horizontal la.png" alt="">
</p> </p>
<h3>Horizontal layout</h3> <h3>Horizontal layout</h3>
<p>The horizontal layout is a more traditional layout, since it bears similarity <p>The horizontal layout is a more traditional layout, since it bears similarity
with other applications. In this mode:</p> with other applications. In this mode:</p>
<ul> <ul>
<li>The&nbsp;<a class="reference-link" href="Launch%20Bar.html">Launcher Bar</a>&nbsp;is <li>The <a href="Launch%20Bar.html">Launcher Bar</a> is at the top of the
at the top of the screen, with the buttons laid horizontally.</li> screen, with the buttons laid horizontally.</li>
<li>The tab bar is at the top of the screen, but now covers the entirety of <li>The tab bar is at the top of the screen, but now covers the entirety of
the width, allowing for more tabs to be displayed at once.</li> the width, allowing for more tabs to be displayed at once.</li>
<li>The&nbsp;<a class="reference-link" href="Quick%20search.html">Quick search</a>&nbsp;is <li>The <a href="Quick%20search.html">Quick search</a> is now part of the 
now part of the&nbsp;<a class="reference-link" href="Launch%20Bar.html">Launcher Bar</a>. <a
It can be moved around according to preference and even removed if needed.</li> href="Launch%20Bar.html">Launcher Bar</a>. It can be moved around according to preference and even
<li>The&nbsp;<a class="reference-link" href="Note%20Tree.html">Note Tree</a>&nbsp;can removed if needed.</li>
be collapsed by pressing the small <li>The <a href="Note%20Tree.html">Note Tree</a> can be collapsed by pressing
<img src="2_Vertical and horizontal la.png" the small
width="14" height="13">button to the left of the first tab.</li> <img src="2_Vertical and horizontal la.png" alt="">button to the left of the first tab.</li>
<li>The&nbsp;<a class="reference-link" href="Global%20menu.html">Global menu</a>&nbsp;can <li>The <a href="Global%20menu.html">Global menu</a> can be accessed via the
be accessed via the <img
<img src="1_Vertical and horizontal la.png" width="15" src="1_Vertical and horizontal la.png" alt="">button at the end of the <a href="Launch%20Bar.html">Launcher Bar</a>.</li>
height="11">button at the end of the&nbsp;<a class="reference-link" href="Launch%20Bar.html">Launcher Bar</a>.</li>
</ul> </ul>
<figure class="image"> <p>
<img style="aspect-ratio:1043/684;" src="3_Vertical and horizontal la.png" <img src="3_Vertical and horizontal la.png" alt="">
width="1043" height="684"> </p>
</figure>
<h2>Changing the layout</h2> <h2>Changing the layout</h2>
<p>Go to&nbsp;<a class="reference-link" href="#root/_hidden/_lbRoot/_lbVisibleLaunchers/_lbSettings">Settings</a>&nbsp;and <p>Go to <a href="#root/_hidden/_lbRoot/_lbVisibleLaunchers/_lbSettings">Settings</a> and
look for the <i>Appearance</i> option on the left. Then look for the <i>Layout </i>section, look for the <em>Appearance</em> option on the left. Then look for the <em>Layout</em> section,
where there is the possibility to switch between the two available layouts.</p> where there is the possibility to switch between the two available layouts.</p>
<p>Selecting an option will immediately apply the new layout by reloading <p>Selecting an option will immediately apply the new layout by reloading
the window.</p> the window.</p>

View File

@ -14,7 +14,7 @@
<div class="ck-content"> <div class="ck-content">
<p> <p>
<img src="6_Zen mode_image.png" alt="" /> <img src="6_Zen mode_image.png" alt="">
</p> </p>
<p>Screenshot of Zen Mode activated on a Windows 11 system with native title <p>Screenshot of Zen Mode activated on a Windows 11 system with native title
bar off and background effects on.</p> bar off and background effects on.</p>
@ -22,46 +22,40 @@
of Trilium is hidden away in order to be able to focus on the content, of Trilium is hidden away in order to be able to focus on the content,
whether it's for reading or writing.</p> whether it's for reading or writing.</p>
<p> <p>
<img src="5_Zen mode_image.png" alt="" /> <img src="5_Zen mode_image.png" alt="">
</p> </p>
<p>Screenshot of the Zen Mode option in the global menu.</p> <p>Screenshot of the Zen Mode option in the global menu.</p>
<h2>Activating &amp; deactivating</h2>
<h2>Activating &amp; deactivating</h2>
<p>The Zen Mode can be activated by accessing the global menu and selecting <p>The Zen Mode can be activated by accessing the global menu and selecting
the “Zen Mode” option:</p> the “Zen Mode” option:</p>
<p>Aside from the global menu, it's also possible to activate this mode by <p>Aside from the global menu, it's also possible to activate this mode by
using a keyboard shortcut which is Alt+Z by default. Look for <code>toggleZenMode</code> in using a keyboard shortcut which is <kbd>Alt</kbd>+<kbd>Z</kbd> by default.
the shortcut configuration.</p> Look for <code>toggleZenMode</code> in the shortcut configuration.</p>
<p>Once Zen Mode is activated, all the UI elements of the application will <p>Once Zen Mode is activated, all the UI elements of the application will
be hidden away, including the global menu. In that case, the Zen Mode can be hidden away, including the global menu. In that case, the Zen Mode can
be deactivated either by pressing the be deactivated either by pressing the
<img src="Zen mode_image.png" alt="" <img src="Zen mode_image.png" alt="">icon in the top-right corner of the window or by pressing the keyboard
/>icon in the top-right corner of the window or by pressing the keyboard
combination again.</p> combination again.</p>
<p>Do note that, by design, activating or deactivating the Zen Mode applies <p>Do note that, by design, activating or deactivating the Zen Mode applies
only to the current window. Restarting the application will also disable only to the current window. Restarting the application will also disable
the Zen Mode.</p> the Zen Mode.</p>
<h2>Moving the window around</h2>
<h2>Moving the window around</h2>
<p>If “Native title bar” is activated, then the operating system's default <p>If “Native title bar” is activated, then the operating system's default
title bar can be used to drag the window around. If deactivated, the window title bar can be used to drag the window around. If deactivated, the window
can still be moved by dragging the mouse across the top part of the window can still be moved by dragging the mouse across the top part of the window
where the note titles are.</p> where the note titles are.</p>
<p> <p>
<img src="3_Zen mode_image.png" alt="" /> <img src="3_Zen mode_image.png" alt="">
</p> </p>
<p>Screenshot of two notes side-by-side while Zen Mode is active, on Windows <p>Screenshot of two notes side-by-side while Zen Mode is active, on Windows
11 with background effects off.</p> 11 with background effects off.</p>
<h2>Split windows and tabs</h2>
<h2>Split windows and tabs</h2>
<p>Tabs are completely hidden, however it's still possible to use keyboard <p>Tabs are completely hidden, however it's still possible to use keyboard
shortcuts such as <code>firstTab</code> (Ctrl+1 by default), <code>secondTab</code> (Ctrl+2 shortcuts such as <code>firstTab</code> (<kbd>Ctrl</kbd>+<kbd>1</kbd> by default), <code>secondTab</code> (<kbd>Ctrl</kbd>+<kbd>2</kbd> by
by default). There are also some newer shortcuts such as <code>activateNextTab</code> (Ctrl+Tab) default). There are also some newer shortcuts such as <code>activateNextTab</code> (<kbd>Ctrl</kbd>+<kbd>Tab</kbd>)
or <code>activatePreviousTab</code> (Ctrl+Shift+Tab) that allow easy navigation, or <code>activatePreviousTab</code> (<kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>Tab</kbd>)
however make sure that they are configured properly in the settings.</p> that allow easy navigation, however make sure that they are configured
properly in the settings.</p>
<p>For the split view of notes, there are no keyboard shortcuts at the time <p>For the split view of notes, there are no keyboard shortcuts at the time
of writing, but it's still possible to have them in Zen Mode by creating of writing, but it's still possible to have them in Zen Mode by creating
the split while the Zen Mode is off and then reactivating it afterwards.</p> the split while the Zen Mode is off and then reactivating it afterwards.</p>

View File

@ -19,9 +19,7 @@
<p>Note that the link will be publicly accessible to everyone (however the <p>Note that the link will be publicly accessible to everyone (however the
link is in a hard-to-guess format such as <code>https://docs.google.com/spreadsheets/d/e/2PACX-1vTA8NU2_eZFhc8TFadCZPreBfvP7un8IHd6J0SchrLLw3ueGmntNZjwRmsH2ZRcp1pJYDAzMz1FmFaj/pub?output=csv</code>). link is in a hard-to-guess format such as <code>https://docs.google.com/spreadsheets/d/e/2PACX-1vTA8NU2_eZFhc8TFadCZPreBfvP7un8IHd6J0SchrLLw3ueGmntNZjwRmsH2ZRcp1pJYDAzMz1FmFaj/pub?output=csv</code>).
Make sure you are not accidentally publishing sensitive information.</p> Make sure you are not accidentally publishing sensitive information.</p>
<h2>Obtaining the CSV link</h2>
<h2>Obtaining the CSV link</h2>
<ol> <ol>
<li>Open the Google Forms in a browser.</li> <li>Open the Google Forms in a browser.</li>
<li>Select the “Responses” tab and click on “Link to Sheets”.</li> <li>Select the “Responses” tab and click on “Link to Sheets”.</li>
@ -31,11 +29,8 @@
and instead of “Web page”, select “Comma-separated values (.csv)”.</li> and instead of “Web page”, select “Comma-separated values (.csv)”.</li>
<li>Copy the given link which will be used for the upcoming script.</li> <li>Copy the given link which will be used for the upcoming script.</li>
</ol> </ol>
<h2>Creating the script</h2>
<h2>Creating the script</h2> <p>Create a “JS Frontend” script:</p><pre><code class="language-text-x-trilium-auto">const CSV_URL = "https://docs.google.com/spreadsheets/d/e/2PACX-1vTiwooLV2whjCSVa49dJ99p_G3_qhqHHRqttMjYCJVfLXVdTgUSNJu5K0rpqmaHYF2k7Vofi3o7gW82/pub?output=csv";
<p>Create a “JS Frontend” script:</p>
<pre><code class="language-text-x-trilium-auto">const CSV_URL = "https://docs.google.com/spreadsheets/d/e/2PACX-1vTiwooLV2whjCSVa49dJ99p_G3_qhqHHRqttMjYCJVfLXVdTgUSNJu5K0rpqmaHYF2k7Vofi3o7gW82/pub?output=csv";
async function fetchData() { async function fetchData() {
try { try {
@ -50,8 +45,7 @@ const data = await fetchData();
console.log(data); console.log(data);
// Do something with the data.</code></pre> // Do something with the data.</code></pre>
<p>Note that the data will be received as a string and there is no library <p>Note that the data will be received as a string and there is no library
to do the CSV parsing for us. To do a very simple parsing of CSV:</p> to do the CSV parsing for us. To do a very simple parsing of CSV:</p><pre><code class="language-text-x-trilium-auto">const content = data
<pre><code class="language-text-x-trilium-auto">const content = data
.split("\n") .split("\n")
.slice(1) .slice(1)
.map((row) =&gt; row.split(","));</code></pre> .map((row) =&gt; row.split(","));</code></pre>

View File

@ -18,31 +18,23 @@
it's processing data, or a checkbox to define a particular change in behavior it's processing data, or a checkbox to define a particular change in behavior
for the script.</p> for the script.</p>
<p> <p>
<img src="Using promoted attributes .png" alt="" /> <img src="Using promoted attributes .png" alt="">
</p> </p>
<h2>Using check boxes to toggle flags</h2>
<h2>Using check boxes to toggle flags</h2>
<p>Instead of asking the user to modify a boolean value in the script, it's <p>Instead of asking the user to modify a boolean value in the script, it's
much more intuitive to use a checkbox for it as a promoted attribute.</p> much more intuitive to use a checkbox for it as a promoted attribute.</p>
<p>To do so, first define the promoted attribute:</p> <p>To do so, first define the promoted attribute:</p><pre><code class="language-text-x-trilium-auto">#label:groupByExtension="promoted,alias=Group by extension,single,boolean"</code></pre>
<pre><code class="language-text-x-trilium-auto">#label:groupByExtension="promoted,alias=Group by extension,single,boolean"</code></pre> <p>Then use it:</p><pre><code class="language-application-javascript-env-backend">const byExtension = api.currentNote.getLabelValue("groupByExtension") === "true";
<p>Then use it:</p>
<pre><code class="language-application-javascript-env-backend">const byExtension = api.currentNote.getLabelValue("groupByExtension") === "true";
if (byExtension) { if (byExtension) {
// Do something. // Do something.
}</code></pre> }</code></pre>
<p>This will work equally well in both front-end and back-end scripts.</p> <p>This will work equally well in both front-end and back-end scripts.</p>
<h2>Using relations to select notes</h2>
<h2>Using relations to select notes</h2>
<p>One common use case for a script is to read data from another note and <p>One common use case for a script is to read data from another note and
perhaps output its result in another note. To do so we need to define the perhaps output its result in another note. To do so we need to define the
following promoted attributes:</p> following promoted attributes:</p><pre><code class="language-text-x-trilium-auto">#relation:input="promoted,alias=Input,single" #relation:output="promoted,alias=Output,single"</code></pre>
<pre><code class="language-text-x-trilium-auto">#relation:input="promoted,alias=Input,single" #relation:output="promoted,alias=Output,single"</code></pre>
<p>Once we have this, we can add some basic error handling to ensure that <p>Once we have this, we can add some basic error handling to ensure that
the fields are completed by the user:</p> the fields are completed by the user:</p><pre><code class="language-application-javascript-env-backend">const inputNoteId = api.currentNote.getRelationValue("input");
<pre><code class="language-application-javascript-env-backend">const inputNoteId = api.currentNote.getRelationValue("input");
if (!inputNoteId) { if (!inputNoteId) {
api.showError("Missing input."); api.showError("Missing input.");
return; return;
@ -56,8 +48,7 @@ if (!outputNoteId) {
<p>Note that here we are using <code>api.showError</code> which is only available <p>Note that here we are using <code>api.showError</code> which is only available
for frontend notes. If you are writing a backend note, simply remove <code>api.showError</code> but for frontend notes. If you are writing a backend note, simply remove <code>api.showError</code> but
the user will no feedback on why the script did not execute properly.</p> the user will no feedback on why the script did not execute properly.</p>
<p>Afterwards we can simply read the note and do something with it:</p> <p>Afterwards we can simply read the note and do something with it:</p><pre><code class="language-application-javascript-env-backend">const note = api.getNote(inputNoteId);
<pre><code class="language-application-javascript-env-backend">const note = api.getNote(inputNoteId);
if (!note) { if (!note) {
return; return;
} }

View File

@ -14,22 +14,17 @@
<div class="ck-content"> <div class="ck-content">
<h2>Frontend API</h2> <h2>Frontend API</h2>
<p>The frontend api supports two styles, regular scripts that are run with <p>The frontend api supports two styles, regular scripts that are run with
the current app and note context, and widgets that export an object to the current app and note context, and widgets that export an object to
Trilium to be used in the UI. In both cases, the frontend api of Trilium Trilium to be used in the UI. In both cases, the frontend api of Trilium
is available to scripts running in the frontend context as global variable <code>api</code>. is available to scripts running in the frontend context as global variable <code>api</code>.
The members and methods of the api can be seen on the <a href="../Note%20Types/Code/Script%20API.html">Script API</a> page.</p> The members and methods of the api can be seen on the <a href="../Note%20Types/Code/Script%20API.html">Script API</a> page.</p>
<h2>Scripts</h2>
<h2>Scripts</h2>
<p>Scripts don't have any special requirements. They can be run at will using <p>Scripts don't have any special requirements. They can be run at will using
the execute button in the UI or they can be configured to run at certain the execute button in the UI or they can be configured to run at certain
times using <a href="../Advanced%20Usage/Attributes.html">Attributes</a> on times using <a href="../Advanced%20Usage/Attributes.html">Attributes</a> on
the note containing the script.</p> the note containing the script.</p>
<h3>Global Events</h3>
<h3>Global Events</h3>
<p>This attribute is called <code>#run</code> and it can have any of the following <p>This attribute is called <code>#run</code> and it can have any of the following
values:</p> values:</p>
<ul> <ul>
@ -39,9 +34,7 @@
<li><code>hourly</code> - executes once an hour on backend.</li> <li><code>hourly</code> - executes once an hour on backend.</li>
<li><code>daily</code> - executes once a day on backend.</li> <li><code>daily</code> - executes once a day on backend.</li>
</ul> </ul>
<h3>Entity Events</h3>
<h3>Entity Events</h3>
<p>These events are triggered by certain <a href="../Advanced%20Usage/Attributes.html">relations</a> to <p>These events are triggered by certain <a href="../Advanced%20Usage/Attributes.html">relations</a> to
other notes. Meaning that the script is triggered only if the note has other notes. Meaning that the script is triggered only if the note has
this script attached to it through relations (or it can inherit it).</p> this script attached to it through relations (or it can inherit it).</p>
@ -67,9 +60,7 @@
<li><code>runOnAttributeChange</code> - executes when attribute is changed <li><code>runOnAttributeChange</code> - executes when attribute is changed
under this note.</li> under this note.</li>
</ul> </ul>
<h2>Widgets</h2>
<h2>Widgets</h2>
<p>Conversely to scripts, widgets do have some specific requirements in order <p>Conversely to scripts, widgets do have some specific requirements in order
to work. A widget must:</p> to work. A widget must:</p>
<ul> <ul>
@ -92,9 +83,7 @@
</ul> </ul>
</li> </li>
</ul> </ul>
<h3>parentWidget</h3>
<h3>parentWidget</h3>
<ul> <ul>
<li><code>left-pane</code> - This renders the widget on the left side of the <li><code>left-pane</code> - This renders the widget on the left side of the
screen where the note tree lives.</li> screen where the note tree lives.</li>
@ -105,9 +94,7 @@
<li><code>right-pane</code> - This renders the widget to the right of any opened <li><code>right-pane</code> - This renders the widget to the right of any opened
notes.</li> notes.</li>
</ul> </ul>
<h3>Tutorial</h3>
<h3>Tutorial</h3>
<p>For more information on building widgets, take a look at <a href="Widget%20Basics.html">Widget Basics</a>.</p> <p>For more information on building widgets, take a look at <a href="Widget%20Basics.html">Widget Basics</a>.</p>
</div> </div>
</div> </div>

View File

@ -16,12 +16,9 @@
<p>This guide will walk you through creating a basic widget inside Trilium. <p>This guide will walk you through creating a basic widget inside Trilium.
By following these steps, you'll learn how to build a simple UI element By following these steps, you'll learn how to build a simple UI element
that interacts with the user.</p> that interacts with the user.</p>
<h3>Step 1: The Basic Widget Structure</h3>
<h3>Step 1: The Basic Widget Structure</h3>
<p>To start, we'll create the most basic widget possible. Here's a simple <p>To start, we'll create the most basic widget possible. Here's a simple
example:</p> example:</p><pre><code class="language-text-x-trilium-auto">class MyWidget extends api.BasicWidget {
<pre><code class="language-text-x-trilium-auto">class MyWidget extends api.BasicWidget {
get position() { return 1; } get position() { return 1; }
get parentWidget() { return "left-pane"; } get parentWidget() { return "left-pane"; }
@ -45,11 +42,8 @@ module.exports = new MyWidget();</code></pre>
is found, the widget is functioning correctly. If <code>undefined</code> is is found, the widget is functioning correctly. If <code>undefined</code> is
returned, double-check that the <a href="../Basic%20Concepts/Note.html">note</a> has returned, double-check that the <a href="../Basic%20Concepts/Note.html">note</a> has
the <code>#widget</code> <a href="../Advanced%20Usage/Attributes.html">attribute</a>.</p> the <code>#widget</code> <a href="../Advanced%20Usage/Attributes.html">attribute</a>.</p>
<h3>Step 2: Adding an UI Element</h3>
<h3>Step 2: Adding an UI Element</h3> <p>Next, let's improve the widget by adding a button to it.</p><pre><code class="language-text-x-trilium-auto">const template = ``;
<p>Next, let's improve the widget by adding a button to it.</p>
<pre><code class="language-text-x-trilium-auto">const template = ``;
class MyWidget extends api.BasicWidget { class MyWidget extends api.BasicWidget {
get position() {return 1;} get position() {return 1;}
@ -64,16 +58,12 @@ class MyWidget extends api.BasicWidget {
module.exports = new MyWidget();</code></pre> module.exports = new MyWidget();</code></pre>
<p>After making this change, reload Trilium. You should now see a button <p>After making this change, reload Trilium. You should now see a button
in the top-left corner of the left pane.</p> in the top-left corner of the left pane.</p>
<h3>Step 3: Styling the Widget</h3>
<h3>Step 3: Styling the Widget</h3>
<p>To make the button more visually appealing and position it correctly, <p>To make the button more visually appealing and position it correctly,
we'll apply some custom styling. Trilium includes <a href="https://boxicons.com">Box Icons</a>, we'll apply some custom styling. Trilium includes <a href="https://boxicons.com">Box Icons</a>,
which we'll use to replace the button text with an icon. For example the <code>bx bxs-magic-wand</code> icon.</p> which we'll use to replace the button text with an icon. For example the <code>bx bxs-magic-wand</code> icon.</p>
<p>Here's the updated template:</p> <p>Here's the updated template:</p><pre><code class="language-text-x-trilium-auto">const template = ``;</code></pre>
<pre><code class="language-text-x-trilium-auto">const template = ``;</code></pre> <p>Next, we'll adjust the button's position using CSS:</p><pre><code class="language-text-x-trilium-auto">class MyWidget extends api.BasicWidget {
<p>Next, we'll adjust the button's position using CSS:</p>
<pre><code class="language-text-x-trilium-auto">class MyWidget extends api.BasicWidget {
get position() { return 1; } get position() { return 1; }
get parentWidget() { return "left-pane"; } get parentWidget() { return "left-pane"; }
@ -92,12 +82,9 @@ module.exports = new MyWidget();</code></pre>
module.exports = new MyWidget();</code></pre> module.exports = new MyWidget();</code></pre>
<p>After reloading Trilium, the button should now appear at the bottom left <p>After reloading Trilium, the button should now appear at the bottom left
of the left pane, alongside other action buttons.</p> of the left pane, alongside other action buttons.</p>
<h3>Step 4: Adding User Interaction</h3>
<h3>Step 4: Adding User Interaction</h3>
<p>Lets make the button interactive by showing a message when its clicked. <p>Lets make the button interactive by showing a message when its clicked.
We'll use the <code>api.showMessage</code> method from the <a href="../Note%20Types/Code/Script%20API.html">Script API</a>.</p> We'll use the <code>api.showMessage</code> method from the <a href="../Note%20Types/Code/Script%20API.html">Script API</a>.</p><pre><code class="language-text-x-trilium-auto">class MyWidget extends api.BasicWidget {
<pre><code class="language-text-x-trilium-auto">class MyWidget extends api.BasicWidget {
get position() { return 1; } get position() { return 1; }
get parentWidget() { return "left-pane"; } get parentWidget() { return "left-pane"; }

View File

@ -14,7 +14,6 @@
<div class="ck-content"> <div class="ck-content">
<h2>Mac OS support</h2> <h2>Mac OS support</h2>
<p>Originally, desktop builds of Trilium Notes has been available for Windows <p>Originally, desktop builds of Trilium Notes has been available for Windows
&amp; Linux, but there has been a considerable demand for macOS build.</p> &amp; Linux, but there has been a considerable demand for macOS build.</p>
<p>So I made one, but I underestimated the differences and specifics of Mac <p>So I made one, but I underestimated the differences and specifics of Mac
@ -27,18 +26,14 @@
or integrations. Note that this is more of an acknowledgment of an existing or integrations. Note that this is more of an acknowledgment of an existing
state rather than sudden change of direction.</p> state rather than sudden change of direction.</p>
<p>Of course, PRs are welcome.</p> <p>Of course, PRs are welcome.</p>
<h2>Translation / localization support</h2>
<h2>Translation / localization support</h2>
<p>Trilium is currently available only in English. Translation to other languages <p>Trilium is currently available only in English. Translation to other languages
is not planned in the near/medium term because it brings a significant is not planned in the near/medium term because it brings a significant
maintenance overhead. This decision might be revisited once Trilium stabilizes maintenance overhead. This decision might be revisited once Trilium stabilizes
into a more mature product.</p> into a more mature product.</p>
<p>For Chinese, there's an unofficial fork <a href="https://github.com/Nriver/trilium-translation">here</a>. <p>For Chinese, there's an unofficial fork <a href="https://github.com/Nriver/trilium-translation">here</a>.
Use at your own risk.</p> Use at your own risk.</p>
<h2>Multi user support</h2>
<h2>Multi user support</h2>
<p>Common request is to allow multiple users collaborate, share notes etc. <p>Common request is to allow multiple users collaborate, share notes etc.
So far I'm resisting this because of these reasons:</p> So far I'm resisting this because of these reasons:</p>
<ul> <ul>
@ -55,9 +50,7 @@
href="Note%20Types/Code/Scripts.html">scripting</a>support would be a XSS security hole, while with the single href="Note%20Types/Code/Scripts.html">scripting</a>support would be a XSS security hole, while with the single
user assumption it's an endless customizable tool.</li> user assumption it's an endless customizable tool.</li>
</ul> </ul>
<h2>How to open multiple documents in one Trilium instance</h2>
<h2>How to open multiple documents in one Trilium instance</h2>
<p>This is normally not supported - one Trilium process can open only a single <p>This is normally not supported - one Trilium process can open only a single
instance of a <a href="Advanced%20Usage/Database.html">database</a>. However, instance of a <a href="Advanced%20Usage/Database.html">database</a>. However,
you can run two Trilium processes (from one installation), each connected you can run two Trilium processes (from one installation), each connected
@ -66,14 +59,11 @@
the <code>TRILIUM_DATA_DIR</code> environment variable and separate port the <code>TRILIUM_DATA_DIR</code> environment variable and separate port
on <code>TRILIUM_PORT</code> environment variable. How to do that depends on <code>TRILIUM_PORT</code> environment variable. How to do that depends
on the platform, in Unix-based systems you can achieve that by running on the platform, in Unix-based systems you can achieve that by running
command such as this:</p> command such as this:</p><pre><code class="language-text-x-trilium-auto">TRILIUM_DATA_DIR=/home/me/path/to/data/dir TRILIUM_PORT=12345 trilium </code></pre>
<pre><code class="language-text-x-trilium-auto">TRILIUM_DATA_DIR=/home/me/path/to/data/dir TRILIUM_PORT=12345 trilium </code></pre>
<p>You can save this command into a <code>.sh</code> script file or make an <p>You can save this command into a <code>.sh</code> script file or make an
alias. Do this similarly for a second instance with different data directory alias. Do this similarly for a second instance with different data directory
and port.</p> and port.</p>
<h2>Can I use Dropbox / Google Drive / OneDrive to sync data across multiple computers.</h2>
<h2>Can I use Dropbox / Google Drive / OneDrive to sync data across multiple computers.</h2>
<p>No.</p> <p>No.</p>
<p>These general purpose sync apps are not suitable to sync database files <p>These general purpose sync apps are not suitable to sync database files
which are open and being worked on by another application. The result is which are open and being worked on by another application. The result is
@ -84,9 +74,7 @@
</blockquote> </blockquote>
<p>The only supported way to sync Trilium's data across the network is to <p>The only supported way to sync Trilium's data across the network is to
use a <a href="Installation%20%26%20Setup/Synchronization.html">sync/web server</a>.</p> use a <a href="Installation%20%26%20Setup/Synchronization.html">sync/web server</a>.</p>
<h2>Why database instead of flat files?</h2>
<h2>Why database instead of flat files?</h2>
<p>Trilium stores notes in a <a href="Advanced%20Usage/Database.html">database</a> which <p>Trilium stores notes in a <a href="Advanced%20Usage/Database.html">database</a> which
is an SQLite database. People often ask why doesn't Trilium rather use is an SQLite database. People often ask why doesn't Trilium rather use
flat files for note storage - it's fair question since flat files are easily flat files for note storage - it's fair question since flat files are easily

View File

@ -30,9 +30,7 @@
<p>Note that <a href="Synchronization.html">synchronization</a> provides also <p>Note that <a href="Synchronization.html">synchronization</a> provides also
some backup capabilities by its nature of distributing the data to other some backup capabilities by its nature of distributing the data to other
computers.</p> computers.</p>
<h2>Restoring backup</h2>
<h2>Restoring backup</h2>
<p>Let's assume you want to restore the weekly backup, here's how to do it:</p> <p>Let's assume you want to restore the weekly backup, here's how to do it:</p>
<ul> <ul>
<li>find <a href="Data%20directory.html">data directory</a> Trilium uses - easy <li>find <a href="Data%20directory.html">data directory</a> Trilium uses - easy
@ -57,12 +55,9 @@
<p>If you have configured sync then you need to do it across all members <p>If you have configured sync then you need to do it across all members
of the sync cluster, otherwise older version (restored backup) of the document of the sync cluster, otherwise older version (restored backup) of the document
will be detected and synced to the newer version.</p> will be detected and synced to the newer version.</p>
<h2>Disabling backup</h2>
<h2>Disabling backup</h2>
<p>Although this is not recommended, it is possible to disable backup in <code>config.ini</code> in <p>Although this is not recommended, it is possible to disable backup in <code>config.ini</code> in
the <a href="Data%20directory.html">data directory</a>:</p> the <a href="Data%20directory.html">data directory</a>:</p><pre><code class="language-text-x-trilium-auto">[General]
<pre><code class="language-text-x-trilium-auto">[General]
... some other configs ... some other configs
# set to true to disable backups (e.g. because of limited space on server) # set to true to disable backups (e.g. because of limited space on server)
noBackup=true</code></pre> noBackup=true</code></pre>

View File

@ -23,13 +23,11 @@
documents</li> documents</li>
<li><code>log</code> - contains application log files</li> <li><code>log</code> - contains application log files</li>
</ul> </ul>
<h2>Location</h2>
<h2>Location</h2>
<p>Easy way how to find out which data directory Trilium uses is to look <p>Easy way how to find out which data directory Trilium uses is to look
at the "About Trilium Notes" dialog (from "Menu" in upper left corner):</p> at the "About Trilium Notes" dialog (from "Menu" in upper left corner):</p>
<p> <p>
<img src="Data directory_image.png" alt="" /> <img src="Data directory_image.png" alt="">
</p> </p>
<p>Here's how the location is decided:</p> <p>Here's how the location is decided:</p>
<p>Data directory is normally named <code>trilium-data</code> and it is stored <p>Data directory is normally named <code>trilium-data</code> and it is stored
@ -43,24 +41,17 @@
</ul> </ul>
<p>If you want to back up your Trilium data, just backup this single directory <p>If you want to back up your Trilium data, just backup this single directory
- it contains everything you need.</p> - it contains everything you need.</p>
<h3>Changing the location of data directory</h3>
<h3>Changing the location of data directory</h3>
<p>If you want to use some other location for the data directory than the <p>If you want to use some other location for the data directory than the
default one, you may change it via TRILIUM_DATA_DIR environment variable default one, you may change it via TRILIUM_DATA_DIR environment variable
to some other location:</p> to some other location:</p>
<h4>Linux</h4><pre><code class="language-text-x-trilium-auto">export TRILIUM_DATA_DIR=/home/myuser/data/my-trilium-data</code></pre>
<h4>Linux</h4>
<pre><code class="language-text-x-trilium-auto">export TRILIUM_DATA_DIR=/home/myuser/data/my-trilium-data</code></pre>
<h4>Mac OS X</h4> <h4>Mac OS X</h4>
<p>You need to create a <code>.plist</code> file under <code>~/Library/LaunchAgents</code> to <p>You need to create a <code>.plist</code> file under <code>~/Library/LaunchAgents</code> to
load it properly each login.</p> load it properly each login.</p>
<p>To load it manually, you need to use <code>launchctl setenv TRILIUM_DATA_DIR &lt;yourpath&gt;</code> <p>To load it manually, you need to use <code>launchctl setenv TRILIUM_DATA_DIR &lt;yourpath&gt;</code>
</p> </p>
<p>Here is a pre-defined template, where you just need to add your path to:</p> <p>Here is a pre-defined template, where you just need to add your path to:</p><pre><code class="language-text-x-trilium-auto">
<pre><code class="language-text-x-trilium-auto">
@ -79,18 +70,14 @@
</code></pre> </code></pre>
<h3>Create a script to run with specific data directory</h3> <h3>Create a script to run with specific data directory</h3>
<p>An alternative to globally setting environment variable is to run only <p>An alternative to globally setting environment variable is to run only
the Trilium Notes with this environment variable. This then allows for the Trilium Notes with this environment variable. This then allows for
different setup styles like two <a href="../Advanced%20Usage/Database.html">database</a> instances different setup styles like two <a href="../Advanced%20Usage/Database.html">database</a> instances
or "portable" installation.</p> or "portable" installation.</p>
<p>To do this in unix based systems simply run trilium like this:</p> <p>To do this in unix based systems simply run trilium like this:</p><pre><code class="language-text-x-trilium-auto">TRILIUM_DATA_DIR=/home/myuser/data/my-trilium-data trilium</code></pre>
<pre><code class="language-text-x-trilium-auto">TRILIUM_DATA_DIR=/home/myuser/data/my-trilium-data trilium</code></pre>
<p>You can then save the above command as a shell script on your path for <p>You can then save the above command as a shell script on your path for
convenience.</p> convenience.</p>
<h3>Fine-grained directory/path location</h3>
<h3>Fine-grained directory/path location</h3>
<p>It's possible to configure e.g. backup and log directories separately, <p>It's possible to configure e.g. backup and log directories separately,
with following environment variables:</p> with following environment variables:</p>
<ul> <ul>

View File

@ -23,9 +23,7 @@
<li><strong>Run the Application</strong>: Launch Trilium by executing the <code>trilium</code> executable <li><strong>Run the Application</strong>: Launch Trilium by executing the <code>trilium</code> executable
found within the unzipped folder.</li> found within the unzipped folder.</li>
</ol> </ol>
<h2>Startup Scripts</h2>
<h2>Startup Scripts</h2>
<p>Trilium offers various startup scripts to customize your experience:</p> <p>Trilium offers various startup scripts to customize your experience:</p>
<ul> <ul>
<li><code>**trilium-no-cert-check**</code>: Starts Trilium without validating <li><code>**trilium-no-cert-check**</code>: Starts Trilium without validating
@ -43,9 +41,7 @@
<li><code>**trilium-safe-mode**</code>: Boots Trilium in "safe mode," disabling <li><code>**trilium-safe-mode**</code>: Boots Trilium in "safe mode," disabling
any startup scripts that might cause the application to crash.</li> any startup scripts that might cause the application to crash.</li>
</ul> </ul>
<h2>Synchronization</h2>
<h2>Synchronization</h2>
<p>For Trilium desktp users who wish to synchronize their data with a server <p>For Trilium desktp users who wish to synchronize their data with a server
instance, refer to the <a href="Synchronization.html">Synchronization Guide</a> for instance, refer to the <a href="Synchronization.html">Synchronization Guide</a> for
detailed instructions.</p> detailed instructions.</p>

View File

@ -21,24 +21,16 @@
See below for more details on this.</p> See below for more details on this.</p>
<p>Note that this is not an Android/iOS app, this is just mobile friendly <p>Note that this is not an Android/iOS app, this is just mobile friendly
web page served on the <a href="Server%20Installation.html">server edition</a>.</p> web page served on the <a href="Server%20Installation.html">server edition</a>.</p>
<h2>Screenshots</h2>
<h2>Screenshots</h2> <h3>Mobile phone</h3>
<h3>Mobile phone</h3>
<p> <p>
<img src="../Attachments/mobile-smartphone.png" alt="" /> <img src="../Attachments/mobile-smartphone.png" alt="">
</p> </p>
<h3>Tablet</h3>
<h3>Tablet</h3>
<p> <p>
<img src="../Attachments/mobile-tablet.png" alt="" /> <img src="../Attachments/mobile-tablet.png" alt="">
</p> </p>
<h2>Limitations</h2>
<h2>Limitations</h2>
<p>Mobile frontend provides only some of the features of the full desktop <p>Mobile frontend provides only some of the features of the full desktop
frontend:</p> frontend:</p>
<ul> <ul>
@ -50,15 +42,11 @@
<li>cloning notes is not supported</li> <li>cloning notes is not supported</li>
<li>uploading file attachments is not supported</li> <li>uploading file attachments is not supported</li>
</ul> </ul>
<h2>Forcing mobile/desktop frontend</h2>
<h2>Forcing mobile/desktop frontend</h2>
<p>Trilium decides automatically whether to use mobile or desktop frontend. <p>Trilium decides automatically whether to use mobile or desktop frontend.
If this is not appropriate, you can use <code>?mobile</code> or <code>?desktop</code> query If this is not appropriate, you can use <code>?mobile</code> or <code>?desktop</code> query
param on <strong>login</strong> page (Note: you might need to log out).</p> param on <strong>login</strong> page (Note: you might need to log out).</p>
<h2>Scripting</h2>
<h2>Scripting</h2>
<p>You can alter the behavior with <a href="../Note%20Types/Code/Scripts.html">scripts</a> just <p>You can alter the behavior with <a href="../Note%20Types/Code/Scripts.html">scripts</a> just
like for normal frontend. For script notes to be executed, they need to like for normal frontend. For script notes to be executed, they need to
have labeled <code>#run=mobileStartup</code>.</p> have labeled <code>#run=mobileStartup</code>.</p>

View File

@ -16,9 +16,7 @@
<p>This guide outlines the steps to install Trilium on your own server. You <p>This guide outlines the steps to install Trilium on your own server. You
might consider this option if you want to set up <a href="Synchronization.html">synchronization</a> or might consider this option if you want to set up <a href="Synchronization.html">synchronization</a> or
use Trilium in a browser - accessible from anywhere.</p> use Trilium in a browser - accessible from anywhere.</p>
<h2>Installation Options</h2>
<h2>Installation Options</h2>
<p>There are several ways to install Trilium on a server, each with its own <p>There are several ways to install Trilium on a server, each with its own
advantages:</p> advantages:</p>
<ul> <ul>
@ -40,9 +38,7 @@
</li> </li>
</ul> </ul>
<p>The server installation includes both web and <a href="Mobile%20Frontend.html">mobile frontends</a>.</p> <p>The server installation includes both web and <a href="Mobile%20Frontend.html">mobile frontends</a>.</p>
<h2>Configuration</h2>
<h2>Configuration</h2>
<p>After setting up your server installation, you may want to configure settings <p>After setting up your server installation, you may want to configure settings
such as the port or enable <a href="Server%20Installation/TLS%20Configuration.html">TLS</a>. such as the port or enable <a href="Server%20Installation/TLS%20Configuration.html">TLS</a>.
Configuration is managed via the Trilium <code>config.ini</code> file, which Configuration is managed via the Trilium <code>config.ini</code> file, which
@ -51,30 +47,21 @@
with default values to <code>config.ini</code>.</p> with default values to <code>config.ini</code>.</p>
<p>You can also review the <a href="../Advanced%20Usage/Configuration%20(config.ini%20or%20e.html">configuration</a> file <p>You can also review the <a href="../Advanced%20Usage/Configuration%20(config.ini%20or%20e.html">configuration</a> file
to provide all <code>config.ini</code> values as environment variables instead.</p> to provide all <code>config.ini</code> values as environment variables instead.</p>
<h3>Config Location</h3>
<h3>Config Location</h3>
<p>By default, <code>config.ini</code>, the <a href="../Advanced%20Usage/Database.html">database</a>, <p>By default, <code>config.ini</code>, the <a href="../Advanced%20Usage/Database.html">database</a>,
and other important Trilium data files are stored in the <a href="Data%20directory.html">data directory</a>. and other important Trilium data files are stored in the <a href="Data%20directory.html">data directory</a>.
If you prefer a different location, you can change it by setting the <code>TRILIUM_DATA_DIR</code> environment If you prefer a different location, you can change it by setting the <code>TRILIUM_DATA_DIR</code> environment
variable:</p> variable:</p><pre><code class="language-text-x-trilium-auto">export TRILIUM_DATA_DIR=/home/myuser/data/my-trilium-data</code></pre>
<pre><code class="language-text-x-trilium-auto">export TRILIUM_DATA_DIR=/home/myuser/data/my-trilium-data</code></pre>
<h3>Disabling Authentication</h3> <h3>Disabling Authentication</h3>
<p>If you are running Trilium on localhost only or if authentication is handled <p>If you are running Trilium on localhost only or if authentication is handled
by another component, you can disable Triliums authentication by adding by another component, you can disable Triliums authentication by adding
the following to <code>config.ini</code>:</p> the following to <code>config.ini</code>:</p><pre><code class="language-text-x-trilium-auto">[General]
<pre><code class="language-text-x-trilium-auto">[General]
noAuthentication=true</code></pre> noAuthentication=true</code></pre>
<h2>Reverse Proxy Setup</h2> <h2>Reverse Proxy Setup</h2>
<p>To configure a reverse proxy for Trilium, you can use either <strong>nginx</strong> or <strong>Apache</strong>.</p> <p>To configure a reverse proxy for Trilium, you can use either <strong>nginx</strong> or <strong>Apache</strong>.</p>
<h3>nginx</h3>
<h3>nginx</h3>
<p>Add the following configuration to your <code>nginx</code> setup to proxy <p>Add the following configuration to your <code>nginx</code> setup to proxy
requests to Trilium:</p> requests to Trilium:</p><pre><code class="language-text-x-trilium-auto">location /trilium/ {
<pre><code class="language-text-x-trilium-auto">location /trilium/ {
proxy_pass http://127.0.0.1:8080/; proxy_pass http://127.0.0.1:8080/;
proxy_http_version 1.1; proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade; proxy_set_header Upgrade $http_upgrade;
@ -82,11 +69,9 @@ noAuthentication=true</code></pre>
proxy_set_header Host $host; proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade; proxy_cache_bypass $http_upgrade;
}</code></pre> }</code></pre>
<p>To avoid limiting the size of payloads, include this in the <code>server {}</code> block:</p> <p>To avoid limiting the size of payloads, include this in the <code>server {}</code> block:</p><pre><code class="language-text-x-trilium-auto"># Set to 0 for unlimited. Default is 1M.
<pre><code class="language-text-x-trilium-auto"># Set to 0 for unlimited. Default is 1M.
client_max_body_size 0;</code></pre> client_max_body_size 0;</code></pre>
<h3>Apache</h3> <h3>Apache</h3>
<p>For an Apache setup, refer to the <a href="Server%20Installation/2.%20Reverse%20proxy/Apache.html">Apache proxy setup</a> guide.</p> <p>For an Apache setup, refer to the <a href="Server%20Installation/2.%20Reverse%20proxy/Apache.html">Apache proxy setup</a> guide.</p>
</div> </div>
</div> </div>

View File

@ -17,9 +17,7 @@
<a <a
href="https://hub.docker.com/r/triliumnext/notes/">https://hub.docker.com/r/triliumnext/notes/</a> href="https://hub.docker.com/r/triliumnext/notes/">https://hub.docker.com/r/triliumnext/notes/</a>
</p> </p>
<h2>Prerequisites</h2>
<h2>Prerequisites</h2>
<p>Ensure Docker is installed on your system.</p> <p>Ensure Docker is installed on your system.</p>
<p>If you need help installing Docker, reference the <a href="https://docs.docker.com/engine/install/">Docker Installation Docs</a> <p>If you need help installing Docker, reference the <a href="https://docs.docker.com/engine/install/">Docker Installation Docs</a>
</p> </p>
@ -31,102 +29,66 @@
add the mount options of <code>nobrl</code> and <code>noperm</code> when mounting add the mount options of <code>nobrl</code> and <code>noperm</code> when mounting
your SMB share.</p> your SMB share.</p>
</blockquote> </blockquote>
<h2>Running with Docker Compose</h2>
<h2>Running with Docker Compose</h2> <h3>Grab the latest docker-compose.yml:</h3><pre><code class="language-text-x-trilium-auto">wget https://raw.githubusercontent.com/TriliumNext/Notes/master/docker-compose.yml</code></pre>
<h3>Grab the latest docker-compose.yml:</h3>
<pre><code class="language-text-x-trilium-auto">wget https://raw.githubusercontent.com/TriliumNext/Notes/master/docker-compose.yml</code></pre>
<p>Optionally, edit the <code>docker-compose.yml</code> file to configure the <p>Optionally, edit the <code>docker-compose.yml</code> file to configure the
container settings prior to starting it. Unless configured otherwise, the container settings prior to starting it. Unless configured otherwise, the
data directory will be <code>~/trilium-data</code> and the container will data directory will be <code>~/trilium-data</code> and the container will
be accessible at port 8080.</p> be accessible at port 8080.</p>
<h3>Start the container:</h3>
<h3>Start the container:</h3> <p>Run the following command to start the container in the background:</p><pre><code class="language-text-x-trilium-auto">docker compose up -d</code></pre>
<p>Run the following command to start the container in the background:</p>
<pre><code class="language-text-x-trilium-auto">docker compose up -d</code></pre>
<h2>Running without Docker Compose / Further Configuration</h2> <h2>Running without Docker Compose / Further Configuration</h2>
<h3>Pulling the Docker Image</h3>
<h3>Pulling the Docker Image</h3>
<p>To pull the image, use the following command, replacing <code>[VERSION]</code> with <p>To pull the image, use the following command, replacing <code>[VERSION]</code> with
the desired version or tag, such as <code>v0.91.6</code> or just <code>latest</code>. the desired version or tag, such as <code>v0.91.6</code> or just <code>latest</code>.
(See published tag names at <a href="https://hub.docker.com/r/triliumnext/notes/tags">https://hub.docker.com/r/triliumnext/notes/tags</a>.):</p> (See published tag names at <a href="https://hub.docker.com/r/triliumnext/notes/tags">https://hub.docker.com/r/triliumnext/notes/tags</a>.):</p><pre><code class="language-text-x-trilium-auto">docker pull triliumnext/notes:v0.91.6</code></pre>
<pre><code class="language-text-x-trilium-auto">docker pull triliumnext/notes:v0.91.6</code></pre>
<p><strong>Warning:</strong> Avoid using the "latest" tag, as it may automatically <p><strong>Warning:</strong> Avoid using the "latest" tag, as it may automatically
upgrade your instance to a new minor version, potentially disrupting sync upgrade your instance to a new minor version, potentially disrupting sync
setups or causing other issues.</p> setups or causing other issues.</p>
<h3>Preparing the Data Directory</h3>
<h3>Preparing the Data Directory</h3>
<p>Trilium requires a directory on the host system to store its data. This <p>Trilium requires a directory on the host system to store its data. This
directory must be mounted into the Docker container with write permissions.</p> directory must be mounted into the Docker container with write permissions.</p>
<h3>Running the Docker Container</h3>
<h3>Running the Docker Container</h3> <h4>Local Access Only</h4>
<h4>Local Access Only</h4>
<p>Run the container to make it accessible only from the localhost. This <p>Run the container to make it accessible only from the localhost. This
setup is suitable for testing or when using a proxy server like Nginx or setup is suitable for testing or when using a proxy server like Nginx or
Apache.</p> Apache.</p><pre><code class="language-text-x-trilium-auto">sudo docker run -t -i -p 127.0.0.1:8080:8080 -v ~/trilium-data:/home/node/trilium-data triliumnext/notes:[VERSION]</code></pre>
<pre><code class="language-text-x-trilium-auto">sudo docker run -t -i -p 127.0.0.1:8080:8080 -v ~/trilium-data:/home/node/trilium-data triliumnext/notes:[VERSION]</code></pre>
<ol> <ol>
<li>Verify the container is running using <code>docker ps</code>.</li> <li>Verify the container is running using <code>docker ps</code>.</li>
<li>Access Trilium via a web browser at <code>127.0.0.1:8080</code>.</li> <li>Access Trilium via a web browser at <code>127.0.0.1:8080</code>.</li>
</ol> </ol>
<h4>Local Network Access</h4>
<h4>Local Network Access</h4>
<p>To make the container accessible only on your local network, first create <p>To make the container accessible only on your local network, first create
a new Docker network:</p> a new Docker network:</p><pre><code class="language-text-x-trilium-auto">docker network create -d macvlan -o parent=eth0 --subnet 192.168.2.0/24 --gateway 192.168.2.254 --ip-range 192.168.2.252/27 mynet</code></pre>
<pre><code class="language-text-x-trilium-auto">docker network create -d macvlan -o parent=eth0 --subnet 192.168.2.0/24 --gateway 192.168.2.254 --ip-range 192.168.2.252/27 mynet</code></pre> <p>Then, run the container with the network settings:</p><pre><code class="language-text-x-trilium-auto">docker run --net=mynet -d -p 127.0.0.1:8080:8080 -v ~/trilium-data:/home/node/trilium-data triliumnext/notes:-latest</code></pre>
<p>Then, run the container with the network settings:</p>
<pre><code class="language-text-x-trilium-auto">docker run --net=mynet -d -p 127.0.0.1:8080:8080 -v ~/trilium-data:/home/node/trilium-data triliumnext/notes:-latest</code></pre>
<p>To set a different user ID (UID) and group ID (GID) for the saved data, <p>To set a different user ID (UID) and group ID (GID) for the saved data,
use the <code>USER_UID</code> and <code>USER_GID</code> environment variables:</p> use the <code>USER_UID</code> and <code>USER_GID</code> environment variables:</p><pre><code class="language-text-x-trilium-auto">docker run --net=mynet -d -p 127.0.0.1:8080:8080 -e "USER_UID=1001" -e "USER_GID=1001" -v ~/trilium-data:/home/node/trilium-data triliumnext/notes:-latest</code></pre>
<pre><code class="language-text-x-trilium-auto">docker run --net=mynet -d -p 127.0.0.1:8080:8080 -e "USER_UID=1001" -e "USER_GID=1001" -v ~/trilium-data:/home/node/trilium-data triliumnext/notes:-latest</code></pre>
<p>Find the local IP address using <code>docker inspect [container_name]</code> and <p>Find the local IP address using <code>docker inspect [container_name]</code> and
access the service from devices on the local network.</p> access the service from devices on the local network.</p><pre><code class="language-text-x-trilium-auto">docker ps
<pre><code class="language-text-x-trilium-auto">docker ps
docker inspect [container_name]</code></pre> docker inspect [container_name]</code></pre>
<h4>Global Access</h4> <h4>Global Access</h4>
<p>To allow access from any IP address, run the container as follows:</p><pre><code class="language-text-x-trilium-auto">docker run -d -p 0.0.0.0:8080:8080 -v ~/trilium-data:/home/node/trilium-data triliumnext/notes:[VERSION]</code></pre>
<p>To allow access from any IP address, run the container as follows:</p>
<pre><code class="language-text-x-trilium-auto">docker run -d -p 0.0.0.0:8080:8080 -v ~/trilium-data:/home/node/trilium-data triliumnext/notes:[VERSION]</code></pre>
<p>Stop the container with <code>docker stop &lt;CONTAINER ID&gt;</code>, <p>Stop the container with <code>docker stop &lt;CONTAINER ID&gt;</code>,
where the container ID is obtained from <code>docker ps</code>.</p> where the container ID is obtained from <code>docker ps</code>.</p>
<h3>Custom Data Directory</h3>
<h3>Custom Data Directory</h3> <p>For a custom data directory, use:</p><pre><code class="language-text-x-trilium-auto">-v ~/YourOwnDirectory:/home/node/trilium-data triliumnext/notes:[VERSION]</code></pre>
<p>For a custom data directory, use:</p>
<pre><code class="language-text-x-trilium-auto">-v ~/YourOwnDirectory:/home/node/trilium-data triliumnext/notes:[VERSION]</code></pre>
<p>If you want to run your instance in a non-default way, please use the <p>If you want to run your instance in a non-default way, please use the
volume switch as follows: <code>-v ~/YourOwnDirectory:/home/node/trilium-data triliumnext/notes:&lt;VERSION&gt;</code>. volume switch as follows: <code>-v ~/YourOwnDirectory:/home/node/trilium-data triliumnext/notes:&lt;VERSION&gt;</code>.
It is important to be aware of how Docker works for volumes, with the first It is important to be aware of how Docker works for volumes, with the first
path being your own and the second the one to virtually bind to. <a href="https://docs.docker.com/storage/volumes/">https://docs.docker.com/storage/volumes/</a> The path being your own and the second the one to virtually bind to. <a href="https://docs.docker.com/storage/volumes/">https://docs.docker.com/storage/volumes/</a> The
path before the colon is the host directory, and the path after the colon path before the colon is the host directory, and the path after the colon
is the container's path. More details can be found in the <a href="https://docs.docker.com/storage/volumes/">Docker Volumes Documentation</a>.</p> is the container's path. More details can be found in the <a href="https://docs.docker.com/storage/volumes/">Docker Volumes Documentation</a>.</p>
<h2>Reverse Proxy</h2>
<h2>Reverse Proxy</h2>
<ol> <ol>
<li><a href="../2.%20Reverse%20proxy/Nginx.html">Nginx</a> <li><a href="../2.%20Reverse%20proxy/Nginx.html">Nginx</a>
</li> </li>
<li><a href="../2.%20Reverse%20proxy/Apache.html">Apache</a> <li><a href="../2.%20Reverse%20proxy/Apache.html">Apache</a>
</li> </li>
</ol> </ol>
<h3>Note on --user Directive</h3>
<h3>Note on --user Directive</h3>
<p>The <code>--user</code> directive is unsupported. Instead, use the <code>USER_UID</code> and <code>USER_GID</code> environment <p>The <code>--user</code> directive is unsupported. Instead, use the <code>USER_UID</code> and <code>USER_GID</code> environment
variables to set the appropriate user and group IDs.</p> variables to set the appropriate user and group IDs.</p>
<h3>Note on timezones</h3>
<h3>Note on timezones</h3>
<p>If you are having timezone issues and you are not using docker-compose, <p>If you are having timezone issues and you are not using docker-compose,
you may need to add a <code>TZ</code> environment variable with the <a href="https://en.wikipedia.org/wiki/List_of_tz_database_time_zones">TZ identifier</a> of you may need to add a <code>TZ</code> environment variable with the <a href="https://en.wikipedia.org/wiki/List_of_tz_database_time_zones">TZ identifier</a> of
your local timezone.</p> your local timezone.</p>

View File

@ -17,12 +17,10 @@
You can either use our Helm chart, a community Helm chart, or roll your You can either use our Helm chart, a community Helm chart, or roll your
own Kubernetes deployment.</p> own Kubernetes deployment.</p>
<p>The recommended way is to use a Helm chart.</p> <p>The recommended way is to use a Helm chart.</p>
<h2>Root privileges</h2>
<h2>Root privileges</h2>
<blockquote> <blockquote>
<p>[!NOTE] <p>[!NOTE]
<br />The Trilium container at this time needs to be run with root privileges. <br>The Trilium container at this time needs to be run with root privileges.
It will swap to UID and GID <code>1000:1000</code> to run the <code>node</code> process It will swap to UID and GID <code>1000:1000</code> to run the <code>node</code> process
after execution though, so the main process doesn't run with root privileges.</p> after execution though, so the main process doesn't run with root privileges.</p>
</blockquote> </blockquote>
@ -35,25 +33,18 @@
variables.</p> variables.</p>
<p>The docker image will also fix the permissions of <code>/home/node</code> so <p>The docker image will also fix the permissions of <code>/home/node</code> so
you don't have to use an init container.</p> you don't have to use an init container.</p>
<h2>Helm Charts</h2>
<h2>Helm Charts</h2>
<p><a href="https://github.com/TriliumNext/helm-charts">Official Helm chart</a> from <p><a href="https://github.com/TriliumNext/helm-charts">Official Helm chart</a> from
TriliumNext Unofficial helm chart by <a href="https://github.com/ohdearaugustin">ohdearaugustin</a>: TriliumNext Unofficial helm chart by <a href="https://github.com/ohdearaugustin">ohdearaugustin</a>:
<a <a
href="https://github.com/ohdearaugustin/charts">https://github.com/ohdearaugustin/charts</a> href="https://github.com/ohdearaugustin/charts">https://github.com/ohdearaugustin/charts</a>
</p> </p>
<h2>Adding a Helm repository</h2>
<h2>Adding a Helm repository</h2> <p>Below is an example of how</p><pre><code class="language-text-x-trilium-auto">helm repo add trilium https://triliumnext.github.io/helm-charts
<p>Below is an example of how</p>
<pre><code class="language-text-x-trilium-auto">helm repo add trilium https://triliumnext.github.io/helm-charts
"trilium" has been added to your repositories</code></pre> "trilium" has been added to your repositories</code></pre>
<h2>How to install a chart</h2> <h2>How to install a chart</h2>
<p>After reviewing the <a href="https://github.com/TriliumNext/helm-charts/blob/main/charts/trilium/values.yaml"><code>values.yaml</code></a> from <p>After reviewing the <a href="https://github.com/TriliumNext/helm-charts/blob/main/charts/trilium/values.yaml"><code>values.yaml</code></a> from
the Helm chart, modifying as required and then creating your own:</p> the Helm chart, modifying as required and then creating your own:</p><pre><code class="language-text-x-trilium-auto">helm install --create-namespace --namespace trilium trilium trilium/trilium -f values.yaml</code></pre>
<pre><code class="language-text-x-trilium-auto">helm install --create-namespace --namespace trilium trilium trilium/trilium -f values.yaml</code></pre>
<p>For more information on using Helm, please refer to the Helm documentation, <p>For more information on using Helm, please refer to the Helm documentation,
or create a Discussion in the TriliumNext GitHub Organization.</p> or create a Discussion in the TriliumNext GitHub Organization.</p>
</div> </div>

View File

@ -15,35 +15,23 @@
<div class="ck-content"> <div class="ck-content">
<p>This page describes manually installing Trilium on your server. <strong>Note that this is a not well supported way to install Trilium, problems may appear, information laid out here is quite out of date. It is recommended to use either Docker or packaged build installation.</strong> <p>This page describes manually installing Trilium on your server. <strong>Note that this is a not well supported way to install Trilium, problems may appear, information laid out here is quite out of date. It is recommended to use either Docker or packaged build installation.</strong>
</p> </p>
<h2>Requirements</h2>
<h2>Requirements</h2>
<p>Trilium is a node.js application. Supported (tested) version of node.js <p>Trilium is a node.js application. Supported (tested) version of node.js
is latest 14.X.X and 16.X.X. Trilium might work with older versions as is latest 14.X.X and 16.X.X. Trilium might work with older versions as
well.</p> well.</p>
<p>You can check your node version with this command (node.js needs to be <p>You can check your node version with this command (node.js needs to be
installed):</p> installed):</p><pre><code class="language-text-x-trilium-auto">node --version</code></pre>
<pre><code class="language-text-x-trilium-auto">node --version</code></pre>
<p>If your Linux distribution has only an outdated version of node.js, you <p>If your Linux distribution has only an outdated version of node.js, you
can take a look at the installation instruction on node.js website, which can take a look at the installation instruction on node.js website, which
covers most popular distributions.</p> covers most popular distributions.</p>
<h3>Dependencies</h3>
<h3>Dependencies</h3>
<p>There are some dependencies required. You can see command for Debian and <p>There are some dependencies required. You can see command for Debian and
its derivatives (like Ubuntu) below:</p> its derivatives (like Ubuntu) below:</p><pre><code class="language-text-x-trilium-auto">sudo apt install libpng16-16 libpng-dev pkg-config autoconf libtool build-essential nasm libx11-dev libxkbfile-dev</code></pre>
<pre><code class="language-text-x-trilium-auto">sudo apt install libpng16-16 libpng-dev pkg-config autoconf libtool build-essential nasm libx11-dev libxkbfile-dev</code></pre>
<h2>Installation</h2> <h2>Installation</h2>
<h3>Download</h3>
<h3>Download</h3>
<p>You can either download source code zip/tar from <a href="https://github.com/TriliumNext/Notes/releases/latest%5D%5D">https://github.com/TriliumNext/Notes/releases/latest]]</a> %%{WARNING}%%or <p>You can either download source code zip/tar from <a href="https://github.com/TriliumNext/Notes/releases/latest%5D%5D">https://github.com/TriliumNext/Notes/releases/latest]]</a> %%{WARNING}%%or
clone git repository <strong>from stable branch</strong> with</p> clone git repository <strong>from stable branch</strong> with</p><pre><code class="language-text-x-trilium-auto">git clone -b stable https://github.com/triliumnext/notes.git %%{WARNING}%%</code></pre>
<pre><code class="language-text-x-trilium-auto">git clone -b stable https://github.com/triliumnext/notes.git %%{WARNING}%%</code></pre> <h2>Installation</h2><pre><code class="language-text-x-trilium-auto">cd trilium
<h2>Installation</h2>
<pre><code class="language-text-x-trilium-auto">cd trilium
# download all node dependencies # download all node dependencies
npm install npm install
@ -53,18 +41,14 @@ npm rebuild
# bundles &amp; minifies frontend JavaScript # bundles &amp; minifies frontend JavaScript
npm run webpack</code></pre> npm run webpack</code></pre>
<h2>Run</h2> <h2>Run</h2><pre><code class="language-text-x-trilium-auto">cd trilium
<pre><code class="language-text-x-trilium-auto">cd trilium
# using nohup to make sure trilium keeps running after user logs out # using nohup to make sure trilium keeps running after user logs out
nohup TRILIUM_ENV=dev node src/www &amp;</code></pre> nohup TRILIUM_ENV=dev node src/www &amp;</code></pre>
<p>The application by default starts up on port 8080, so you can open your <p>The application by default starts up on port 8080, so you can open your
browser and navigate to <a href="http://localhost:8080">http://localhost:8080</a> to browser and navigate to <a href="http://localhost:8080">http://localhost:8080</a> to
access Trilium (replace "localhost" with your hostname).</p> access Trilium (replace "localhost" with your hostname).</p>
<h2>TLS</h2>
<h2>TLS</h2>
<p>Don't forget to <a href="../TLS%20Configuration.html">configure TLS</a> which <p>Don't forget to <a href="../TLS%20Configuration.html">configure TLS</a> which
is required for secure usage!</p> is required for secure usage!</p>
</div> </div>

View File

@ -14,15 +14,10 @@
<div class="ck-content"> <div class="ck-content">
<p>This page describes configuring the Trilium module included in NixOS.</p> <p>This page describes configuring the Trilium module included in NixOS.</p>
<h2>Requirements</h2>
<h2>Requirements</h2>
<p><a href="https://nixos.org/">NixOS</a> installation.</p> <p><a href="https://nixos.org/">NixOS</a> installation.</p>
<h2>Configuration</h2>
<h2>Configuration</h2> <p>Add this to your <code>configuration.nix</code>:</p><pre><code class="language-text-x-trilium-auto">services.trilium-server.enable = true;
<p>Add this to your <code>configuration.nix</code>:</p>
<pre><code class="language-text-x-trilium-auto">services.trilium-server.enable = true;
# default data directory: /var/lib/trilium # default data directory: /var/lib/trilium
#services.trilium-server.dataDir = "/var/lib/trilium-sync-server"; #services.trilium-server.dataDir = "/var/lib/trilium-sync-server";

View File

@ -15,9 +15,7 @@
<div class="ck-content"> <div class="ck-content">
<p>This is essentially Trilium sources + node modules + node.js runtime packaged <p>This is essentially Trilium sources + node modules + node.js runtime packaged
into one 7z file.</p> into one 7z file.</p>
<h2>Steps</h2>
<h2>Steps</h2>
<ul> <ul>
<li>ssh into your server</li> <li>ssh into your server</li>
<li>use <code>wget</code> (or <code>curl</code> or whatever) to download latest <li>use <code>wget</code> (or <code>curl</code> or whatever) to download latest
@ -36,26 +34,21 @@
<p>The problem with above steps is that once you close the SSH connection, <p>The problem with above steps is that once you close the SSH connection,
the Trilium process is terminated. To avoid that, you have two options:</p> the Trilium process is terminated. To avoid that, you have two options:</p>
<ul> <ul>
<li>Kill it (with e.g. <code>CTRL-C</code>) and run again like this: <code>nohup ./trilium &amp;</code>.</li> <li>Kill it (with e.g. <kbd>Ctrl</kbd> + <kbd>C</kbd>) and run again like this: <code>nohup ./trilium &amp;</code>.</li>
<li>Configure systemd to automatically run Trilium in the background on every <li>Configure systemd to automatically run Trilium in the background on every
boot</li> boot</li>
</ul> </ul>
<h2>Configure Trilium to auto-run on boot with systemd</h2>
<h2>Configure Trilium to auto-run on boot with systemd</h2>
<ul> <ul>
<li>After downloading, extract and move Trilium:</li> <li>After downloading, extract and move Trilium:</li>
</ul> </ul><pre><code class="language-text-x-trilium-auto">tar -xvf trilium-linux-x64-server-[VERSION].tar.xz
<pre><code class="language-text-x-trilium-auto">tar -xvf trilium-linux-x64-server-[VERSION].tar.xz
sudo mv trilium-linux-x64-server /opt/trilium</code></pre> sudo mv trilium-linux-x64-server /opt/trilium</code></pre>
<ul> <ul>
<li>Create the service:</li> <li>Create the service:</li>
</ul> </ul><pre><code class="language-text-x-trilium-auto">sudo nano /etc/systemd/system/trilium.service</code></pre>
<pre><code class="language-text-x-trilium-auto">sudo nano /etc/systemd/system/trilium.service</code></pre>
<ul> <ul>
<li>Paste this into the file (replace the user and group as needed):</li> <li>Paste this into the file (replace the user and group as needed):</li>
</ul> </ul><pre><code class="language-text-x-trilium-auto">[Unit]
<pre><code class="language-text-x-trilium-auto">[Unit]
Description=Trilium Daemon Description=Trilium Daemon
After=syslog.target network.target After=syslog.target network.target
@ -75,27 +68,19 @@ WantedBy=multi-user.target</code></pre>
<ul> <ul>
<li>Save the file (CTRL-S) and exit (CTRL-X)</li> <li>Save the file (CTRL-S) and exit (CTRL-X)</li>
<li>Enable and launch the service:</li> <li>Enable and launch the service:</li>
</ul> </ul><pre><code class="language-text-x-trilium-auto">sudo systemctl enable --now -q trilium</code></pre>
<pre><code class="language-text-x-trilium-auto">sudo systemctl enable --now -q trilium</code></pre>
<ul> <ul>
<li>You can now open a browser to http://[your-server-hostname]:8080 and you <li>You can now open a browser to http://[your-server-hostname]:8080 and you
should see the Trilium initialization page.</li> should see the Trilium initialization page.</li>
</ul> </ul>
<h2>Common issues</h2>
<h2>Common issues</h2> <h3>Outdated glibc</h3><pre><code class="language-text-x-trilium-auto">Error: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /var/www/virtual/.../node_modules/@mlink/scrypt/build/Release/scrypt.node)
<h3>Outdated glibc</h3>
<pre><code class="language-text-x-trilium-auto">Error: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /var/www/virtual/.../node_modules/@mlink/scrypt/build/Release/scrypt.node)
at Object.Module._extensions..node (module.js:681:18) at Object.Module._extensions..node (module.js:681:18)
at Module.load (module.js:565:32) at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)</code></pre> at tryModuleLoad (module.js:505:12)</code></pre>
<p>If you get an error like this, you need to either upgrade your glibc (typically <p>If you get an error like this, you need to either upgrade your glibc (typically
by upgrading to up-to-date distribution version) or use some other <a href="../../Server%20Installation.html">server installation</a> method.</p> by upgrading to up-to-date distribution version) or use some other <a href="../../Server%20Installation.html">server installation</a> method.</p>
<h2>TLS</h2>
<h2>TLS</h2>
<p>Don't forget to <a href="../TLS%20Configuration.html">configure TLS</a>, <p>Don't forget to <a href="../TLS%20Configuration.html">configure TLS</a>,
which is required for secure usage!</p> which is required for secure usage!</p>
</div> </div>

View File

@ -17,32 +17,27 @@
you want to use for your Trilium server.</p> you want to use for your Trilium server.</p>
<ol> <ol>
<li> <li>
<p>Download docker image and create container</p> <p>Download docker image and create container</p><pre><code class="language-text-x-trilium-auto"> docker pull triliumnext/notes:[VERSION]
<pre><code class="language-text-x-trilium-auto"> docker pull triliumnext/notes:[VERSION]
docker create --name trilium -t -p 127.0.0.1:8080:8080 -v ~/trilium-data:/home/node/trilium-data triliumnext/notes:[VERSION]</code></pre> docker create --name trilium -t -p 127.0.0.1:8080:8080 -v ~/trilium-data:/home/node/trilium-data triliumnext/notes:[VERSION]</code></pre>
</li> </li>
<li> <li>
<p>Configure Apache proxy and websocket proxy</p> <p>Configure Apache proxy and websocket proxy</p>
<ol> <ol>
<li> <li>
<p>Enable apache proxy modules</p> <p>Enable apache proxy modules</p><pre><code class="language-text-x-trilium-auto"> a2enmod ssl
<pre><code class="language-text-x-trilium-auto"> a2enmod ssl
a2enmod proxy a2enmod proxy
a2enmod proxy_http a2enmod proxy_http
a2enmod proxy_wstunnel</code></pre> a2enmod proxy_wstunnel</code></pre>
</li> </li>
<li> <li>
<p>Create a new let's encrypt certificate</p> <p>Create a new let's encrypt certificate</p><pre><code class="language-text-x-trilium-auto"> sudo certbot certonly -d trilium.mydomain.com</code></pre>
<pre><code class="language-text-x-trilium-auto"> sudo certbot certonly -d trilium.mydomain.com</code></pre>
<p>Choose standalone (2) and note the location of the created certificates <p>Choose standalone (2) and note the location of the created certificates
(typically /etc/letsencrypt/live/...)</p> (typically /etc/letsencrypt/live/...)</p>
</li> </li>
<li> <li>
<p>Create a new virtual host file for apache (you may want to use <code>apachectl -S</code> to <p>Create a new virtual host file for apache (you may want to use <code>apachectl -S</code> to
determine the server root location, mine is /etc/apache2)</p> determine the server root location, mine is /etc/apache2)</p><pre><code class="language-text-x-trilium-auto"> sudo nano /etc/apache2/sites-available/trilium.yourdomain.com.conf</code></pre>
<pre><code class="language-text-x-trilium-auto"> sudo nano /etc/apache2/sites-available/trilium.yourdomain.com.conf</code></pre> <p>Paste (and customize) the following text into the configuration file</p><pre><code class="language-text-x-trilium-auto">
<p>Paste (and customize) the following text into the configuration file</p>
<pre><code class="language-text-x-trilium-auto">
ServerName http://trilium.yourdomain.com ServerName http://trilium.yourdomain.com
RewriteEngine on RewriteEngine on
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,QSA,R=permanent] RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,QSA,R=permanent]
@ -76,8 +71,7 @@
<ol> <ol>
<li> <li>
<p>Create a new empty file called <code>/lib/systemd/system/trilium.service</code> with <p>Create a new empty file called <code>/lib/systemd/system/trilium.service</code> with
the contents</p> the contents</p><pre><code class="language-text-x-trilium-auto"> [Unit]
<pre><code class="language-text-x-trilium-auto"> [Unit]
Description=Trilium Server Description=Trilium Server
Requires=docker.service Requires=docker.service
After=docker.service After=docker.service
@ -91,8 +85,7 @@
WantedBy=local.target</code></pre> WantedBy=local.target</code></pre>
</li> </li>
<li> <li>
<p>Install, enable and start service</p> <p>Install, enable and start service</p><pre><code class="language-text-x-trilium-auto"> sudo systemctl daemon-reload
<pre><code class="language-text-x-trilium-auto"> sudo systemctl daemon-reload
sudo systemctl enable trilium.service sudo systemctl enable trilium.service
sudo systemctl start trilium.service</code></pre> sudo systemctl start trilium.service</code></pre>
</li> </li>

View File

@ -16,19 +16,16 @@
<p>Configure Nginx proxy and HTTPS. The operating system here is Ubuntu 18.04.</p> <p>Configure Nginx proxy and HTTPS. The operating system here is Ubuntu 18.04.</p>
<ol> <ol>
<li> <li>
<p>Download Nginx and remove Apache2</p> <p>Download Nginx and remove Apache2</p><pre><code class="language-text-x-trilium-auto">sudo apt-get install nginx
<pre><code class="language-text-x-trilium-auto">sudo apt-get install nginx
sudo apt-get remove apache2</code></pre> sudo apt-get remove apache2</code></pre>
</li> </li>
<li> <li>
<p>Create configure file</p> <p>Create configure file</p><pre><code class="language-text-x-trilium-auto">cd /etc/nginx/conf.d
<pre><code class="language-text-x-trilium-auto">cd /etc/nginx/conf.d
vim default.conf</code></pre> vim default.conf</code></pre>
</li> </li>
<li> <li>
<p>Fill the file with the context shown below, part of the setting show be <p>Fill the file with the context shown below, part of the setting show be
changed. Then you can enjoy your web with HTTPS forced and proxy.</p> changed. Then you can enjoy your web with HTTPS forced and proxy.</p><pre><code class="language-text-x-trilium-auto"># This part is for proxy and HTTPS configure
<pre><code class="language-text-x-trilium-auto"># This part is for proxy and HTTPS configure
server { server {
listen 443 ssl; listen 443 ssl;
server_name trilium.example.net; #change trilium.example.net to your domain without HTTPS or HTTP. server_name trilium.example.net; #change trilium.example.net to your domain without HTTPS or HTTP.

View File

@ -23,24 +23,16 @@
of unauthorized access, even if someone has obtained your password. Its of unauthorized access, even if someone has obtained your password. Its
highly recommended for securing sensitive information stored in your notes.</p> highly recommended for securing sensitive information stored in your notes.</p>
<p>Warning! OpenID and TOTP cannot be both used at the same time!</p> <p>Warning! OpenID and TOTP cannot be both used at the same time!</p>
<h2>Log in with your Google Account with OpenID!</h2>
<h2>Log in with your Google Account with OpenID!</h2>
<p>OpenID is a standardized way to let you log into websites using an account <p>OpenID is a standardized way to let you log into websites using an account
from another service, like Google, to verify your identity.</p> from another service, like Google, to verify your identity.</p>
<h2>Why Time-based One Time Passwords?</h2>
<h2>Why Time-based One Time Passwords?</h2>
<p>TOTP (Time-Based One-Time Password) is a security feature that generates <p>TOTP (Time-Based One-Time Password) is a security feature that generates
a unique, temporary code on your device, like a smartphone, which changes a unique, temporary code on your device, like a smartphone, which changes
every 30 seconds. You use this code, along with your password, to log into every 30 seconds. You use this code, along with your password, to log into
your account, making it much harder for anyone else to access them.</p> your account, making it much harder for anyone else to access them.</p>
<h2>Setup</h2>
<h2>Setup</h2> <h3>TOTP</h3>
<h3>TOTP</h3>
<ol> <ol>
<li> <li>
<p>Start Trilium Notes normally.</p> <p>Start Trilium Notes normally.</p>
@ -57,8 +49,7 @@
<li> <li>
<p>Set an environment variable "TOTP_SECRET" as the generated secret. Environment <p>Set an environment variable "TOTP_SECRET" as the generated secret. Environment
variables can be set with a .env file in the root directory, by defining variables can be set with a .env file in the root directory, by defining
them in the command line, or with a docker container.</p> them in the command line, or with a docker container.</p><pre><code class="language-text-x-trilium-auto"># .env in the project root directory
<pre><code class="language-text-x-trilium-auto"># .env in the project root directory
TOTP_ENABLED="true" TOTP_ENABLED="true"
TOTP_SECRET="secret"</code></pre><pre><code class="language-text-x-trilium-auto"># Terminal/CLI TOTP_SECRET="secret"</code></pre><pre><code class="language-text-x-trilium-auto"># Terminal/CLI
export TOTP_ENABLED="true" export TOTP_ENABLED="true"
@ -84,9 +75,7 @@ docker run -p 8080:8080 -v ~/trilium-data:/home/node/trilium-data -e TOTP_ENABLE
<p>Load the secret into an authentication app like google authenticator</p> <p>Load the secret into an authentication app like google authenticator</p>
</li> </li>
</ol> </ol>
<h3>OpenID</h3>
<h3>OpenID</h3>
<p><em>Currently only compatible with Google. Other services like Authentik and Auth0 are planned on being added.</em> <p><em>Currently only compatible with Google. Other services like Authentik and Auth0 are planned on being added.</em>
</p> </p>
<p>In order to setup OpenID, you will need to setup a authentication provider. <p>In order to setup OpenID, you will need to setup a authentication provider.
@ -96,23 +85,16 @@ docker run -p 8080:8080 -v ~/trilium-data:/home/node/trilium-data -e TOTP_ENABLE
and secret you obtained from google. Environment variables can be set with and secret you obtained from google. Environment variables can be set with
a .env file in the root directory, by defining them in the command line, a .env file in the root directory, by defining them in the command line,
or with a docker container.</p> or with a docker container.</p>
<h4>.env File</h4><pre><code class="language-text-x-trilium-auto"># .env in the project root directory
<h4>.env File</h4>
<pre><code class="language-text-x-trilium-auto"># .env in the project root directory
SSO_ENABLED="true" SSO_ENABLED="true"
BASE_URL="http://localhost:8080" BASE_URL="http://localhost:8080"
CLIENT_ID= CLIENT_ID=
SECRET=</code></pre> SECRET=</code></pre>
<h4>Environment variable (linux)</h4> <h4>Environment variable (linux)</h4><pre><code class="language-text-x-trilium-auto">export SSO_ENABLED="true"
<pre><code class="language-text-x-trilium-auto">export SSO_ENABLED="true"
export BASE_URL="http://localhost:8080" export BASE_URL="http://localhost:8080"
export CLIENT_ID= export CLIENT_ID=
export SECRET=</code></pre> export SECRET=</code></pre>
<h4>Docker</h4> <h4>Docker</h4><pre><code class="language-text-x-trilium-auto">docker run -d -p 8080:8080 -v ~/trilium-data:/home/node/trilium-data -e SSO_ENABLED="true" -e BASE_URL="http://localhost:8080" -e CLIENT_ID= -e SECRET= triliumnext/notes:[VERSION]</code></pre>
<pre><code class="language-text-x-trilium-auto">docker run -d -p 8080:8080 -v ~/trilium-data:/home/node/trilium-data -e SSO_ENABLED="true" -e BASE_URL="http://localhost:8080" -e CLIENT_ID= -e SECRET= triliumnext/notes:[VERSION]</code></pre>
<p>After you restart Trilium Notes, you will be redirected to Google's account <p>After you restart Trilium Notes, you will be redirected to Google's account
selection page. Login to an account and Trilium Next will bind to that selection page. Login to an account and Trilium Next will bind to that
account, allowing you to login with it.</p> account, allowing you to login with it.</p>

View File

@ -18,9 +18,7 @@
<p>For a more robust solution, consider using TLS termination with a reverse <p>For a more robust solution, consider using TLS termination with a reverse
proxy (recommended, e.g., Nginx). You can follow a <a href="https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-20-04">guide like this</a> for proxy (recommended, e.g., Nginx). You can follow a <a href="https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-20-04">guide like this</a> for
such setups.</p> such setups.</p>
<h2>Obtaining a TLS Certificate</h2>
<h2>Obtaining a TLS Certificate</h2>
<p>You have two options for obtaining a TLS certificate:</p> <p>You have two options for obtaining a TLS certificate:</p>
<ul> <ul>
<li><strong>Recommended</strong>: Obtain a TLS certificate signed by a root <li><strong>Recommended</strong>: Obtain a TLS certificate signed by a root
@ -31,13 +29,10 @@
to the additional complexity of importing the certificate into all machines to the additional complexity of importing the certificate into all machines
connecting to the server.</li> connecting to the server.</li>
</ul> </ul>
<h2>Modifying <code>config.ini</code></h2>
<h2>Modifying <code>config.ini</code></h2>
<p>Once you have your certificate, modify the <code>config.ini</code> file <p>Once you have your certificate, modify the <code>config.ini</code> file
in the <a href="../Data%20directory.html">data directory</a> to configure in the <a href="../Data%20directory.html">data directory</a> to configure
Trilium to use it:</p> Trilium to use it:</p><pre><code class="language-text-x-trilium-auto">[Network]
<pre><code class="language-text-x-trilium-auto">[Network]
port=8080 port=8080
# Set to true for TLS/SSL/HTTPS (secure), false for HTTP (insecure). # Set to true for TLS/SSL/HTTPS (secure), false for HTTP (insecure).
https=true https=true
@ -53,14 +48,11 @@ keyPath=/[username]/.acme.sh/[hostname]/example.com.key</code></pre>
or another directory accessible by the Docker container, such as <code>/home/node/trilium-data/[DIR IN DATA DIRECTORY]</code>.</p> or another directory accessible by the Docker container, such as <code>/home/node/trilium-data/[DIR IN DATA DIRECTORY]</code>.</p>
<p>After configuring <code>config.ini</code>, restart Trilium and access the <p>After configuring <code>config.ini</code>, restart Trilium and access the
hostname using "https".</p> hostname using "https".</p>
<h2>Self-Signed Certificate</h2>
<h2>Self-Signed Certificate</h2>
<p>If you opt to use a self-signed certificate for your server instance, <p>If you opt to use a self-signed certificate for your server instance,
note that the desktop instance will not trust it by default.</p> note that the desktop instance will not trust it by default.</p>
<p>To bypass this, disable certificate validation by setting the following <p>To bypass this, disable certificate validation by setting the following
environment variable (for Linux):</p> environment variable (for Linux):</p><pre><code class="language-text-x-trilium-auto">export NODE_TLS_REJECT_UNAUTHORIZED=0
<pre><code class="language-text-x-trilium-auto">export NODE_TLS_REJECT_UNAUTHORIZED=0
trilium</code></pre> trilium</code></pre>
<p>Trilium provides scripts to start in this mode, such as <code>trilium-no-cert-check.bat</code> for <p>Trilium provides scripts to start in this mode, such as <code>trilium-no-cert-check.bat</code> for
Windows.</p> Windows.</p>

View File

@ -18,25 +18,19 @@
up synchronization with a server instance, allowing multiple desktop clients up synchronization with a server instance, allowing multiple desktop clients
to sync with a central server. This creates a star-shaped topology:</p> to sync with a central server. This creates a star-shaped topology:</p>
<p> <p>
<img src="Synchronization_image.png" alt="" /> <img src="Synchronization_image.png" alt="">
</p> </p>
<p>In this setup, a central server (referred to as the <em>sync server</em>) <p>In this setup, a central server (referred to as the <em>sync server</em>)
and multiple <em>client</em> (or <em>desktop</em>) instances synchronize with and multiple <em>client</em> (or <em>desktop</em>) instances synchronize with
the sync server. Once configured, synchronization is automatic and ongoing, the sync server. Once configured, synchronization is automatic and ongoing,
requiring no manual intervention.</p> requiring no manual intervention.</p>
<h2>Setting Up Synchronization</h2>
<h2>Setting Up Synchronization</h2> <h3>Security Considerations</h3>
<h3>Security Considerations</h3>
<p>Setting up the server securely is critical and can be complex. It is crucial <p>Setting up the server securely is critical and can be complex. It is crucial
to use a valid <a href="Server%20Installation/TLS%20Configuration.html">TLS certificate</a> (HTTPS) to use a valid <a href="Server%20Installation/TLS%20Configuration.html">TLS certificate</a> (HTTPS)
rather than an unencrypted HTTP connection to ensure security and avoid rather than an unencrypted HTTP connection to ensure security and avoid
potential vulnerabilities.</p> potential vulnerabilities.</p>
<h3>Synchronizing a Desktop Instance with a Sync Server</h3>
<h3>Synchronizing a Desktop Instance with a Sync Server</h3>
<p>This method is used when you already have a desktop instance of Trilium <p>This method is used when you already have a desktop instance of Trilium
and want to set up a sync server on your web host.</p> and want to set up a sync server on your web host.</p>
<ol> <ol>
@ -47,8 +41,7 @@
instance address" to your sync server's address. Click Save.</li> instance address" to your sync server's address. Click Save.</li>
</ol> </ol>
<p> <p>
<img src="../Attachments/sync-config.png" alt="screenshot of the sync settings options modal" <img src="../Attachments/sync-config.png" alt="screenshot of the sync settings options modal">
/>
</p> </p>
<ol> <ol>
<li><strong>Testing Sync</strong>: Click the "Test sync" button to verify <li><strong>Testing Sync</strong>: Click the "Test sync" button to verify
@ -58,9 +51,7 @@
to confirm when the sync is complete. Once finished, you should see the to confirm when the sync is complete. Once finished, you should see the
login screen on the server.</li> login screen on the server.</li>
</ol> </ol>
<h3>Synchronizing a Desktop Instance from a Sync Server</h3>
<h3>Synchronizing a Desktop Instance from a Sync Server</h3>
<p>This method is used when you already have a sync server and want to configure <p>This method is used when you already have a sync server and want to configure
a new desktop instance to sync with it.</p> a new desktop instance to sync with it.</p>
<ol> <ol>
@ -69,8 +60,7 @@
to set up sync with a sync server.</li> to set up sync with a sync server.</li>
</ol> </ol>
<p> <p>
<img src="../Attachments/sync-init.png" alt="screenshot of the sync from server setup page" <img src="../Attachments/sync-init.png" alt="screenshot of the sync from server setup page">
/>
</p> </p>
<ol> <ol>
<li><strong>Server Details</strong>: Configure the Trilium server address <li><strong>Server Details</strong>: Configure the Trilium server address
@ -79,14 +69,11 @@
you will see the following screen:</li> you will see the following screen:</li>
</ol> </ol>
<p> <p>
<img src="../Attachments/sync-in-progress.png" alt="screenshot of the sync page" <img src="../Attachments/sync-in-progress.png" alt="screenshot of the sync page">
/>
</p> </p>
<p>Once synchronization is complete, you will be automatically redirected <p>Once synchronization is complete, you will be automatically redirected
to the Trilium application.</p> to the Trilium application.</p>
<h2>Proxy Configuration</h2>
<h2>Proxy Configuration</h2>
<p>Two proxy setups are supported:</p> <p>Two proxy setups are supported:</p>
<ul> <ul>
<li><strong>Explicit Proxy Configuration</strong>: Set the proxy server in <li><strong>Explicit Proxy Configuration</strong>: Set the proxy server in
@ -94,36 +81,25 @@
<li><strong>System Proxy Settings</strong>: If no proxy server is explicitly <li><strong>System Proxy Settings</strong>: If no proxy server is explicitly
configured, Trilium will use the system proxy settings.</li> configured, Trilium will use the system proxy settings.</li>
</ul> </ul>
<h2>Troubleshooting</h2>
<h2>Troubleshooting</h2> <h3>Date/Time Synchronization</h3>
<h3>Date/Time Synchronization</h3>
<p>For successful synchronization, both client and server must have the same <p>For successful synchronization, both client and server must have the same
date and time, with a tolerance of up to five minutes.</p> date and time, with a tolerance of up to five minutes.</p>
<h3>Certificate Issues</h3>
<h3>Certificate Issues</h3>
<p>When using TLS, Trilium will verify the server certificate. If verification <p>When using TLS, Trilium will verify the server certificate. If verification
fails (e.g., due to self-signed certificates or certain corporate proxies), fails (e.g., due to self-signed certificates or certain corporate proxies),
you can run the Trilium client with the <code>NODE_TLS_REJECT_UNAUTHORIZED</code> environment you can run the Trilium client with the <code>NODE_TLS_REJECT_UNAUTHORIZED</code> environment
variable set to <code>0</code>:</p> variable set to <code>0</code>:</p><pre><code class="language-text-x-trilium-auto">export NODE_TLS_REJECT_UNAUTHORIZED=0</code></pre>
<pre><code class="language-text-x-trilium-auto">export NODE_TLS_REJECT_UNAUTHORIZED=0</code></pre>
<p>This will disable TLS certificate verification, significantly reducing <p>This will disable TLS certificate verification, significantly reducing
security and exposing the setup to MITM attacks. It is strongly recommended security and exposing the setup to MITM attacks. It is strongly recommended
to use a valid signed server certificate. Newer Trilium versions include to use a valid signed server certificate. Newer Trilium versions include
a script called <code>trilium-no-cert-check.sh</code> for this purpose.</p> a script called <code>trilium-no-cert-check.sh</code> for this purpose.</p>
<h3>Conflict Resolution</h3>
<h3>Conflict Resolution</h3>
<p>If you edit the same note on multiple instances before synchronization, <p>If you edit the same note on multiple instances before synchronization,
Trilium resolves conflicts by retaining the newer change and discarding Trilium resolves conflicts by retaining the newer change and discarding
the older one. The older version remains accessible in <a href="../Basic%20Concepts/Note/Note%20Revisions.html">note revisions</a>, the older one. The older version remains accessible in <a href="../Basic%20Concepts/Note/Note%20Revisions.html">note revisions</a>,
allowing data recovery if needed.</p> allowing data recovery if needed.</p>
<h3>Hash Check</h3>
<h3>Hash Check</h3>
<p>After each synchronization, Trilium computes a hash of all synced data <p>After each synchronization, Trilium computes a hash of all synced data
on both the client and the sync server. If there is a discrepancy, Trilium on both the client and the sync server. If there is a discrepancy, Trilium
will automatically initiate a recovery mechanism to resolve the issue.</p> will automatically initiate a recovery mechanism to resolve the issue.</p>

View File

@ -15,9 +15,7 @@
<div class="ck-content"> <div class="ck-content">
<p>This document outlines the steps required to upgrade Trilium to a new <p>This document outlines the steps required to upgrade Trilium to a new
release version.</p> release version.</p>
<h2>How to Upgrade</h2>
<h2>How to Upgrade</h2>
<p>Trilium does not support built-in automatic upgrades; all updates must <p>Trilium does not support built-in automatic upgrades; all updates must
be performed manually. The upgrade process varies depending on the installation be performed manually. The upgrade process varies depending on the installation
method:</p> method:</p>
@ -28,17 +26,13 @@
the <a href="https://github.com/TriliumNext/Notes/releases/latest">release page</a> and the <a href="https://github.com/TriliumNext/Notes/releases/latest">release page</a> and
replace the existing application files.</li> replace the existing application files.</li>
</ul> </ul>
<h2>Database Compatibility and Migration</h2>
<h2>Database Compatibility and Migration</h2>
<p>Upon startup, Trilium will automatically migrate the <a href="../Advanced%20Usage/Database.html">database</a> to <p>Upon startup, Trilium will automatically migrate the <a href="../Advanced%20Usage/Database.html">database</a> to
the new version. Note that after migration, older versions of Trilium will the new version. Note that after migration, older versions of Trilium will
be unable to read the database. If you need to revert to a previous version be unable to read the database. If you need to revert to a previous version
of Trilium and its database, you can restore the <a href="Backup.html">backup</a> that of Trilium and its database, you can restore the <a href="Backup.html">backup</a> that
is created prior to migration.</p> is created prior to migration.</p>
<h2>Sync Compatibility</h2>
<h2>Sync Compatibility</h2>
<p>The <a href="Synchronization.html">synchronization</a> protocol used by <p>The <a href="Synchronization.html">synchronization</a> protocol used by
Trilium is versioned, requiring all members of the sync cluster to use Trilium is versioned, requiring all members of the sync cluster to use
the same protocol version. Therefore, when upgrading to a new version, the same protocol version. Therefore, when upgrading to a new version,

View File

@ -14,7 +14,7 @@
<div class="ck-content"> <div class="ck-content">
<p> <p>
<img src="Web Clipper_image.png" alt="" /> <img src="Web Clipper_image.png" alt="">
</p> </p>
<p>Trilium Web Clipper is a web browser extension which allows user to clip <p>Trilium Web Clipper is a web browser extension which allows user to clip
text, screenshots, whole pages and short notes and save them directly to text, screenshots, whole pages and short notes and save them directly to
@ -22,9 +22,7 @@
<p>Project is hosted <a href="https://github.com/TriliumNext/web-clipper">here</a>.</p> <p>Project is hosted <a href="https://github.com/TriliumNext/web-clipper">here</a>.</p>
<p>Firefox and Chrome are supported browsers, but the chrome build should <p>Firefox and Chrome are supported browsers, but the chrome build should
work on other chromium based browsers as well.</p> work on other chromium based browsers as well.</p>
<h2>Functionality</h2>
<h2>Functionality</h2>
<ul> <ul>
<li>select text and clip it with the right-click context menu</li> <li>select text and clip it with the right-click context menu</li>
<li>click on an image or link and save it through context menu</li> <li>click on an image or link and save it through context menu</li>
@ -47,17 +45,13 @@
<li>%%{WARNING}%% <a href="https://chromewebstore.google.com/detail/trilium-web-clipper/dfhgmnfclbebfobmblelddiejjcijbjm">Chrome Web Store</a> <li>%%{WARNING}%% <a href="https://chromewebstore.google.com/detail/trilium-web-clipper/dfhgmnfclbebfobmblelddiejjcijbjm">Chrome Web Store</a>
</li> </li>
</ul> </ul>
<h2>Configuration</h2>
<h2>Configuration</h2>
<p>The extension needs to connect to a running Trilium instance. By default, <p>The extension needs to connect to a running Trilium instance. By default,
it scans a port range on the local computer to find a desktop Trilium instance.</p> it scans a port range on the local computer to find a desktop Trilium instance.</p>
<p>It's also possible to configure the <a href="Server%20Installation.html">server</a> address <p>It's also possible to configure the <a href="Server%20Installation.html">server</a> address
if you don't run the desktop application, or want it to work without the if you don't run the desktop application, or want it to work without the
desktop application running.</p> desktop application running.</p>
<h2>Username</h2>
<h2>Username</h2>
<p>Older versions of Trilium (before 0.50) required username &amp; password <p>Older versions of Trilium (before 0.50) required username &amp; password
to authenticate, but this is no longer the case. You may enter anything to authenticate, but this is no longer the case. You may enter anything
in that field, it will not have any effect.</p> in that field, it will not have any effect.</p>

View File

@ -18,28 +18,22 @@
book-like reading experience. This format is particularly useful for viewing book-like reading experience. This format is particularly useful for viewing
multiple smaller notes in a cohesive, continuous manner.</p> multiple smaller notes in a cohesive, continuous manner.</p>
<p> <p>
<img src="1_Book_image.png" alt="" /> <img src="1_Book_image.png" alt="">
</p> </p>
<p>In the example above, the "node.js" note on the left panel contains several <p>In the example above, the "node.js" note on the left panel contains several
child notes. The right panel displays the content of these child notes child notes. The right panel displays the content of these child notes
as a single continuous document.</p> as a single continuous document.</p>
<h2>Features</h2>
<h2>Features</h2> <h3>Linear Display</h3>
<h3>Linear Display</h3>
<p>The Book Note format compiles the contents of all child notes into one <p>The Book Note format compiles the contents of all child notes into one
continuous view. This makes it ideal for reading extensive information continuous view. This makes it ideal for reading extensive information
broken into smaller, manageable segments.</p> broken into smaller, manageable segments.</p>
<h3>Grid View Option</h3>
<h3>Grid View Option</h3>
<p>Trilium also offers a "Grid View" option within the Book Note properties. <p>Trilium also offers a "Grid View" option within the Book Note properties.
This view presents the child notes in a grid format, allowing for a more This view presents the child notes in a grid format, allowing for a more
visual navigation experience.</p> visual navigation experience.</p>
<p> <p>
<img src="Book_image.png" alt="" /> <img src="Book_image.png" alt="">
</p> </p>
<p>Switching between these views can be easily managed through the Book Note's <p>Switching between these views can be easily managed through the Book Note's
settings (or <code>viewType</code> attribute), allowing users to choose the settings (or <code>viewType</code> attribute), allowing users to choose the

View File

@ -14,15 +14,13 @@
<div class="ck-content"> <div class="ck-content">
<p> <p>
<img src="6_Calendar View_image.png" alt="" /> <img src="6_Calendar View_image.png" alt="">
</p> </p>
<p>The Calendar view of Book notes will display each child note in a calendar <p>The Calendar view of Book notes will display each child note in a calendar
that has a start date and optionally an end date, as an event.</p> that has a start date and optionally an end date, as an event.</p>
<p>Unlike other Book view types, the Calendar view also allows some kind <p>Unlike other Book view types, the Calendar view also allows some kind
of interaction, such as moving events around as well as creating new ones.</p> of interaction, such as moving events around as well as creating new ones.</p>
<h2>Creating a calendar</h2>
<h2>Creating a calendar</h2>
<table> <table>
<thead> <thead>
<tr> <tr>
@ -35,7 +33,7 @@
<tr> <tr>
<td>1</td> <td>1</td>
<td> <td>
<img src="3_Calendar View_image.png" alt="" /> <img src="3_Calendar View_image.png" alt="">
</td> </td>
<td>The Calendar View works only for Book note types. To create a new note, <td>The Calendar View works only for Book note types. To create a new note,
right click on the note tree on the left and select Insert note after, right click on the note tree on the left and select Insert note after,
@ -44,16 +42,14 @@
<tr> <tr>
<td>2</td> <td>2</td>
<td> <td>
<img src="5_Calendar View_image.png" alt="" /> <img src="5_Calendar View_image.png" alt="">
</td> </td>
<td>Once created, the “View type” of the Book needs changed to “Calendar”, <td>Once created, the “View type” of the Book needs changed to “Calendar”,
by selecting the “Book Properties” tab in the ribbon.</td> by selecting the “Book Properties” tab in the ribbon.</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<h2>Creating a new event/note</h2>
<h2>Creating a new event/note</h2>
<ul> <ul>
<li>Clicking on a day will create a new child note and assign it to that particular <li>Clicking on a day will create a new child note and assign it to that particular
day. day.
@ -64,20 +60,17 @@
</li> </li>
<li>It's possible to drag across multiple days to set both the start and end <li>It's possible to drag across multiple days to set both the start and end
date of a particular note. date of a particular note.
<br /> <br>
<img src="Calendar View_image.png" alt="" /> <img src="Calendar View_image.png" alt="">
</li> </li>
<li>Creating new notes from the calendar will respect the <code>~child:template</code> relation <li>Creating new notes from the calendar will respect the <code>~child:template</code> relation
if set on the book note.</li> if set on the book note.</li>
</ul> </ul>
<h2>Interacting with events</h2>
<h2>Interacting with events</h2>
<ul> <ul>
<li>Hovering the mouse over an event will display information about the note. <li>Hovering the mouse over an event will display information about the note.
<br <br>
/> <img src="11_Calendar View_image.png" alt="">
<img src="11_Calendar View_image.png" alt="" />
</li> </li>
<li>Left clicking the event will go to that note. Middle clicking will open <li>Left clicking the event will go to that note. Middle clicking will open
the note in a new tab and right click will offer more options including the note in a new tab and right click will offer more options including
@ -86,9 +79,7 @@
<li>The length of an event can be changed by placing the mouse to the right <li>The length of an event can be changed by placing the mouse to the right
edge of the event and dragging the mouse around.</li> edge of the event and dragging the mouse around.</li>
</ul> </ul>
<h2>Configuring the calendar</h2>
<h2>Configuring the calendar</h2>
<p>The following attributes can be added to the book type:</p> <p>The following attributes can be added to the book type:</p>
<table> <table>
<thead> <thead>
@ -120,9 +111,7 @@
</table> </table>
<p>In addition, the first day of the week can be either Sunday or Monday <p>In addition, the first day of the week can be either Sunday or Monday
and can be adjusted from the application settings.</p> and can be adjusted from the application settings.</p>
<h2>Configuring the calendar events</h2>
<h2>Configuring the calendar events</h2>
<p>For each note of the calendar, the following attributes can be used:</p> <p>For each note of the calendar, the following attributes can be used:</p>
<table> <table>
<thead> <thead>
@ -177,15 +166,14 @@
</td> </td>
<td>Allows displaying the value of one or more promoted attributes in the <td>Allows displaying the value of one or more promoted attributes in the
calendar like this: calendar like this:
<img src="13_Calendar View_image.png" alt="" /> <img src="13_Calendar View_image.png" alt="">
<br /> <br>
<br /><code>&lt;br&gt;#label:weight="promoted,number,single,precision=1"&lt;br&gt;#label:mood="promoted,alias=Mood,single,text"&lt;br&gt;#calendar:promotedAttributes="label:weight,label:mood" &lt;br&gt;</code> <br><code>&lt;br&gt;#label:weight="promoted,number,single,precision=1"&lt;br&gt;#label:mood="promoted,alias=Mood,single,text"&lt;br&gt;#calendar:promotedAttributes="label:weight,label:mood" &lt;br&gt;</code>
<br <br>
/> <br>It can also be used with relations, case in which it will display the
<br />It can also be used with relations, case in which it will display the
title of the target note: title of the target note:
<br /> <br>
<br /><code>&lt;br&gt;#relation:assignee="promoted,alias=Assignee,single,text"&lt;br&gt;#calendar:promotedAttributes="relation:assignee" &lt;br&gt;~assignee=@My assignee&lt;br&gt;</code> <br><code>&lt;br&gt;#relation:assignee="promoted,alias=Assignee,single,text"&lt;br&gt;#calendar:promotedAttributes="relation:assignee" &lt;br&gt;~assignee=@My assignee&lt;br&gt;</code>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -204,28 +192,21 @@
</tr> </tr>
</tbody> </tbody>
</table> </table>
<h2>How the calendar works</h2>
<h2>How the calendar works</h2>
<p> <p>
<img src="17_Calendar View_image.png" alt="" />The calendar displays all the child notes of the book that have a <code>#startDate</code>. <img src="17_Calendar View_image.png" alt="">The calendar displays all the child notes of the book that have a <code>#startDate</code>.
An <code>#endDate</code> can optionally be added.</p> An <code>#endDate</code> can optionally be added.</p>
<p>If editing the start date and end date from the note itself is desirable, <p>If editing the start date and end date from the note itself is desirable,
the following attributes can be added to the book note:</p> the following attributes can be added to the book note:</p><pre><code class="language-text-x-trilium-auto">#viewType=calendar #label:startDate(inheritable)="promoted,alias=Start Date,single,date" #label:endDate(inheritable)="promoted,alias=End Date,single,date" #hidePromotedAttributes </code></pre>
<pre><code class="language-text-x-trilium-auto">#viewType=calendar #label:startDate(inheritable)="promoted,alias=Start Date,single,date" #label:endDate(inheritable)="promoted,alias=End Date,single,date" #hidePromotedAttributes </code></pre>
<p>This will result in:</p> <p>This will result in:</p>
<p> <p>
<img src="14_Calendar View_image.png" alt="" /> <img src="14_Calendar View_image.png" alt="">
</p> </p>
<p>When not used in a Journal, the calendar is recursive. That is, it will <p>When not used in a Journal, the calendar is recursive. That is, it will
look for events not just in its child notes but also in the children of look for events not just in its child notes but also in the children of
these child notes.</p> these child notes.</p>
<h2>Use-cases</h2>
<h2>Use-cases</h2> <h3>Using with the Journal / calendar</h3>
<h3>Using with the Journal / calendar</h3>
<p>It is possible to integrate the calendar view into the Journal with day <p>It is possible to integrate the calendar view into the Journal with day
notes. In order to do so change the note type of the Journal note (calendar notes. In order to do so change the note type of the Journal note (calendar
root) to Book and then select the Calendar View.</p> root) to Book and then select the Calendar View.</p>
@ -244,11 +225,9 @@
will not be displayed.</li> will not be displayed.</li>
</ul> </ul>
<p> <p>
<img src="12_Calendar View_image.png" alt="" /> <img src="12_Calendar View_image.png" alt="">
</p> </p>
<h3>Using a different attribute as event title</h3>
<h3>Using a different attribute as event title</h3>
<p>By default, events are displayed on the calendar by their note title. <p>By default, events are displayed on the calendar by their note title.
However, it is possible to configure a different attribute to be displayed However, it is possible to configure a different attribute to be displayed
instead.</p> instead.</p>
@ -267,17 +246,15 @@
<tbody> <tbody>
<tr> <tr>
<td> <td>
<img src="7_Calendar View_image.png" alt="" /> <img src="7_Calendar View_image.png" alt="">
</td> </td>
<td> <td>
<img src="9_Calendar View_image.png" alt="" /> <img src="9_Calendar View_image.png" alt="">
</td> </td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<h3>Using a relation attribute as event title</h3>
<h3>Using a relation attribute as event title</h3>
<p>Similarly to using an attribute, use <code>#calendar:title</code> and set <p>Similarly to using an attribute, use <code>#calendar:title</code> and set
it to <code>~name</code> where <code>name</code> is the name of the relation it to <code>~name</code> where <code>name</code> is the name of the relation
to use.</p> to use.</p>
@ -293,10 +270,10 @@
<tbody> <tbody>
<tr> <tr>
<td> <td>
<img src="8_Calendar View_image.png" alt="" /> <img src="8_Calendar View_image.png" alt="">
</td> </td>
<td> <td>
<img src="10_Calendar View_image.png" alt="" /> <img src="10_Calendar View_image.png" alt="">
</td> </td>
</tr> </tr>
</tbody> </tbody>
@ -316,10 +293,10 @@
<tbody> <tbody>
<tr> <tr>
<td> <td>
<img src="15_Calendar View_image.png" alt="" /> <img src="15_Calendar View_image.png" alt="">
</td> </td>
<td> <td>
<img src="2_Calendar View_image.png" alt="" /> <img src="2_Calendar View_image.png" alt="">
</td> </td>
</tr> </tr>
</tbody> </tbody>

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