Disables automatic creation of Note Revisions. Useful for e.g. large, but unimportant notes - e.g. large JS libraries used for scripting.
calendarRoot
Marks the note which should be used as root for Day Notes. Only one should be marked as such.
archived
Hides notes from default search results and dialogs. Archived notes can optionally be hidden in the Note Tree.
excludeFromExport
Notes (with their sub-tree) won't be included when exporting.
run
Defines on which events script should run. Possible values are:
frontendStartup - when Trilium frontend starts up (or is refreshed), but not on mobile.
mobileStartup - when Trilium frontend starts up (or is refreshed), on mobile.
backendStartup - when Trilium backend starts up
hourly - run once an hour. You can use additional label runAtHour to specify at which hour.
daily - run once a day
runOnInstance
Define which trilium instance should run this on. Default to all instances.
runAtHour
On which hour should this run. Should be used together with #run=hourly. Can be defined multiple times for more runs during the day.
disableInclusion
Scripts with this label won't be included into parent script execution.
sorted
Keeps child notes sorted by title alphabetically.
When given a value, it will sort by the value of another label instead. If one of the child notes doesn't have the specified label, the title will be used for them instead.
sortDirection
If sorted is applied, specifies the direction of the sort:
ASC, ascending (default)
DESC, descending
sortFoldersFirst
If sorted is applied, folders (notes with children) will be sorted as a group at the top, and the rest will be sorted.
top
If sorted is applied to the parent note, keeps given note on top in its parent.
Marks a note to be always be read-only, if it's a supported note (text, code, mermaid).
autoReadOnlyDisabled
text/code notes can be set automatically into read mode when they are too large. You can disable this behavior on per-note basis by adding this label to the note
appCss
marks CSS notes which are loaded into the Trilium application and can thus be used to modify Trilium's looks.
appTheme
marks CSS notes which are full Trilium themes and are thus available in Trilium options.
appThemeBase
Set to next, next-light, or next-dark to use the corresponding TriliumNext theme (auto, light or dark) as the base for a custom theme, instead of the legacy one. See Customize the Next theme for more information.
cssClass
value of this label is then added as CSS class to the node representing given note in the tree. This can be useful for advanced theming. Can be used in template notes.
iconClass
value of this label is added as a CSS class to the icon on the tree which can help visually distinguish the notes in the tree. Example might be bx bx-home - icons are taken from boxicons. Can be used in template notes.
marks this note as a custom widget which will be added to the Trilium component tree. See Custom Widgets for more information.
workspace
marks this note as a workspace which allows easy hoisting
workspaceIconClass
defines box icon CSS class which will be used in tab when hoisted to this note
workspaceTabBackgroundColor
CSS color used in the note tab when hoisted to this note
workspaceCalendarRoot
Defines per-workspace calendar root
workspaceTemplate
This note will appear in the selection of available template when creating new note, but only when hoisted into a workspace containing this template
searchHome
new search notes will be created as children of this note
workspaceSearchHome
new search notes will be created as children of this note when hoisted to some ancestor of this workspace note
inbox
default inbox location for new notes - when you create a note using new note button in the sidebar, notes will be created as child notes in the note marked as with #inbox label.
workspaceInbox
default inbox location for new notes when hoisted to some ancestor of this workspace note
note with this label will appear in bookmarks as folder (allowing access to its children)
shareHiddenFromTree
this note is hidden from left navigation tree, but still accessible with its URL
shareExternalLink
note will act as a link to an external website in the share tree
shareAlias
define an alias using which the note will be available under https://your_trilium_host/share/[your_alias]
shareOmitDefaultCss
default share page CSS will be omitted. Use when you make extensive styling changes.
shareRoot
marks note which is served on /share root.
shareDescription
define text to be added to the HTML meta tag for description
shareRaw
note will be served in its raw format, without HTML wrapper
shareDisallowRobotIndexing
will forbid robot indexing of this note by setting the X-Robots-Tag: noindex HTTP header.
shareCredentials
require credentials to access this shared note. Value is expected to be in format username:password. Don't forget to make this inheritable to apply to child-notes/images.
shareIndex
note with this label will list all roots of shared notes
displayRelations
comma delimited names of relations which should be displayed. All other ones will be hidden.
hideRelations
comma delimited names of relations which should be hidden. All other ones will be displayed.
titleTemplate
Default title of notes created as children of this note. This value is evaluated as a JavaScript string and thus can be enriched with dynamic content via the injected now and parentNote variables.
Examples:
${parentNote.getLabel('authorName')}'s literary works
Log for ${now.format('YYYY-MM-DD HH:mm:ss')}
${parentNote.title} to mirror the parent's template.
template
This note will appear in the selection of available template when creating new note
toc
Controls the display of the Table of contents for a given note. #toc or #toc=show to always display the table of contents, #toc=false to always hide it.
color
defines color of the note in note tree, links etc. Use any valid CSS color value like 'red' or #a13d5f
keyboardShortcut
Defines a keyboard shortcut which will immediately jump to this note. Example: 'ctrl+alt+e'. Requires frontend reload for the change to take effect.
keepCurrentHoisting
Opening this link won't change hoisting even if the note is not displayable in the current hoisted subtree.
executeButton
Title of the button which will execute the current code note
executeDescription
Longer description of the current code note displayed together with the execute button
excludeFromNoteMap
Notes with this label will be hidden from the Note Map.
newNotesOnTop
New notes will be created at the top of the parent note, not on the bottom.
hideHighlightWidget
Hide Highlight List widget
printLandscape
When exporting to PDF, changes the orientation of the page to landscape instead of portrait.
printPageSize
When exporting to PDF, changes the size of the page. Supported values: A0, A1, A2, A3, A4, A5, A6, Legal, Letter, Tabloid, Ledger.
+> [!TIP]
+> Some labels presented here end with a `*`. That means that there are multiple labels with the same prefix, consult the specific page linked in the description of that label for more information.
+
+
Label
Description
disableVersioning
Disables automatic creation of Note Revisions for a particular note. Useful for e.g. large, but unimportant notes - e.g. large JS libraries used for scripting.
versioningLimit
Limits the maximum number of Note Revisions for a particular note, overriding the global settings.
calendarRoot
Marks the note which should be used as root for Day Notes. Only one should be marked as such.
archived
Hides notes from default search results and dialogs. Archived notes can optionally be hidden in the Note Tree.
excludeFromExport
Excludes this note and its children when exporting.
Scripts with this label won't be included into parent script execution.
sorted
Keeps child notes sorted by title alphabetically.
When given a value, it will sort by the value of another label instead. If one of the child notes doesn't have the specified label, the title will be used for them instead.
sortDirection
If sorted is applied, specifies the direction of the sort:
ASC, ascending (default)
DESC, descending
sortFoldersFirst
If sorted is applied, folders (notes with children) will be sorted as a group at the top, and the rest will be sorted.
top
If sorted is applied to the parent note, keeps given note on top in its parent.
hidePromotedAttributes
Hide Promoted Attributes on this note. Generally useful when defining inherited attributes, but the parent note doesn't need them.
readOnly
Marks a note to be always be read-only, if it's a supported note (text, code, mermaid).
Marks CSS notes which are loaded into the Trilium application and can thus be used to modify Trilium's looks. See Custom app-wide CSS for more info.
appTheme
Marks CSS notes which are full Trilium themes and are thus available in Trilium options. See Theme development for more information.
appThemeBase
Set to next, next-light, or next-dark to use the corresponding TriliumNext theme (auto, light or dark) as the base for a custom theme, instead of the legacy one. See Customize the Next theme for more information.
cssClass
Value of this label is then added as CSS class to the node representing given note in the Note Tree. This can be useful for advanced theming. Can be used in template notes.
iconClass
value of this label is added as a CSS class to the icon on the tree which can help visually distinguish the notes in the tree. Example might be bx bx-home - icons are taken from boxicons. Can be used in template notes.
pageSize
Specifies the number of items per page in Note List.
default inbox location for new notes - when you create a note using new note button in the sidebar, notes will be created as child notes in the note marked as with #inbox label.
Comma delimited names of relations which should be displayed/hidden in a Relation Map (both the note type and the Note Map (Link map, Tree map) general functionality).
titleTemplate
Default title of notes created as children of this note. This value is evaluated as a JavaScript string and thus can be enriched with dynamic content via the injected now and parentNote variables.
Examples:
${parentNote.getLabel('authorName')}'s literary works
This note will appear in the selection of available template when creating new note. See Templates for more information.
toc
Controls the display of the Table of contents for a given note. #toc or #toc=show to always display the table of contents, #toc=false to always hide it.
color
defines color of the note in note tree, links etc. Use any valid CSS color value like 'red' or #a13d5f
keyboardShortcut
Defines a keyboard shortcut which will immediately jump to this note. Example: 'ctrl+alt+e'. Requires frontend reload for the change to take effect.
keepCurrentHoisting
Opening this link won't change hoisting even if the note is not displayable in the current hoisted subtree.
executeButton
Title of the button which will execute the current code note
executeDescription
Longer description of the current code note displayed together with the execute button
excludeFromNoteMap
Notes with this label will be hidden from the Note Map.
newNotesOnTop
New notes will be created at the top of the parent note, not on the bottom.
Sets the view of child notes (e.g. grid or list). See Note List for more information.
## Relations
-
Label
Description
runOnNoteCreation
executes when note is created on backend. Use this relation if you want to run the script for all notes created under a specific subtree. In that case, create it on the subtree root note and make it inheritable. A new note created within the subtree (any depth) will trigger the script.
runOnChildNoteCreation
executes when new note is created under the note where this relation is defined
runOnNoteTitleChange
executes when note title is changed (includes note creation as well)
runOnNoteContentChange
executes when note content is changed (includes note creation as well).
runOnNoteChange
executes when note is changed (includes note creation as well). Does not include content changes
runOnNoteDeletion
executes when note is being deleted
runOnBranchCreation
executes when a branch is created. Branch is a link between parent note and child note and is created e.g. when cloning or moving note.
runOnBranchChange
executes when a branch is updated.
runOnBranchDeletion
executes when a branch is deleted. Branch is a link between parent note and child note and is deleted e.g. when moving note (old branch/link is deleted).
runOnAttributeCreation
executes when new attribute is created for the note which defines this relation
runOnAttributeChange
executes when the attribute is changed of a note which defines this relation. This is triggered also when the attribute is deleted
template
note's attributes will be inherited even without a parent-child relationship, note's content and subtree will be added to instance notes if empty. See documentation for details.
inherit
note's attributes will be inherited even without a parent-child relationship. See Templates for a similar concept. See Attribute Inheritance in the documentation.
renderNote
notes of type Render Note will be rendered using a code note (HTML or script) and it is necessary to point using this relation to which note should be rendered
widget_relation
target of this relation will be executed and rendered as a widget in the sidebar
shareCss
CSS note which will be injected into the share page. CSS note must be in the shared sub-tree as well. Consider using share_hidden_from_tree and share_omit_default_css as well.
shareJs
JavaScript note which will be injected into the share page. JS note must be in the shared sub-tree as well. Consider using share_hidden_from_tree.
shareTemplate
Embedded JavaScript note that will be used as the template for displaying the shared note. Falls back to the default template. Consider using share_hidden_from_tree.
shareFavicon
Favicon note to be set in the shared page. Typically you want to set it to share root and make it inheritable. Favicon note must be in the shared sub-tree as well. Consider using share_hidden_from_tree.
+> [!TIP]
+> Some relations presented here end with a `*`. That means that there are multiple relations with the same prefix, consult the specific page linked in the description of that relation for more information.
-* `disableVersioning`: Disables automatic versioning, ideal for large, unimportant notes like script libraries
-* `versioningLimit`: Used to limit the number of revisions for a single note
-* `calendarRoot`: Marks the note as the root for Day Notes. Only one note should carry this label.
-* `excludeFromExport`: Excludes notes and their subtrees from export operations
-* `run`: Specifies events to trigger scripts (e.g., `frontendStartup`, `hourly`)
-* `runAtHour`: Defines specific hours for scripts to run, used with `#run=hourly`
-* `disableInclusion`: Prevents a script from being included in parent script executions
-* `sorted`: Automatically sorts child notes alphabetically by title
-* `top`: Keeps the note at the top of its parent's list, useful with `sorted`
-* `hidePromotedAttributes`: Hides certain attributes in the note's display
-* `readOnly`: Sets the note to read-only mode, applicable to text and code notes
-* `autoReadOnlyDisabled`: Disables automatic read-only mode for large notes
-* `appCss`: Marks CSS notes used to modify Trilium’s appearance
-* `appTheme`: Marks full CSS themes available in Trilium's options
-* `cssClass`: Adds a CSS class to the note's representation in the tree
-* `iconClass`: Adds a CSS class to the note's icon, useful for distinguishing notes visually. See Note Icons.
-* `pageSize`: Specifies the number of items per page in note listings
-* `customRequestHandler` **and** `customResourceProvider`: Refer to Custom Request Handler
-* `widget`: Marks a note as a custom widget, added to Trilium's component tree
-* `workspace` **and related attributes**: See Workspace for more details
-* `searchHome`: Specifies the parent for new search notes
-* `inbox`: Designates a default location for new notes created via the sidebar
-* `sqlConsoleHome`: Default location for SQL console notes
-* `bookmarked` **and** `bookmarkFolder`: See Bookmarks
-* `share:[…]`: See Sharing
-* `keyboardShortcut`: Assigns a keyboard shortcut to open the note
-* `displayRelations` **and** `hideRelations`: Manages the display of note relations
-* `titleTemplate`: See Default Note Title
-* `template`: Makes the note available as a template
-* `toc`: Controls the visibility of the table of contents
-* `color`: Defines the color of the note in the tree and links
-* `hideChildrenOverview`: Hides child notes in the parent note's editor
-* `viewType`: Sets the view of child notes (grid or list)
-
-## Relations
\ No newline at end of file
+
note's attributes will be inherited even without a parent-child relationship, note's content and subtree will be added to instance notes if empty. See documentation for details.
inherit
note's attributes will be inherited even without a parent-child relationship. See Templates for a similar concept. See Attribute Inheritance in the documentation.
renderNote
notes of type Render Note will be rendered using a code note (HTML or script) and it is necessary to point using this relation to which note should be rendered
widget_relation
target of this relation will be executed and rendered as a widget in the sidebar
shareCss
CSS note which will be injected into the share page. CSS note must be in the shared sub-tree as well. Consider using share_hidden_from_tree and share_omit_default_css as well.
shareJs
JavaScript note which will be injected into the share page. JS note must be in the shared sub-tree as well. Consider using share_hidden_from_tree.
shareTemplate
Embedded JavaScript note that will be used as the template for displaying the shared note. Falls back to the default template. Consider using share_hidden_from_tree.
shareFavicon
Favicon note to be set in the shared page. Typically you want to set it to share root and make it inheritable. Favicon note must be in the shared sub-tree as well. Consider using share_hidden_from_tree.
\ No newline at end of file
diff --git a/docs/User Guide/User Guide/Advanced Usage/Configuration (config.ini or environment variables)/Trilium instance.md b/docs/User Guide/User Guide/Advanced Usage/Configuration (config.ini or environment variables)/Trilium instance.md
new file mode 100644
index 000000000..6c69aff5e
--- /dev/null
+++ b/docs/User Guide/User Guide/Advanced Usage/Configuration (config.ini or environment variables)/Trilium instance.md
@@ -0,0 +1,19 @@
+# Trilium instance
+A Trilium instance represents a server. If Synchronization is set up, since multiple servers are involved (the one from the desktop client and the one the synchronisation is set up with), sometimes it can be useful to distinguish the instance you are running on.
+
+## Setting the instance name
+
+To set up a name for the instance, modify the `config.ini`:
+
+```
+[General]
+instanceName=Hello
+```
+
+## Distinguishing the instance on back-end
+
+Use `api.getInstanceName()` to obtain the instance name of the current server, as specified in the config file or in environment variables.
+
+## Limiting script runs based on instance
+
+For a script that is run periodically or on a certain event, it's possible to limit it to certain instances without having to change the code. Just add `runOnInstance` and set as the value the instance name where the script should run. To run on multiple named instances, simply add the label multiple times.
\ No newline at end of file
diff --git a/docs/User Guide/User Guide/Advanced Usage/Custom Request Handler.md b/docs/User Guide/User Guide/Advanced Usage/Custom Request Handler.md
index b848fdd8d..60306d76f 100644
--- a/docs/User Guide/User Guide/Advanced Usage/Custom Request Handler.md
+++ b/docs/User Guide/User Guide/Advanced Usage/Custom Request Handler.md
@@ -53,7 +53,7 @@ Trilium will then find our code note created above and execute it. `api.req`, `a
In the code note we check the request method and then use trivial authentication - keep in mind that these endpoints are by default totally unauthenticated, and you need to take care of this yourself.
-Once we pass these checks we will just create the desired note using [Script API](../Note%20Types/Code/Script%20API.md).
+Once we pass these checks we will just create the desired note using [Script API](../Scripting/Script%20API.md).
## Custom resource provider
diff --git a/docs/User Guide/User Guide/Advanced Usage/Default Note Title.md b/docs/User Guide/User Guide/Advanced Usage/Default Note Title.md
index fabf9fef8..1b4e575bf 100644
--- a/docs/User Guide/User Guide/Advanced Usage/Default Note Title.md
+++ b/docs/User Guide/User Guide/Advanced Usage/Default Note Title.md
@@ -17,14 +17,16 @@ And all children of "2022 Books" will be created with initial title "\[Author na
The value of `#titleTemplate` is evaluated at the point of note's creation as a JavaScript string, which means it can be enriched with the help of JS string interpolation with dynamic data.
-As an example, imagine you collect server outage incidents and write some notes. It looks like this:
+Second variable injected is `parentNote` which gives access to the parent [`FNote`](../Scripting/Script%20API/Frontend%20API/FNote.md).
-* Incidents
- * 2022-05-09: System crash
- * 2022-05-15: Backup delay
+See also Templates which provides similar capabilities, including default note's content.
-You can automatize the date assignment by assigning a label `#titleTemplate="${now.format('YYYY-MM-DD')}: "` to the parent note "Incidents". Whenever a new child note is created, the title template is evaluated with the injected [now](https://day.js.org/docs/en/display/format) object.
+### Examples
-Second variable injected is [parentNote](https://triliumnext.github.io/Notes/backend_api/BNote.html), an example could be `#titleTemplate="${parentNote.getLabelValue('authorName')}'s literary works"`.
-
-See also \[\[[template](Templates.md)\]\] which provides similar capabilities, including default note's content.
\ No newline at end of file
+* Imagine you collect server outage incidents and write some notes. It looks like this:
+ * Incidents
+ * 2022-05-09: System crash
+ * 2022-05-15: Backup delay
+ * You can automatize the date assignment by assigning a label `#titleTemplate="${now.format('YYYY-MM-DD')}: "` to the parent note "Incidents". Whenever a new child note is created, the title template is evaluated with the injected [now](https://day.js.org/docs/en/display/format) object.
+* To use a parent's attribute in the title of new notes: `#titleTemplate="${parentNote.getLabelValue('authorName')}'s literary works"`
+* To mirror the parent's note title: `${parentNote.title}`
\ No newline at end of file
diff --git a/docs/User Guide/User Guide/Advanced Usage/Sharing.md b/docs/User Guide/User Guide/Advanced Usage/Sharing.md
index e23c50ee4..17c8aa475 100644
--- a/docs/User Guide/User Guide/Advanced Usage/Sharing.md
+++ b/docs/User Guide/User Guide/Advanced Usage/Sharing.md
@@ -3,7 +3,7 @@ Trilium allows you to share selected notes as **publicly accessible** read-only
## Prerequisites
-To use the sharing feature, you must have a [server installation](../Installation%20%26%20Setup/Server%20Installation.md) of Trilium. This is necessary because the notes will be hosted from the server.
+To use the sharing feature, you must have a Server Installation of Trilium. This is necessary because the notes will be hosted from the server.
## How to Share a Note
@@ -40,7 +40,7 @@ To protect shared notes with a username and password, you can use the `#shareCre
The default shared page is basic in design, but you can customize it using your own CSS:
-* **Custom CSS**: Link a CSS [code note](../Note%20Types/Code.md) to the shared page by adding a `~shareCss` relation to the note. If you want this style to apply to the entire subtree, make the label inheritable. You can hide the CSS code note from the tree navigation by adding the `#shareHiddenFromTree` label.
+* **Custom CSS**: Link a CSS Code note to the shared page by adding a `~shareCss` relation to the note. If you want this style to apply to the entire subtree, make the label inheritable. You can hide the CSS code note from the tree navigation by adding the `#shareHiddenFromTree` label.
* **Omitting Default CSS**: For extensive styling changes, use the `#shareOmitDefaultCss` label to avoid conflicts with Trilium's [default stylesheet](../Basic%20Concepts%20and%20Features/Themes.md).
### Adding JavaScript
@@ -81,12 +81,6 @@ To customize the favicon for your shared pages, create a relation `~shareFavicon
You can designate a specific note or folder as the root of your shared content by adding the `#shareRoot` label. This note will be linked when visiting `[http://domain.tld/share](http://domain/share)`, making it easier to use Trilium as a fully-fledged website. Consider combining this with the `#shareIndex` label, which will display a list of all shared notes.
-## Additional Options
-
-* **Raw Note Sharing**: Use the `#shareRaw` label to share a note without any HTML wrapper.
-* **Disallow Robot Indexing**: Add the `#shareDisallowRobotIndexing` label to prevent search engines from indexing the shared page by including a `noindex, follow` meta tag and `X-Robots-Tag: noindex` header.
-* **Shared Notes Index**: For text notes with the `#shareIndex` label, the content will display a list of all shared note roots.
-
## Limitations
While the sharing feature is powerful, it has some limitations:
@@ -98,4 +92,8 @@ While the sharing feature is powerful, it has some limitations:
* **Protected Notes**: Cannot be shared.
* **Include Notes**: Not supported.
-Some of these limitations may be addressed in future updates.
\ No newline at end of file
+Some of these limitations may be addressed in future updates.
+
+## Attribute reference
+
+
Attribute
Description
shareHiddenFromTree
this note is hidden from left navigation tree, but still accessible with its URL
shareExternalLink
note will act as a link to an external website in the share tree
shareAlias
define an alias using which the note will be available under https://your_trilium_host/share/[your_alias]
shareOmitDefaultCss
default share page CSS will be omitted. Use when you make extensive styling changes.
shareRoot
marks note which is served on /share root.
shareDescription
define text to be added to the HTML meta tag for description
shareRaw
Note will be served in its raw format, without HTML wrapper. See also Serving directly the content of a note for an alternative method without setting an attribute.
shareDisallowRobotIndexing
Indicates to web crawlers that the page should not be indexed of this note by:
Setting the X-Robots-Tag: noindex HTTP header.
Setting the noindex, follow meta tag.
shareCredentials
require credentials to access this shared note. Value is expected to be in format username:password. Don't forget to make this inheritable to apply to child-notes/images.
shareIndex
Note with this label will list all roots of shared notes.
\ No newline at end of file
diff --git a/docs/User Guide/User Guide/Advanced Usage/Templates.md b/docs/User Guide/User Guide/Advanced Usage/Templates.md
index 3604af2db..bd174e0f3 100644
--- a/docs/User Guide/User Guide/Advanced Usage/Templates.md
+++ b/docs/User Guide/User Guide/Advanced Usage/Templates.md
@@ -23,7 +23,7 @@ To create an instance note through the UI:

-For the template to appear in the menu, the template note must have the `#template` label. Do not confuse this with the `~template` relation, which links the instance note to the template note. If you use [workspaces](../Basic%20Concepts%20and%20Features/Navigation/Workspace.md), you can also mark templates with `#workspaceTemplate` to display them only in the workspace.
+For the template to appear in the menu, the template note must have the `#template` label. Do not confuse this with the `~template` relation, which links the instance note to the template note. If you use [workspaces](../Basic%20Concepts%20and%20Features/Navigation/Workspaces.md), you can also mark templates with `#workspaceTemplate` to display them only in the workspace.
Templates can also be added or changed after note creation by creating a `~template` relation pointing to the desired template note.
diff --git a/docs/User Guide/User Guide/Basic Concepts and Features/Navigation/1_Workspace_image.png b/docs/User Guide/User Guide/Basic Concepts and Features/Navigation/1_Workspaces_image.png
similarity index 100%
rename from docs/User Guide/User Guide/Basic Concepts and Features/Navigation/1_Workspace_image.png
rename to docs/User Guide/User Guide/Basic Concepts and Features/Navigation/1_Workspaces_image.png
diff --git a/docs/User Guide/User Guide/Basic Concepts and Features/Navigation/Note Hoisting.md b/docs/User Guide/User Guide/Basic Concepts and Features/Navigation/Note Hoisting.md
index a2238fcd1..a6665943e 100644
--- a/docs/User Guide/User Guide/Basic Concepts and Features/Navigation/Note Hoisting.md
+++ b/docs/User Guide/User Guide/Basic Concepts and Features/Navigation/Note Hoisting.md
@@ -5,4 +5,4 @@ Hoisting is a standard outliner feature which allows you to focus on (or "zoom i
In addition to showing only this subtree, this also narrows both full text search and [“jump to note”](Note%20Navigation.md) to just notes present in hoisted subtree.
-See also [Workspace](Workspace.md) which extends this feature.
\ No newline at end of file
+See also [Workspace](Workspaces.md) which extends this feature.
\ No newline at end of file
diff --git a/docs/User Guide/User Guide/Basic Concepts and Features/Navigation/Workspace.md b/docs/User Guide/User Guide/Basic Concepts and Features/Navigation/Workspace.md
deleted file mode 100644
index 32c33349d..000000000
--- a/docs/User Guide/User Guide/Basic Concepts and Features/Navigation/Workspace.md
+++ /dev/null
@@ -1,24 +0,0 @@
-# Workspace
-Workspace is a concept built up on top of [note hoisting](Note%20Hoisting.md). It is based on the idea that a user has several distinct spheres of interest. An example might be "Personal" and "Work", these two spheres are quite distinct and don't interact together. When I focus on Work, I don't really care about personal notes.
-
-So far workspace consists of these features:
-
-* [note hoisting](Note%20Hoisting.md) - you can "zoom" into a workspace subtree to focus only on the relevant notes
-
-* easy entering of workspace:
-
- 
-
-* visual identification of workspace in tabs:
- 
-
-
-### How to use workspaces
-
-Let's say you have identified the workspaces and their subtrees. Define on the root of this subtree following labels:
-
-* `#workspace` - Marks this note as a workspace, button to enter the workspace is controlled by this
-* `#workspaceIconClass` - controls the box icon to be displayed in the tree and tabs, example `bx bx-home`. See [https://boxicons.com/](https://boxicons.com/)
-* `#workspaceTabBackgroundColor` - Background color of the tab, use any CSS color format, e.g. "lightblue" or "#ddd". See [https://www.w3schools.com/cssref/css\_colors.asp](https://www.w3schools.com/cssref/css_colors.asp).
-* `#workspaceCalendarRoot` - marking a note with this label will define a new per-workspace calendar. If there's no such note, the global calendar will be used.
-* `#workspaceTemplate` - This note will appear in the selection of available templates when creating a new note, but only when you are currently hoisted into a workspace containing this template.
\ No newline at end of file
diff --git a/docs/User Guide/User Guide/Basic Concepts and Features/Navigation/Workspaces.md b/docs/User Guide/User Guide/Basic Concepts and Features/Navigation/Workspaces.md
new file mode 100644
index 000000000..d00086c4c
--- /dev/null
+++ b/docs/User Guide/User Guide/Basic Concepts and Features/Navigation/Workspaces.md
@@ -0,0 +1,16 @@
+# Workspaces
+Workspace is a concept built up on top of [note hoisting](Note%20Hoisting.md). It is based on the idea that a user has several distinct spheres of interest. An example might be "Personal" and "Work", these two spheres are quite distinct and don't interact together. When I focus on Work, I don't really care about personal notes.
+
+So far workspace consists of these features:
+
+* [note hoisting](Note%20Hoisting.md) - you can "zoom" into a workspace subtree to focus only on the relevant notes
+* easy entering of workspace:
+
+ 
+
+* visual identification of workspace in tabs:
+ 
+
+### Configuration
+
+
Label
Description
workspace
Marks this note as a workspace, button to enter the workspace is controlled by this
workspaceIconClass
defines box icon CSS class which will be used in tab when hoisted to this note
Marking a note with this label will define a new per-workspace calendar for Day Notes. If there's no such note, the global calendar will be used.
workspaceTemplate
This note will appear in the selection of available template when creating new note, but only when hoisted into a workspace containing this template
workspaceSearchHome
new search notes will be created as children of this note when hoisted to some ancestor of this workspace note
workspaceInbox
default inbox location for new notes when hoisted to some ancestor of this workspace note
\ No newline at end of file
diff --git a/docs/User Guide/User Guide/Basic Concepts and Features/Navigation/Workspace_image.png b/docs/User Guide/User Guide/Basic Concepts and Features/Navigation/Workspaces_image.png
similarity index 100%
rename from docs/User Guide/User Guide/Basic Concepts and Features/Navigation/Workspace_image.png
rename to docs/User Guide/User Guide/Basic Concepts and Features/Navigation/Workspaces_image.png
diff --git a/docs/User Guide/User Guide/Basic Concepts and Features/Notes/Note List.md b/docs/User Guide/User Guide/Basic Concepts and Features/Notes/Note List.md
index 3d6981247..0c8273a8b 100644
--- a/docs/User Guide/User Guide/Basic Concepts and Features/Notes/Note List.md
+++ b/docs/User Guide/User Guide/Basic Concepts and Features/Notes/Note List.md
@@ -1,9 +1,10 @@
# Note List
When a note has one or more child notes, they will be listed at the end of the note for easy navigation.
-## Hide the note list for a given note
+## Configuration
-If the note list is not desireable for a particular note, simply apply the `hideChildrenOverview` [label](../../Advanced%20Usage/Attributes.md).
+* To hide the note list for a particular note, simply apply the `hideChildrenOverview` [label](../../Advanced%20Usage/Attributes.md).
+* For some view types, such as Grid view, only a subset of notes will be displayed and pagination can be used to navigate through all of them for performance reasons. To adjust the number of notes per page, set `pageSize` to the desired number.
## View types
diff --git a/docs/User Guide/User Guide/Basic Concepts and Features/UI Elements/Launch Bar.md b/docs/User Guide/User Guide/Basic Concepts and Features/UI Elements/Launch Bar.md
index d3dfd49f8..33fb8a0ed 100644
--- a/docs/User Guide/User Guide/Basic Concepts and Features/UI Elements/Launch Bar.md
+++ b/docs/User Guide/User Guide/Basic Concepts and Features/UI Elements/Launch Bar.md
@@ -56,7 +56,7 @@ Right click either the _Available launchers_ or _Visible launchers_ sections and
2. Optionally, set a `keyboardShortcut` to trigger the launcher.
3. **Custom Widget**
- Allows defining a custom widget to be rendered inside the launcher. See [Widget Basics](../../Scripting/Widget%20Basics.md) for more information.
+ Allows defining a custom widget to be rendered inside the launcher. See [Widget Basics](../../Scripting/Custom%20Widgets/Widget%20Basics.md) for more information.
4. **Spacers**
Launchers that create some distance between other launchers for better visual distinction.
diff --git a/docs/User Guide/User Guide/Basic Concepts and Features/UI Elements/Ribbon.md b/docs/User Guide/User Guide/Basic Concepts and Features/UI Elements/Ribbon.md
index 73ff35d1e..b53135131 100644
--- a/docs/User Guide/User Guide/Basic Concepts and Features/UI Elements/Ribbon.md
+++ b/docs/User Guide/User Guide/Basic Concepts and Features/UI Elements/Ribbon.md
@@ -61,4 +61,6 @@ This section displays information about the current note:
### Edited notes
-This section pops automatically when entering a [day note](../../Advanced%20Usage/Advanced%20Showcases/Day%20Notes.md) and shows the notes that were edited that day.
\ No newline at end of file
+This section pops automatically when entering a [day note](../../Advanced%20Usage/Advanced%20Showcases/Day%20Notes.md) and shows the notes that were edited that day.
+
+It is possible to disable this behavior from settings, by going to Appearance settings and looking for the _Ribbon widgets_ section.
\ No newline at end of file
diff --git a/docs/User Guide/User Guide/Note Types/Code/Events.md b/docs/User Guide/User Guide/Note Types/Code/Events.md
deleted file mode 100644
index ca3336889..000000000
--- a/docs/User Guide/User Guide/Note Types/Code/Events.md
+++ /dev/null
@@ -1,29 +0,0 @@
-# Events
-[Script](../../Scripting.md) notes can be triggered by events. Note that these are backend events and thus relation need to point to the "JS backend" code note.
-
-## Global events
-
-Global events are attached to the script note via label. Simply create e.g. "run" label with some of these values and script note will be executed once the event occurs.
-
-* `run`
- * `frontendStartup` - executes on frontend upon startup
- * `mobileStartup` - executes on mobile frontend upon startup
- * `backendStartup` - executes on backend upon startup
- * `hourly` - executes once an hour on backend
- * `daily` - executes once a day on backend
-
-## Entity events
-
-Other events are bound to some entity, these are defined as [relations](../../Advanced%20Usage/Attributes.md) - meaning that script is triggered only if note has this script attached to it through relations (or it can inherit it).
-
-* `runOnNoteCreation` - executes when note is created on backend
-* `runOnNoteTitleChange` - executes when note title is changed (includes note creation as well)
-* `runOnNoteContentChange` - executes when note content is changed (includes note creation as well).
-* `runOnNoteChange` - executes when note is changed (includes note creation as well)
-* `runOnNoteDeletion` - executes when note is being deleted
-* `runOnBranchCreation` - executes when a branch is created. Branch is a link between parent note and child note and is created e.g. when cloning or moving note.
-* `runOnBranchChange` (since v0.62) - executes when a branch is changed - either expanded status or prefix are changed.
-* `runOnBranchDeletion` - executes when a branch is delete. Branch is a link between parent note and child note and is deleted e.g. when moving note (old branch/link is deleted).
-* `runOnChildNoteCreation` - executes when new note is created under _this_ note
-* `runOnAttributeCreation` - executes when new attribute is created under _this_ note
-* `runOnAttributeChange` - executes when attribute is changed under _this_ note
\ No newline at end of file
diff --git a/docs/User Guide/User Guide/Note Types/Saved Search.md b/docs/User Guide/User Guide/Note Types/Saved Search.md
index 80719b210..c2664085f 100644
--- a/docs/User Guide/User Guide/Note Types/Saved Search.md
+++ b/docs/User Guide/User Guide/Note Types/Saved Search.md
@@ -5,4 +5,4 @@ Trilium allows you to save common searches as notes within the note tree. The se
## Location
-By default, saved searches are stored in the day note. However, you can designate a different note to store saved searches by marking it with the `#searchHome` label. Additionally, for [workspaces](../Basic%20Concepts%20and%20Features/Navigation/Workspace.md), you can use the `#workspaceSearchHome` label to specify a storage location for saved searches within that workspace.
\ No newline at end of file
+By default, saved searches are stored in the day note. However, you can designate a different note to store saved searches by marking it with the `#searchHome` label. Additionally, for [workspaces](../Basic%20Concepts%20and%20Features/Navigation/Workspaces.md), you can use the `#workspaceSearchHome` label to specify a storage location for saved searches within that workspace.
\ No newline at end of file
diff --git a/docs/User Guide/User Guide/Scripting.md b/docs/User Guide/User Guide/Scripting.md
index 09b451e49..bdc76d4a0 100644
--- a/docs/User Guide/User Guide/Scripting.md
+++ b/docs/User Guide/User Guide/Scripting.md
@@ -1,5 +1,5 @@
# Scripting
-Trilium supports creating Code notes, i.e. notes which allow you to store some programming code and highlight it. Special case is JavaScript code notes which can also be executed inside Trilium which can in conjunction with Script API provide extra functionality.
+Trilium supports creating Code notes, i.e. notes which allow you to store some programming code and highlight it. Special case is JavaScript code notes which can also be executed inside Trilium which can in conjunction with Script API provide extra functionality.
## Scripting
@@ -34,8 +34,8 @@ You can see more scripting with explanation in Events.
+See Events.
## Script API
-See Script API.
\ No newline at end of file
+See Script API.
\ No newline at end of file
diff --git a/docs/User Guide/User Guide/Note Types/Code/Custom Widgets.md b/docs/User Guide/User Guide/Scripting/Custom Widgets.md
similarity index 100%
rename from docs/User Guide/User Guide/Note Types/Code/Custom Widgets.md
rename to docs/User Guide/User Guide/Scripting/Custom Widgets.md
diff --git a/docs/User Guide/User Guide/Scripting/Widget Basics.md b/docs/User Guide/User Guide/Scripting/Custom Widgets/Widget Basics.md
similarity index 91%
rename from docs/User Guide/User Guide/Scripting/Widget Basics.md
rename to docs/User Guide/User Guide/Scripting/Custom Widgets/Widget Basics.md
index d457ad6ac..ffc5df52a 100644
--- a/docs/User Guide/User Guide/Scripting/Widget Basics.md
+++ b/docs/User Guide/User Guide/Scripting/Custom Widgets/Widget Basics.md
@@ -22,10 +22,10 @@ module.exports = new MyWidget();
To implement this widget:
1. Create a new `JS Frontend` note in Trilium and paste in the code above.
-2. Assign the `#widget` [attribute](../Advanced%20Usage/Attributes.md) to the [note](../Basic%20Concepts%20and%20Features/Notes.md).
+2. Assign the `#widget` [attribute](../../Advanced%20Usage/Attributes.md) to the [note](../../Basic%20Concepts%20and%20Features/Notes.md).
3. Restart Trilium or reload the window.
-To verify that the widget is working, open the developer tools (`Cmd` + `Shift` + `I`) and run `document.querySelector("#my-widget")`. If the element is found, the widget is functioning correctly. If `undefined` is returned, double-check that the [note](../Basic%20Concepts%20and%20Features/Notes.md) has the `#widget` [attribute](../Advanced%20Usage/Attributes.md).
+To verify that the widget is working, open the developer tools (`Cmd` + `Shift` + `I`) and run `document.querySelector("#my-widget")`. If the element is found, the widget is functioning correctly. If `undefined` is returned, double-check that the [note](../../Basic%20Concepts%20and%20Features/Notes.md) has the `#widget` [attribute](../../Advanced%20Usage/Attributes.md).
### Step 2: Adding an UI Element
@@ -85,7 +85,7 @@ After reloading Trilium, the button should now appear at the bottom left of the
### Step 4: Adding User Interaction
-Let’s make the button interactive by showing a message when it’s clicked. We'll use the `api.showMessage` method from the [Script API](../Note%20Types/Code/Script%20API.md).
+Let’s make the button interactive by showing a message when it’s clicked. We'll use the `api.showMessage` method from the [Script API](../Script%20API.md).
```
class MyWidget extends api.BasicWidget {
diff --git a/docs/User Guide/User Guide/Note Types/Code/Custom Widgets/Word count widget.md b/docs/User Guide/User Guide/Scripting/Custom Widgets/Word count widget.md
similarity index 88%
rename from docs/User Guide/User Guide/Note Types/Code/Custom Widgets/Word count widget.md
rename to docs/User Guide/User Guide/Scripting/Custom Widgets/Word count widget.md
index 2110032fa..d39b328ea 100644
--- a/docs/User Guide/User Guide/Note Types/Code/Custom Widgets/Word count widget.md
+++ b/docs/User Guide/User Guide/Scripting/Custom Widgets/Word count widget.md
@@ -1,8 +1,8 @@
# Word count widget
> [!TIP]
-> This widget is also present in new installations in the Demo Notes.
+> This widget is also present in new installations in the Demo Notes.
-Create a Code note of type JS frontend and **give it a** `#widget` **label**.
+Create a Code note of type JS frontend and **give it a** `#widget` **label**.
```
/*
@@ -82,7 +82,7 @@ class WordCountWidget extends api.NoteContextAwareWidget {
module.exports = new WordCountWidget();
```
-After you make changes it is necessary to [restart Trilium](../../../Troubleshooting/Refreshing%20the%20application.md) so that the layout can be rebuilt.
+After you make changes it is necessary to [restart Trilium](../../Troubleshooting/Refreshing%20the%20application.md) so that the layout can be rebuilt.
At the bottom of the note you can see the resulting widget:
diff --git a/docs/User Guide/User Guide/Note Types/Code/Custom Widgets/Word count widget_image.png b/docs/User Guide/User Guide/Scripting/Custom Widgets/Word count widget_image.png
similarity index 100%
rename from docs/User Guide/User Guide/Note Types/Code/Custom Widgets/Word count widget_image.png
rename to docs/User Guide/User Guide/Scripting/Custom Widgets/Word count widget_image.png
diff --git a/docs/User Guide/User Guide/Scripting/Events.md b/docs/User Guide/User Guide/Scripting/Events.md
new file mode 100644
index 000000000..242d1790f
--- /dev/null
+++ b/docs/User Guide/User Guide/Scripting/Events.md
@@ -0,0 +1,14 @@
+# Events
+[Script](../Scripting.md) notes can be triggered by events. Note that these are backend events and thus relation need to point to the "JS backend" code note.
+
+## Global events
+
+Global events are attached to the script note via label. Simply create e.g. "run" label with some of these values and script note will be executed once the event occurs.
+
+
Label
Description
run
Defines on which events script should run. Possible values are:
frontendStartup - when Trilium frontend starts up (or is refreshed), but not on mobile.
mobileStartup - when Trilium frontend starts up (or is refreshed), on mobile.
backendStartup - when Trilium backend starts up
hourly - run once an hour. You can use additional label runAtHour to specify at which hour, on the back-end.
daily - run once a day, on the back-end
runOnInstance
Specifies that the script should only run on a particular Trilium instance.
runAtHour
On which hour should this run. Should be used together with #run=hourly. Can be defined multiple times for more runs during the day.
+
+## Entity events
+
+Other events are bound to some entity, these are defined as [relations](../Advanced%20Usage/Attributes.md) - meaning that script is triggered only if note has this script attached to it through relations (or it can inherit it).
+
+
Relation
Description
runOnNoteCreation
executes when note is created on backend. Use this relation if you want to run the script for all notes created under a specific subtree. In that case, create it on the subtree root note and make it inheritable. A new note created within the subtree (any depth) will trigger the script.
runOnChildNoteCreation
executes when new note is created under the note where this relation is defined
runOnNoteTitleChange
executes when note title is changed (includes note creation as well)
runOnNoteContentChange
executes when note content is changed (includes note creation as well).
runOnNoteChange
executes when note is changed (includes note creation as well). Does not include content changes
runOnNoteDeletion
executes when note is being deleted
runOnBranchCreation
executes when a branch is created. Branch is a link between parent note and child note and is created e.g. when cloning or moving note.
runOnBranchChange
executes when a branch is updated. (since v0.62)
runOnBranchDeletion
executes when a branch is deleted. Branch is a link between parent note and child note and is deleted e.g. when moving note (old branch/link is deleted).
runOnAttributeCreation
executes when new attribute is created for the note which defines this relation
runOnAttributeChange
executes when the attribute is changed of a note which defines this relation. This is triggered also when the attribute is deleted
Task template defines several promoted attributes -
todoDate, doneDate, tags, location. Importantly it also defines ~runOnAttributeChange relation
- - event handler which is
- run on attribute change. This script handles
+ - event handler which is run on
+ attribute change. This script handles
when e.g. we fill out the doneDate attribute - meaning the task is done
and should be moved to "Done" note and removed from TODO, locations and
tags.
By adding weight as a promoted attribute in
the template from which day notes are
diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Attributes.html b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Attributes.html
index 77e8d336b..9f715ddee 100644
--- a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Attributes.html
+++ b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Attributes.html
@@ -37,9 +37,8 @@
Labels are also searchable, enhancing note retrieval.
Common Labels for Advanced Configuration
-
-
-
+
See the corresponding section in Attribute Reference for
+ a comprehensive list of attributes.
Relations
Relations define connections between notes, similar to links.
Uses
@@ -50,12 +49,8 @@
related to the note
Common Relations
-
-
Event-based Relations: Such as runOnNoteCreation or runOnNoteChange,
- which trigger scripts on specific actions
-
Other Relations: Include template, renderNote, widget,
- and sharing-related relations
-
+
See the corresponding section in Attribute Reference for
+ a comprehensive list of relations.
Multiplicity
Attributes in Trilium can be "multivalued", meaning multiple attributes
with the same name can coexist.
Disables automatic creation of Note Revisions.
- Useful for e.g. large, but unimportant notes - e.g. large JS libraries
- used for scripting.
+
Disables automatic creation of Note Revisions for
+ a particular note. Useful for e.g. large, but unimportant notes - e.g.
+ large JS libraries used for scripting.
+
+
+
versioningLimit
+
+
Limits the maximum number of Note Revisions for
+ a particular note, overriding the global settings.
calendarRoot
@@ -50,35 +61,12 @@
excludeFromExport
-
Notes (with their sub-tree) won't be included when exporting.
+
Excludes this note and its children when exporting.
-
run
+
run, runOnInstance, runAtHour
-
-
Defines on which events script should run. Possible values are:
-
-
frontendStartup - when Trilium frontend starts up (or is refreshed),
- but not on mobile.
-
mobileStartup - when Trilium frontend starts up (or is refreshed),
- on mobile.
-
backendStartup - when Trilium backend starts up
-
hourly - run once an hour. You can use additional label runAtHour to
- specify at which hour.
-
daily - run once a day
-
-
-
-
-
runOnInstance
-
-
Define which trilium instance should run this on. Default to all instances.
-
-
-
runAtHour
-
-
On which hour should this run. Should be used together with #run=hourly.
- Can be defined multiple times for more runs during the day.
+ this note. Generally useful when defining inherited attributes, but the
+ parent note doesn't need them.
readOnly
@@ -133,21 +122,23 @@
autoReadOnlyDisabled
-
text/code notes can be set automatically into read mode when they are
- too large. You can disable this behavior on per-note basis by adding this
- label to the note
marks CSS notes which are loaded into the Trilium application and can
- thus be used to modify Trilium's looks.
+
Marks CSS notes which are loaded into the Trilium application and can
+ thus be used to modify Trilium's looks. See Custom app-wide CSS for
+ more info.
appTheme
-
marks CSS notes which are full Trilium themes and are thus available in
- Trilium options.
+
Marks CSS notes which are full Trilium themes and are thus available in
+ Trilium options. See Theme development for
+ more information.
appThemeBase
@@ -161,9 +152,9 @@
cssClass
-
value of this label is then added as CSS class to the node representing
- given note in the tree. This can be useful for advanced theming. Can be
- used in template notes.
+
Value of this label is then added as CSS class to the node representing
+ given note in the Note Tree.
+ This can be useful for advanced theming. Can be used in template notes.
iconClass
@@ -175,7 +166,8 @@
pageSize
-
number of items per page in note listing
+
Specifies the number of items per page in Note List.
customRequestHandler
@@ -190,47 +182,20 @@
widget
-
marks this note as a custom widget which will be added to the Trilium
- component tree. See Custom Widgets for
+
Marks this note as a custom widget which will be added to the Trilium
+ component tree. See Custom Widgets for
more information.
-
-
workspace
-
-
marks this note as a workspace which allows easy hoisting
-
-
-
workspaceIconClass
-
-
defines box icon CSS class which will be used in tab when hoisted to this
- note
-
-
-
workspaceTabBackgroundColor
-
-
CSS color used in the note tab when hoisted to this note
-
-
-
workspaceCalendarRoot
-
-
Defines per-workspace calendar root
-
-
-
workspaceTemplate
-
-
This note will appear in the selection of available template when creating
- new note, but only when hoisted into a workspace containing this template
-
searchHome
-
new search notes will be created as children of this note
+
New search notes will be created as children of this note (see
+ Saved Search).
-
workspaceSearchHome
-
-
new search notes will be created as children of this note when hoisted
- to some ancestor of this workspace note
note will act as a link to an external website in the share tree
-
-
-
shareAlias
-
-
define an alias using which the note will be available under https://your_trilium_host/share/[your_alias]
-
-
-
-
shareOmitDefaultCss
-
-
default share page CSS will be omitted. Use when you make extensive styling
- changes.
-
-
-
shareRoot
-
-
marks note which is served on /share root.
-
-
-
shareDescription
-
-
define text to be added to the HTML meta tag for description
-
-
-
shareRaw
-
-
note will be served in its raw format, without HTML wrapper
-
-
-
shareDisallowRobotIndexing
-
-
will forbid robot indexing of this note by setting the X-Robots-Tag: noindex HTTP
- header.
-
-
-
shareCredentials
-
-
require credentials to access this shared note. Value is expected to be
- in format username:password. Don't forget to make this inheritable
- to apply to child-notes/images.
-
-
-
shareIndex
-
-
note with this label will list all roots of shared notes
-
-
-
displayRelations
-
-
comma delimited names of relations which should be displayed. All other
- ones will be hidden.
-
-
-
hideRelations
-
-
comma delimited names of relations which should be hidden. All other ones
- will be displayed.
+
Comma delimited names of relations which should be displayed/hidden in
+ a Relation Map (both
+ the note type and the Note Map (Link map, Tree map) general
+ functionality).
titleTemplate
@@ -337,15 +247,18 @@
Log for ${now.format('YYYY-MM-DD HH:mm:ss')}
-
${parentNote.title} to mirror the parent's template.
Sets the view of child notes (e.g. grid or list). See Note List for
+ more information.
+
Relations
+
@@ -429,69 +372,10 @@
-
runOnNoteCreation
+
runOn*
-
executes when note is created on backend. Use this relation if you want
- to run the script for all notes created under a specific subtree. In that
- case, create it on the subtree root note and make it inheritable. A new
- note created within the subtree (any depth) will trigger the script.
executes when new note is created under the note where this relation is
- defined
-
-
-
runOnNoteTitleChange
-
-
executes when note title is changed (includes note creation as well)
-
-
-
runOnNoteContentChange
-
-
executes when note content is changed (includes note creation as well).
-
-
-
runOnNoteChange
-
-
executes when note is changed (includes note creation as well). Does not
- include content changes
-
-
-
runOnNoteDeletion
-
-
executes when note is being deleted
-
-
-
runOnBranchCreation
-
-
executes when a branch is created. Branch is a link between parent note
- and child note and is created e.g. when cloning or moving note.
-
-
-
runOnBranchChange
-
-
executes when a branch is updated.
-
-
-
runOnBranchDeletion
-
-
executes when a branch is deleted. Branch is a link between parent note
- and child note and is deleted e.g. when moving note (old branch/link is
- deleted).
-
-
-
runOnAttributeCreation
-
-
executes when new attribute is created for the note which defines this
- relation
-
-
-
runOnAttributeChange
-
-
executes when the attribute is changed of a note which defines this relation.
- This is triggered also when the attribute is deleted
template
@@ -550,73 +434,6 @@
-
-
-
disableVersioning: Disables automatic versioning, ideal for
- large, unimportant notes like script libraries
-
versioningLimit: Used to limit the number of revisions for
- a single note
-
calendarRoot: Marks the note as the root for Day Notes. Only one
- note should carry this label.
-
excludeFromExport: Excludes notes and their subtrees from
- export operations
-
run: Specifies events to trigger scripts (e.g., frontendStartup, hourly)
-
runAtHour: Defines specific hours for scripts to run, used
- with #run=hourly
-
-
disableInclusion: Prevents a script from being included in
- parent script executions
-
sorted: Automatically sorts child notes alphabetically by
- title
-
top: Keeps the note at the top of its parent's list, useful
- with sorted
-
-
hidePromotedAttributes: Hides certain attributes in the note's
- display
-
readOnly: Sets the note to read-only mode, applicable to
- text and code notes
-
autoReadOnlyDisabled: Disables automatic read-only mode for
- large notes
-
appCss: Marks CSS notes used to modify Trilium’s appearance
-
appTheme: Marks full CSS themes available in Trilium's options
-
cssClass: Adds a CSS class to the note's representation in
- the tree
-
iconClass: Adds a CSS class to the note's icon, useful for
- distinguishing notes visually. See Note Icons.
-
pageSize: Specifies the number of items per page in note
- listings
toc: Controls the visibility of the table of contents
-
color: Defines the color of the note in the tree and links
-
hideChildrenOverview: Hides child notes in the parent note's
- editor
-
viewType: Sets the view of child notes (grid or list)
-
-
Relations
+
+
Trilium instance
+
+
+
A Trilium instance represents a server. If Synchronization is
+ set up, since multiple servers are involved (the one from the desktop client
+ and the one the synchronisation is set up with), sometimes it can be useful
+ to distinguish the instance you are running on.
+
Setting the instance name
+
To set up a name for the instance, modify the config.ini:
[General]
+instanceName=Hello
+
Distinguishing the instance on back-end
+
Use api.getInstanceName() to obtain the instance name of the
+ current server, as specified in the config file or in environment variables.
+
Limiting script runs based on instance
+
For a script that is run periodically or on a certain event, it's possible
+ to limit it to certain instances without having to change the code. Just
+ add runOnInstance and set as the value the instance name where
+ the script should run. To run on multiple named instances, simply add the
+ label multiple times.
+
+
+
diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Configuration (config.ini or environment variables)/Trilium instance.html b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Configuration (config.ini or environment variables)/Trilium instance.html
new file mode 100644
index 000000000..6e447278e
--- /dev/null
+++ b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Configuration (config.ini or environment variables)/Trilium instance.html
@@ -0,0 +1,37 @@
+
+
+