diff --git a/Wiki/images/template-create-instance-note.png b/Wiki/images/template-create-instance-note.png new file mode 100644 index 0000000..b89f28a Binary files /dev/null and b/Wiki/images/template-create-instance-note.png differ diff --git a/Wiki/images/text-notes-formatting-block.png b/Wiki/images/text-notes-formatting-block.png new file mode 100644 index 0000000..5414b9b Binary files /dev/null and b/Wiki/images/text-notes-formatting-block.png differ diff --git a/Wiki/images/text-notes-formatting-inline.png b/Wiki/images/text-notes-formatting-inline.png new file mode 100644 index 0000000..5d18495 Binary files /dev/null and b/Wiki/images/text-notes-formatting-inline.png differ diff --git a/Wiki/read-only-note.md b/Wiki/read-only-note.md index 317c62b..ed000f9 100644 --- a/Wiki/read-only-note.md +++ b/Wiki/read-only-note.md @@ -1,14 +1,13 @@ -# Read only note -[Text](text-notes.md) or [code](code-notes.md) can be set to be read-only. In such case only read view is presented to the user with the option of editing the note if needed. +# Read-Only Notes -Setting read only view with label ---------------------------------- +Both [text](text-notes.md) and [code](code-notes.md) notes 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 to editing mode if needed. -You can set the note as read only by adding [label](attributes.md) `readOnly`. +## Setting Read-Only Mode with a Label -Auto read only --------------- +To set a note as read-only, add the `readOnly` [label](attributes.md) to the note. -If the note is too large then Trilium will automatically set the note as readOnly as an optimization - displaying such long notes can take a long time in editing mode and this might unnecessarily slow down operation even if editing is not necessary. +## Automatic Read-Only Mode -If you want to keep specific note automatically editable, you can add [label](attributes.md) `autoReadOnlyDisabled`. +For optimization purposes, Trilium will automatically set very large notes to read-only. Displaying such lengthy notes in editing mode can slow down performance, especially when editing is unnecessary. + +If you want to ensure that a specific note remains editable regardless of its size, you can add the `autoReadOnlyDisabled` [label](attributes.md) to the note. diff --git a/Wiki/saved-search.md b/Wiki/saved-search.md index a8e05d7..dd3e161 100644 --- a/Wiki/saved-search.md +++ b/Wiki/saved-search.md @@ -1,9 +1,9 @@ -# Saved-search -Trilium provides a way to save common search as a note in the note tree. Search results will then appear as sub-notes of this "saved search" note. You can see how this works in action: +# Saved Searches -![save-search](images/Saved-search%20image.gif) +Trilium allows you to save common searches as notes within the note tree. The search results will appear as sub-notes under these "saved search" notes. Here is an example of how it works: -Location --------- +![save-search](images/saved-search-image.gif) -Saved search is by default stored in the day note. You can also mark some note with `#searchHome` label, all saved searches will be then saved there. There's also `#workspaceSearchHome` variant for \[\[workspaces|workspace\]\]. +## 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](workspace.md), you can use the `#workspaceSearchHome` label to specify a storage location for saved searches within that workspace. diff --git a/Wiki/search.md b/Wiki/search.md index 1a200e6..1ec32d1 100644 --- a/Wiki/search.md +++ b/Wiki/search.md @@ -1,192 +1,138 @@ -# Search -* local search - searches within currently displayed note. Press `CTRL-F` to open the search dialog. In server version this is handled by the browser, in desktop (electron) version there's a separate dialog. -* note search - you can find notes by search for text in the title, note's content or note's [attributes](attributes.md). You can also [save search](saved-search.md). - * You can activate note search by clicking on magnifier icon on the left or pressing `CTRL-S` keyboard [shortcut](keyboard-shortcuts.md). +# Search Functionality -Simple note search examples ---------------------------- +## Local Search -`rings tolkien` - fulltext search, this will try to find notes which have anywhere words "rings" and "tolkien" +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. -`"The Lord of the Rings" Tolkien` - same as above, but "The Lord of the Rings" must be exact match +## Note Search -`note.content *=* rings OR note.content *=* tolkien` to find notes which contain "rings" or "tolkien" +Note search enables you to find notes by searching for text in the title, content, or [attributes](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. -`towers #book` - combination of fulltext search with attribute search - this looks for notes containing "towers" word anywhere, and they also need to have "book" label +To search for notes, click on the magnifying glass icon on the toolbar or press the `CTRL-S` keyboard [shortcut](keyboard-shortcuts.md). -`towers #book or #author` - searches notes containing "towers" word anywhere and matching note must have either "book" or "author" label +### Simple Note Search Examples -`towers #!book` - searches notes containing "towers" word anywhere and which do **not** have "book" label +- `rings tolkien`: Full-text search to find notes containing both "rings" and "tolkien". +- `"The Lord of the Rings" Tolkien`: Full-text search where "The Lord of the Rings" must match exactly. +- `note.content *=* rings OR note.content *=* tolkien`: Find notes containing "rings" or "tolkien" in their content. +- `towers #book`: Combine full-text and attribute search to find notes containing "towers" and having the "book" label. +- `towers #book or #author`: Search for notes containing "towers" and having either the "book" or "author" label. +- `towers #!book`: Search for notes containing "towers" and not having the "book" label. +- `#book #publicationYear = 1954`: Find notes with the "book" label and "publicationYear" set to 1954. +- `#genre *=* fan`: Find notes with the "genre" label containing the substring "fan". Additional operators include `*=*` for "contains", `=*` for "starts with", `*=` for "ends with", and `!=` for "is not equal to". +- `#book #publicationYear >= 1950 #publicationYear < 1960`: Use numeric operators to find all books published in the 1950s. +- `#dateNote >= TODAY-30`: A "smart search" to find notes with the "dateNote" label within the last 30 days. Supported smart values include NOW +- seconds, TODAY +- days, MONTH +- months, YEAR +- years. +- `~author.title *=* Tolkien`: Find notes related to an author whose title contains "Tolkien". +- `#publicationYear %= '19[0-9]{2}'`: Use the '%=' operator to match a regular expression (regex). This feature has been available since Trilium 0.52. -`#book #publicationYear = 1954` - will find notes with "book" label and label "publicationYear" containing this specific value +### Advanced Use Cases -`#genre *=* fan` - matches notes with "genre" label which has value which contains "fan" substring. Besides `*=*` for "contains", there's also `=*` for "starts with", `*=` for "ends with", `!=` for "is not equal to" +- `~author.relations.son.title = 'Christopher Tolkien'`: Search for notes with an "author" relation to a note that has a "son" relation to "Christopher Tolkien". This can be modeled with the following note structure: + - Books + - Lord of the Rings + - label: “book” + - relation: “author” points to “J. R. R. Tolkien” note + - People + - J. R. R. Tolkien + - relation: “son” points to "Christopher Tolkien" note + - Christopher Tolkien +- `~author.title *= Tolkien OR (#publicationDate >= 1954 AND #publicationDate <= 1960)`: Use boolean expressions and parentheses to group expressions. Note that expressions starting with a parenthesis need an "expression separator sign" (# or ~) prepended. +- `note.parents.title = 'Books'`: Find notes with a parent named "Books". +- `note.parents.parents.title = 'Books'`: Find notes with a grandparent named "Books". +- `note.ancestors.title = 'Books'`: Find notes with an ancestor named "Books". +- `note.children.title = 'sub-note'`: Find notes with a child named "sub-note". -`#book #publicationYear >= 1950 #publicationYear < 1960` - you can also use numeric operators - this will find all books published in the 1950s +### Search with Note Properties -`#dateNote >= TODAY-30` - special "smart search" will find notes with label "dateNote" with date corresponding to last 30 days. Complete list of smart values: NOW +- seconds, TODAY +- days, MONTH +- months, YEAR +- years +Notes have properties that can be used in searches, such as `noteId`, `dateModified`, `dateCreated`, `isProtected`, `type`, `title`, `text`, `content`, `rawContent`, `ownedLabelCount`, `labelCount`, `ownedRelationCount`, `relationCount`, `ownedRelationCountIncludingLinks`, `relationCountIncludingLinks`, `ownedAttributeCount`, `attributeCount`, `targetRelationCount`, `targetRelationCountIncludingLinks`, `parentCount`, `childrenCount`, `isArchived`, `contentSize`, `noteSize`, and `revisionCount`. -`~author.title *=* Tolkien` - find notes which have relation "author" which points to a note with title containing word "Tolkien" +These properties can be accessed via the `note.` prefix, e.g., `note.type = code AND note.mime = 'application/json'`. -`#publicationYear %= '19[0-9]{2}'` - operator '%=' matches a regular expression (regex). Since Trilium 0.52 +### Order by and Limit -Advanced use cases ------------------- - -`~author.relations.son.title = 'Christopher Tolkien'` - This will search for notes which have “author” relation to a note which has a “son” relation to “Christopher Tolkien” note. This situation can be modeled by this note structure: - -* Books - * Lord of the Rings - * label: “book” - * relation: “author” points to “J. R. R. Tolkien” note -* People - * J. R. R. Tolkien - * relation “son” points to "Christopher Tolkien" note - * Christopher Tolkien - -`~author.title *= Tolkien OR (#publicationDate >= 1954 AND #publicationDate <= 1960)` - you can also use boolean expressions and parenthesis to group expressions - -However, if your search expression starts with a parenthesis, it needs to be prepended by an "expression separator sign", either # or ~. So the equivalent expression, just reordered, would look like: - -`# (#publicationDate >= 1954 AND #publicationDate <= 1960) OR ~author.title *= Tolkien` - -`note.parents.title = 'Books'` will find all notes which have (at least one) parent note with name “Book”. - -`note.parents.parents.title = 'Books'` This again works transitively, so this will find notes whose parent of parent is named ‘Book’. - -`note.ancestors.title = 'Books'` This is sort of extension of parents - this will find notes which have an ancestor anywhere in their note path (so parent, grandparent, grand-grand-parent …) with title ‘Book’. This is a nice way how to reduce the scope of the search to a particular subtree. - -`note.children.title = 'sub-note'` So this works in the other direction and will find notes which have (at least one) child called “sub-note”. - -### Search with note properties - -Note has certain properties which can be also used for searching: - -* `noteId` -* `dateModified` - local dates are in the format "2019-05-19 16:39:47.003+0200" -* `dateCreated` -* `utcDateModified` - UTC dates are in the format "2019-05-19 14:39:47.003Z" -* `utcDateCreated` -* `isProtected` (true, false) -* `type` (text, code, search, relation-map, book) -* `title` (when you want to search specifically the title) -* `text` - search through note title and content -* `content` - search just through note content -* `rawContent` - search through raw note content (HTML tags are kept). Since v0.46. -* `ownedLabelCount` -* `labelCount` (includes inherited labels) -* `ownedRelationCount` -* `relationCount` (includes inherited relations) -* `ownedRelationCountIncludingLinks` and `relationCountIncludingLinks` - count also includes auto-generated relations `imageLink`, `internalLink`, `relationMapLink` and `includeNoteLink` -* `ownedAttributeCount` = `ownedLabelCount` + `ownedRelationCount` -* `attributeCount` = `labelCount` + `relationCount` -* `targetRelationCount` - number of relations targeting this note -* `targetRelationCountIncludingLinks` - count also includes auto-generated relations `imageLink`, `internalLink`, `relationMapLink` and `includeNoteLink` -* `parentCount` - essentially number of [clones](cloning-notes.md) -* `childrenCount` -* `isArchived` (true, false) -* `contentSize` - size of note content in bytes. -* `noteSize` - estimated size of complete note (chiefly note content + note revision contents). Since v0.46. -* `revisionCount` - number of note revisions. - -These are accessed through `note.`, e.g.: - -```text-plain -note.type = code AND note.mime = 'application/json' -``` - -### Order by and limit - -```text-plain +```sql #author=Tolkien orderBy #publicationDate desc, note.title limit 10 ``` -The example above will do the following things (in this sequence): +This example will: -1. find notes with label author having value “Tolkien” -2. order the results by publicationDate in descending order (so the newest first) -3. in case publication date is equal, use note.title as secondary ordering in ascending order (`asc` is the default and thus can be omitted) -4. take only the first 10 results +1. Find notes with the author label "Tolkien". +2. Order the results by `publicationDate` in descending order. +3. Use `note.title` as a secondary ordering if publication dates are equal. +4. Limit the results to the first 10 notes. ### Negation -Some queries can be expressed only with negation: +Some queries can only be expressed with negation: -```text-plain +```sql #book AND not(note.ancestor.title = 'Tolkien') ``` -This will find all the book notes which are not in the "Tolkien" subtree. - -Under the hood --------------- - -### Label and relation shortcuts - -"Full" syntax for searching by labels is the following: - -`note.labels.publicationYear = 1954` or `note.relations.author.title *=* Tolkien` - -But given that searching by labels and relations is pretty common, there exists also a shortcut syntax: - -`#publicationYear = 1954` or `#author.title *=* Tolkien` respectively. +This query finds all book notes not in the "Tolkien" subtree. -### Separating fulltext and attribute parts +## Under the Hood -As you may have noticed from the examples above, search syntax allows seamlessly combining fulltext search with attribute-based search. How is this done? +### Label and Relation Shortcuts -Take `tolkien #book` as an example. It contains: +The "full" syntax for searching by labels is: -1. fulltext tokens - `tolkien` -2. attribute expressions - `#book` +```sql +note.labels.publicationYear = 1954 +``` -The tricky part is to find out where does the fulltext end and where the attribute expression begins. This is done by detecting certain stop-characters/words - all tokens are considered as fulltext before one of `#`, `~` or `note.` prefixes are encountered. After that, all characters/tokens are understood as attribute expression. +For relations: -If you want to use `#`, `~` or `note.` as part of fulltext, you need to escape them, see below for details. +```sql +note.relations.author.title *=* Tolkien +``` -There are certain corner cases where this is not sufficient, e.g: +However, common label and relation searches have shortcut syntax: -```text-plain -tolkien (#publicationYear >= 1950 AND #publicationYear < 1960) OR #book` +```sql +#publicationYear = 1954 +#author.title *=* Tolkien ``` -Here the expression starts with `(` which isn't (intentionally) a stop-character, so the query above will not actually work as intended. Instead, in these corner cases we need to add a separate extra stop character - `#` or `~` so the fixed query should look like: +### Separating Full-Text and Attribute Parts -```text-plain -tolkien # (#publicationYear >= 1950 AND #publicationYear < 1960) OR #book` -``` +Search syntax allows combining full-text search with attribute-based search seamlessly. For example, `tolkien #book` contains: -The extra stop character has no other effect other than separating the fulltext part from the attribute expression part. +1. Full-text tokens - `tolkien` +2. Attribute expressions - `#book` -### Escaping special characters +Trilium detects the separation between full text search and attribute/property 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 search, escape them with a backslash so they are processed as regular text: -Symbols or values sometimes have special meaning, which might be not what you intend. This can be fixed by either enclosing the strings containing special characters into quotes or escaping individual characters with backslash: +```sql +"note.txt" +\#hash +#myLabel = 'Say "Hello World"' +``` -`"note.txt"` - "note." is normally stop-prefix, but here it will be used for fulltext search +### Escaping Special Characters -`\#hash` - `#` is normally stop-character, but here it's escaped with backslash, so it's again used for fulltext +Special characters can be enclosed in quotes or escaped with a backslash to be used in full-text search: -`#myLabel = 'Say "Hello World"'` +```sql +"note.txt" +\#hash +#myLabel = 'Say "Hello World"' +``` -There are three supported types of quotes - single, double and backtick. +Three types of quotes are supported: single, double, and backtick. -### Type coercion +### Type Coercion -It's important to realize that a label value is always technically a string, even if it contains logically different value. This then allows you to do things like: +Label values are technically strings but can be coerced for numeric comparisons: -```text-plain +```sql note.dateCreated =* '2019-05' ``` -This will find notes created in May 2019 by simply doing string "starts with" operation on the date. - -This approach does not work well with numbers though, so whenever there is a numeric operator detected, the label values will be coerced from their normal string form into a numeric value for comparison. This then allows for e.g. `#publicationYear >= 1960` work correctly. +This finds notes created in May 2019. Numeric operators like `#publicationYear >= 1960` convert string values to numbers for comparison. -Auto trigger search from URL ----------------------------- +## Auto-Trigger Search from URL -Opening Trilium like in the example below will open the search pane and automatically trigger search for "abc": +You can open Trilium and automatically trigger a search by including the search [url encoded](https://meyerweb.com/eric/tools/dencoder/) string in the URL: -```text-plain -http://localhost:8080/#?searchString=abc -``` +`http://localhost:8080/#?searchString=abc` diff --git a/Wiki/sorting.md b/Wiki/sorting.md index 7602942..08317b2 100644 --- a/Wiki/sorting.md +++ b/Wiki/sorting.md @@ -1,25 +1,24 @@ -# Sorting -One time sorting ----------------- +# Sorting Notes -You can sort notes one time by right-clicking parent note in the note tree, Advanced -> Sort notes by ... +You can sort notes by right-clicking the parent note in the note tree and selecting Advanced -> Sort notes by ... +This will sort existing notes, but will not automatically sort future notes added to this parent note -Automatic / permanent sorting ------------------------------ +## Automatic/Permanent Sorting -Child notes can be kept sorted by attaching [labels](attributes.md) to the parent note: +Child notes can be automatically sorted by attaching specific [labels](attributes.md) to the parent note: -* `#sorted` - enables sorting, can optionally include name of the note's property/label (see details below) -* `#sortDirection` - by default ascending, set it to `desc` value to reverse the sort order -* `#sortFoldersFirst` - notes with children will be sorted on top +- `#sorted`: Enables sorting. Can optionally include the name of the note's property/label for sorting criteria (details below). +- `#sortDirection`: By default, sorting is ascending. Set this to `desc` to sort in descending order. +- `#sortFoldersFirst`: Notes with children will be sorted to the top. -Sorting works by comparing note property or a specific label on the child notes. +Sorting is done by comparing note properties or specific labels on child notes. There are four sorting levels, with the first having the highest priority. Lower priority levels are applied only if higher priority comparisons result in equality. -There are 4 sorting levels, where the first one has the highest priority and the lower one will be applied only if the 2 compared notes are equal based on higher priority comparison. +1. **Top Label Sorting**: Child notes with the `#top` label will appear at the top of the folder. +2. **Bottom Label Sorting**: (Introduced in Trilium 0.62) Child notes with the `#bottom` label will appear at the bottom of the folder. +3. **Property/Label-Based Sorting**: Sorting is based on the parent note's `#sorted` label: + - **Default Sorting**: If `#sorted` has no value, notes are sorted alphabetically. + - **Property Sorting**: If `#sorted` is set to `title`, `dateModified`, or `dateCreated`, notes are sorted based on the specified property. + - **Label Sorting**: If `#sorted` has any other value, this value is treated as the name of a child note's label, and sorting is based on the values of this label. For example, setting `#sorted=myOrder` on the parent note and using `#myOrder=001`, `#myOrder=002`, etc., on child notes. +4. **Alphabetical Sorting**: Used as a last resort when other criteria result in equality. -1. implicit sorting by `#top` label - child notes with this label will appear on the top of the folder. -2. implicit sorting by `#bottom` label (since Trilium 0.62) - child notes with this label will appear on the bottom of the folder. -3. sorting by child's property or a specific label defined on the parent note's `#sorted` label a) parent note has `#sorted` with no value - by default sorting will be done alphabetically b) parent note has `#sorted=title` or `#sorted=dateModified` or `#sorted=dateCreated` - sorting will be done based on the defined note's property c) parent note has `#sorted` label with any other value - this value is the name of the child note's label, whose value will be used for sorting. So e.g. you set `#sorted=myOrder` on the parent note and then child notes will have labels `#myOrder=001`, \`#myOrder=002" etc. -4. sorting of "last resort" is alphabetical - -All comparisons are made string-wise - e.g. "1" < "2" or "2020-10-10" < "2021-01-15" but also "2" > "10". +All comparisons are made string-wise (e.g., "1" < "2" or "2020-10-10" < "2021-01-15", but also "2" > "10"). \ No newline at end of file diff --git a/Wiki/synchronization.md b/Wiki/synchronization.md index bb9b680..288c434 100644 --- a/Wiki/synchronization.md +++ b/Wiki/synchronization.md @@ -1,85 +1,71 @@ -# Synchronization -Trilium is offline-first note-taking application - when you use the desktop application, all the data is stored locally, but you also have an option to set up synchronization to the server instance. When you add another desktop client, you can get to star-shaped topology: +# Synchronization -![](images/star-topology.png) +Trilium is an offline-first note-taking application that stores all data locally on the desktop client. However, it also offers the option to set up synchronization with a server instance, allowing multiple desktop clients to sync with a central server. This creates a star-shaped topology: -This means that there's one central server (we'll call this instance _sync server_) and several _client_ (sometimes called _desktop_) instances which all point to this sync server and synchronize against it. +![topology visualization](images/star-topology.png) -Once sync is set up, synchronization is automatic and ongoing - you don't need to trigger it manually. It should "just work". +In this setup, a central server (referred to as the _sync server_) and multiple _client_ (or _desktop_) instances synchronize with the sync server. Once configured, synchronization is automatic and ongoing, requiring no manual intervention. -How to set up synchronization ------------------------------ +## Setting Up Synchronization -### Security +### Security Considerations -Please note that setting up server securely is not easy and far reaching mistakes can be made. It is especially important to use a valid TLS certificate (https) instead of unencrypted/unauthenticated HTTP. +Setting up the server securely is critical and can be complex. It is crucial to use a valid [TLS certificate](tls-configuration.md) (HTTPS) rather than an unencrypted HTTP connection to ensure security and avoid potential vulnerabilities. -### Setup synchronization from desktop instance to sync server +### Synchronizing a Desktop Instance with a Sync Server -This approach is used when you already have a desktop instance of Trilium and you want to [setup sync server on your web host](server-installation.md). +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. -So let's assume your server instance is already deployed, but it's uninitialized (no data). Then open your desktop instance, click on Options -> Sync tab -> Sync configuration and set "Server instance address" to point to your sync server. Click Save. +1. **Server Deployment**: Ensure your server instance is deployed but uninitialized. +2. **Desktop Configuration**: Open your desktop instance, navigate to Options -> Sync tab -> Sync configuration, and set the "Server instance address" to your sync server's address. Click Save. -![](images/sync-config.png) +![screenshot of the sync settings options modal](images/sync-config.png) -Now click on "Test sync" button which will tell you if the handshake with sync server succeeded. If yes, sync with sync server started - client started pushing all the data towards the server instance. This might take some time to finish, but you can close the Options dialog and keep using Trilium. +3. **Testing Sync**: Click the "Test sync" button to verify the connection to the sync server. If successful, the client will start pushing all data to the server instance. This process may take some time, but you can continue using Trilium. Periodically check the server instance to confirm when the sync is complete. Once finished, you should see the login screen on the server. -You can also check the server instance periodically to see if the sync finished. Once it's finished, you should see the login screen. +### Synchronizing a Desktop Instance from a Sync Server -### Setup synchronization from sync server to desktop instance +This method is used when you already have a sync server and want to configure a new desktop instance to sync with it. -This is used when you already have sync server, and you want to set up a desktop instance to sync with (from) it. +1. **Desktop Setup**: Follow the [desktop installation page](desktop-installation.md). +2. **Initial Configuration**: When prompted, choose the option to set up sync with a sync server. -Here we assume that you downloaded [the most recent release](https://github.com/TriliumNext/Notes/releases/latest) for your platform, unzipped it and ran it. +![screenshot of the sync from server setup page](images/sync-init.png) -Since the desktop instance is completely empty, it will first ask if you want to create an initial document, or you want to set up sync with sync server - you need to choose the second option. +3. **Server Details**: Configure the Trilium server address and enter the correct username and password for authentication. +4. **Finish Setup**: Click the "Finish setup" button. If successful, you will see the following screen: -![](images/sync-init.png) +![screenshot of the sync page](images/sync-in-progress.png) -You'll need to configure Trilium server address and importantly also correct username / password (sync setup requires authentication). +Once synchronization is complete, you will be automatically redirected to the Trilium application. -Click on "Finish setup" button and if everything went fine, you'll see this screen: +## Proxy Configuration -![](images/sync-in-progress.png) +Two proxy setups are supported: -Once the sync is finished, you'll be automatically redirected to the Trilium application. +- **Explicit Proxy Configuration**: Set the proxy server in Options / Sync. Only unauthenticated proxy servers are supported. +- **System Proxy Settings**: If no proxy server is explicitly configured, Trilium will use the system proxy settings. -Proxy setup ------------ +## Troubleshooting -Two different setups are supported: +### Date/Time Synchronization -* you can explicitly set proxy server to be used in Options / Sync. Only unauthenticated proxy servers are currently supported. -* if no proxy server is explicitly configured, then Trilium will use system proxy settings +For successful synchronization, both client and server must have the same date and time, with a tolerance of up to five minutes. -Troubleshooting ---------------- +### Certificate Issues -### Different date/time on client and server +When using TLS, Trilium will verify the server certificate. If verification fails (e.g., due to self-signed certificates or certain corporate proxies), you can run the Trilium client with the `NODE_TLS_REJECT_UNAUTHORIZED` environment variable set to `0`: -For a successful sync, both client and server need to have save date time, with a tolerance of maximum 5 minutes difference. - -Certificate issues ------------------- - -When TLS is in use, Trilium client will attempt to verify the server certificate. In some cases (self-signed certs, some corporate proxy servers), the verification will be unsuccessful and sync will fail. In those cases, you can run the Trilium client with environment variable `NODE_TLS_REJECT_UNAUTHORIZED` set to `0`: - -```text-plain +```sh export NODE_TLS_REJECT_UNAUTHORIZED=0 ``` -TLS certificate won't be verified and simply accepted as it is. **You need to be aware that this will degrade the security of sync process significantly and open your setup to MITM attacks. It's strongly recommended to use a valid signed server certificate.** - -Newer Trilium versions contain this in a script called `trilium-no-cert-check.sh`. - -Conflict resolution -------------------- +This will disable TLS certificate verification, significantly reducing security and exposing the setup to MITM attacks. It is strongly recommended to use a valid signed server certificate. Newer Trilium versions include a script called `trilium-no-cert-check.sh` for this purpose. -You can sometimes encounter a situation where you edit the same note in multiple instances before the note changes are synchronized. +### Conflict Resolution -Trilium handles this situation by just picking up the newer change and discarding the older change. The older change should still be visible in [note revisions](note-revisions.md), so it should be possible to recover any data lost in conflict resolution. +If you edit the same note on multiple instances before synchronization, Trilium resolves conflicts by retaining the newer change and discarding the older one. The older version remains accessible in [note revisions](note-revisions.md), allowing data recovery if needed. -Hash check ----------- +### Hash Check -After each completed sync, Trilium computes a hash of all synced data on both client and sync server. If there's a difference, something went wrong and Trilium will run an automatic recovery mechanism. +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 will automatically initiate a recovery mechanism to resolve the issue. \ No newline at end of file diff --git a/Wiki/template.md b/Wiki/template.md index d0e79f5..582b8d3 100644 --- a/Wiki/template.md +++ b/Wiki/template.md @@ -1,42 +1,40 @@ # Template -Template is a note which serves as a kind of "template" for other kind of notes (let's call them instance notes). -Assignment of a template relation to a note brings these three effects: +A template in Trilium serves as a predefined structure for other notes, referred to as instance notes. Assigning a template to a note brings three main effects: -* all attributes from the template note are [inherited](attribute-inheritance.md) to the instance notes - * note that even attributes with `#isInheritable=false` are inherited to the instance notes, but only inheritable attributes are then inherited to the children of instance notes -* note content is copied from the template note to the instance note (if the instance note content is empty at the time of template attribute assignment) -* all template's children notes are deep-duplicated to the instance note +1. **Attribute Inheritance**: All attributes from the template note are [inherited](attribute-inheritance.md) by the instance notes. Even attributes with `#isInheritable=false` are inherited by the instance notes, although only inheritable attributes are further inherited by the children of the instance notes. +2. **Content Duplication**: The content of the template note is copied to the instance note, provided the instance note is empty at the time of template assignment. +3. **Child Note Duplication**: All child notes of the template are deep-duplicated to the instance note. -Example -------- +## Example -A typical example would be a "Book" template note, which will: +A typical example would be a "Book" template note, which might include: -* define some [promoted attributes](promoted-attributes.md) - e.g. publication year, author etc -* you can also create kind of outline of the book review in the note text - e.g. themes, conclusion etc. .. -* you can also create child notes for e.g. highlights, summary etc. +- **Promoted Attributes**: Such as publication year, author, etc. (see [promoted attributes](promoted-attributes.md)). +- **Outline**: An outline for a book review, including sections like themes, conclusion, etc. +- **Child Notes**: Additional notes for highlights, summary, etc. -![](images/template.png) +![Template Example](images/template.png) -Instance note -------------- +## Instance Note -And then we have instance note - this note has a [relation](attributes.md) to the "Book" template note which will cause that the template note text is used to initialize the instance note text and all attributes from the template note are inherited to the instance note. +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 all attributes from the template are inherited. -You can create an instance note (i.e. note which uses a template) through the UI like this: +To create an instance note through the UI: -![](api/images/qGovjbsV4FPX/template-create-instance-note.) +![show child note templates](images/template-create-instance-note.png) -For the template to appear in the menu, the template note needs to have `#template` label (don't mistake it with `~template` relation which points from the instance note to the template note). If you use [workspaces](workspace.md), you can alternatively mark templates with `#workspaceTemplate` which will 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](workspace.md), you can also mark templates with `#workspaceTemplate` to display them only in the workspace. -You can also add/change template notes after the note is created, simply create a relation `~template` pointing to the desired template note. +Templates can also be added or changed after note creation by creating a `~template` relation pointing to the desired template note. -Other remarks -------------- +## Additional Notes -From the visual perspective, template can define a `#iconClass` and `#cssClass` attributes so that all e.g. books are shown with a particular icon and CSS style. +From a visual perspective, templates can define `#iconClass` and `#cssClass` attributes, allowing all instance notes (e.g., books) to display a specific icon and CSS style. -You can check out the concept in the [demo notes](database.md)| in e.g. [Relation map](relation-map.md), [Task manager](task-manager.md) or [Day notes](day-notes.md). +Explore the concept further in the [demo notes](database.md), including examples like the [Relation Map](relation-map.md), [Task Manager](task-manager.md), and [Day Notes](day-notes.md). -See also [default note title](default-note-title.md) which allows you to create templates for note titles. Note templates and title templates can be combined by creating a `#titleTemplate` for a template note. +Additionally, see [default note title](default-note-title.md) for creating title templates. Note templates and title templates can be combined by creating a `#titleTemplate` for a template note. diff --git a/Wiki/text-notes.md b/Wiki/text-notes.md index 9040dcd..b9c8393 100644 --- a/Wiki/text-notes.md +++ b/Wiki/text-notes.md @@ -1,107 +1,89 @@ -# Text-notes -Trilium uses awesome [CKEditor 5](https://ckeditor.com/ckeditor-5/) as its editing component. +# Text Notes -Formatting ----------- +Trilium utilizes the powerful [CKEditor 5](https://ckeditor.com/ckeditor-5/) as its text editing component. -Trilium text note interface doesn't show any toolbars or formatting options by default, these needs to be brought up by: +## Formatting Options -1. selecting text will bring up an inline toolbar: +The Trilium text note interface does not display toolbars or formatting options by default. These can be accessed by: -![](api/images/voFa4y9vMkRi/text-notes-formatting-inline.p) +![inline note formatting](images/text-notes-formatting-inline.png) +1. Selecting text to bring up an inline toolbar. -1. clicking on the block toolbar: +![formating note block](images/text-notes-formatting-block.png) +2. Clicking on the block toolbar. -![](api/images/aQT4C1G1rjUk/text-notes-formatting-block.pn) +## Read-Only vs. Editing Mode -Read only vs. editing mode --------------------------- +Text notes are usually opened in edit mode. However, they may open in read-only mode under the following circumstances: -Text notes are normally opened in edit mode, however there are two cases when they are open in read-only mode: +- The note is long and would take time to load, so it is opened in read-only mode by default for quicker access. +- The note has a `readOnly` [label](attributes.md). -* they are long and thus would take time to load so by default we open them as read only which is much quicker -* or the note has `readOnly` [label](attributes.md) +In both cases, it is possible to switch back to editable mode. -In both cases, it is possible to switch to editable mode again. +## General Formatting -General Formatting ------------------- +Since Trilium uses CKEditor, all of its formatting options are available here. You may use the graphical toolbar shown above, or enter formatting such as markdown markdown directly in the text. Examples include: -Trilium uses the CKEditor, so any formatting that the CKEditor supports should be available in Trilium. For example: - -**Bold** – Type `**text**` or `__text__` - -_Italic_ – Type `*text*` or `_text_` - -`Code` – Type \`text\` - -~Strikethrough~ – Type `~~text~~` +- **Bold**: Type `**text**` or `__text__` +- _Italic_: Type `*text*` or `_text_` +- `Code`: Type \`text\` +- ~Strikethrough~: Type `~~text~~` ### Lists -* Bulleted list – Start a line with `*` or `-` followed by a space - -1. Numbered list – Start a line with `1.` or `1)` followed by a space - -\[ \] To-do list – Start a line with `[ ]` or `[x]` followed by a space to insert an unchecked or checked list item, respectively +- Bulleted list: Start a line with `*` or `-` followed by a space +- Numbered list: Start a line with `1.` or `1)` followed by a space +- To-do list: Start a line with `[ ]` for an unchecked item or `[x]` for a checked item ### Blocks -> Block quote – Start a line with `>` followed by a space - -`Multi-line Code block` – Start a line with \`\`\` - -### Other - -Headings – Start a line with `##` or `###` followed by a space to create a heading 1, heading 2, or heading 3 (up to heading 6 if options defines more headings) - -Note: Trilium only accepts headings with `##` and more because `#` is reserved for the title +- Block quote: Start a line with `>` followed by a space -Horizontal line – Start a line with `---` ------------------------------------------ +### Multi-Line Code Blocks -Markdown & Autoformat ---------------------- +To create a multi-line code block, start a line with "\`\`\`[lang]", for example: -CKEditor supports markdown-like editing experience. It recognizes syntax and automatically converts it to rich text. See it in action: +```js +if (1 > 2) { + console.log("Error in the matrix"); +} +``` -![](images/autoformat.gif) +### Headings -Complete documentation for this feature is available in [CKEditor documentation](https://ckeditor.com/docs/ckeditor5/latest/features/autoformat.html). +Create headings by starting a line with `##` for heading 2, `###` for heading 3, and so on up to heading 6. Note that `#` is reserved for the title. -If the autoformat is not desirable for what you just wrote, you can press `CTRL-Z` which will un-autoformat the text to its original form. +### Horizontal Line -Note that the use of `#` for Heading1 style is not supported because the editor assumes that is used for the title, start with `##` for Heading2. Explanation [here](https://ckeditor.com/docs/ckeditor5/latest/features/headings.html#heading-levels). +Insert a horizontal line by starting a line with `---`. -Math support ------------- +## Markdown & Autoformat -Trilium provides Math support with the help of KaTex: +CKEditor supports a markdown-like editing experience, recognizing syntax and automatically converting it to rich text. -![](images/math.gif) +Complete documentation for this feature is available in the [CKEditor documentation](https://ckeditor.com/docs/ckeditor5/latest/features/autoformat.html). -Cut selection to sub-note -------------------------- +If autoformatting is not desirable, press `CTRL-Z` to revert the text to its original form. -One of the common situations in Trilium is when you're editing a document, and it gets somewhat large, so you start splitting it up into sub-notes - the process is essentially like this: +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). -* select the desired piece of text and cut it into clipboard -* create new sub-note & give it name -* paste the content from clipboard into sub-note +## Math Support -Trilium provides a way to automate this: +Trilium provides math support through [KaTeX](https://katex.org/). -![](images/cut-to-subnote.gif) +## Cutting Selection to Sub-Note -You can notice how heading "Formatting" is automatically detected and new sub-note is named "Formatting". +When editing a document that becomes too large, you can split it into sub-notes: -It is also possible to assign a keyboard shortcut for this action. +1. Select the desired text and cut it to the clipboard. +2. Create a new sub-note and name it. +3. Paste the content from the clipboard into the sub-note. -Include note ------------- +Trilium can automate this process. The heading is automatically detected and the new sub-note is named accordingly. You can also assign a keyboard shortcut for this action. -Text notes can "include" another note as a read only widget. This can be useful for e.g. including a dynamically generated chart (from scripts & "render HTML" note) or other more advanced use cases. +## Including a Note -This functionality is available in the block toolbar icon. +Trilium can automate this process. Select some text within the note, and in the selection toolbar, click the scissors icon for the "cut & pasted selection to sub-note" action. The heading is automatically detected and the new sub-note is named accordingly. You can also assign a keyboard shortcut for this action. -![image](images/Text-notes%20image.png) +This functionality is available through the block toolbar icon. diff --git a/Wiki/tls-configuration.md b/Wiki/tls-configuration.md index bf6bd33..d288241 100644 --- a/Wiki/tls-configuration.md +++ b/Wiki/tls-configuration.md @@ -1,42 +1,46 @@ -# TLS-configuration -TLS configuration is required for \[\[server installation\]\]. The page below describes steps to set up TLS in Trilium itself. You might also opt for TLS termination using some reverse proxy (e.g. nginx), in that case follow a [guide like this](https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-20-04). +# TLS Configuration -First thing to do is to get a TLS certificate. You have two options: +Configuring TLS is essential for [server installation](server-installation.md) in Trilium. This guide details the steps to set up TLS within Trilium itself. -* Recommended - get TLS certificate signed by root certificate authority. For personal usage, the best choice is [Let's encrypt](https://letsencrypt.org). It's free, automated and easy. You can take a look at Certbot for automatic TLS setup. -* generate your own self-signed certificate. You will have extra trouble with importing the certificate into all machines from which you connect to the server installation so this is not recommended. +For a more robust solution, consider using TLS termination with a reverse proxy (recommended, e.g., Nginx). You can follow a [guide like this](https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-20-04) for such setups. -Modifying config.ini --------------------- +## Obtaining a TLS Certificate -Now that you have your certificate, we need to modify `config.ini` in the \[\[data directory\]\] so that Trilium will use it: +You have two options for obtaining a TLS certificate: -```text-plain +- **Recommended**: Obtain a TLS certificate signed by a root certificate authority. For personal use, [Let's Encrypt](https://letsencrypt.org) is an excellent choice. It is free, automated, and straightforward. Certbot can facilitate automatic TLS setup. +- Generate a self-signed certificate. This option is not recommended due to the additional complexity of importing the certificate into all machines connecting to the server. + +## Modifying `config.ini` + +Once you have your certificate, modify the `config.ini` file in the [data directory](data-directory.md) to configure Trilium to use it: + +```ini [Network] port=8080 -# true for TLS/SSL/HTTPS (secure), false for HTTP (unsecure). +# Set to true for TLS/SSL/HTTPS (secure), false for HTTP (insecure). https=true -# path to certificate (run "bash bin/generate-cert.sh" to generate self-signed certificate). Relevant only if https=true +# Path to the certificate (run "bash bin/generate-cert.sh" to generate a self-signed certificate). +# Relevant only if https=true certPath=/[username]/.acme.sh/[hostname]/fullchain.cer keyPath=/[username]/.acme.sh/[hostname]/example.com.key ``` -Above is only example of how this is set up on my environment when I generated the certificate using Let's encrypt acme utility. Your paths may be completely different. (Note that if you are using a Docker installation, these paths should be in a volume or other path understood by the docker container, e.g., /home/node/trilium-data/\[DIR IN DATA DIRECTORY\].) +The above example shows how this is set up in an environment where the certificate was generated using Let's Encrypt's ACME utility. Your paths may differ. For Docker installations, ensure these paths are within a volume or another directory accessible by the Docker container, such as `/home/node/trilium-data/[DIR IN DATA DIRECTORY]`. -After you set this up, you may restart Trilium and now visit the hostname with "https". +After configuring `config.ini`, restart Trilium and access the hostname using "https". -Self-signed certificate ------------------------ +## Self-Signed Certificate -If you need to use a self-signed certificate for your server instance, the desktop instance won't trust it. +If you opt to use a self-signed certificate for your server instance, note that the desktop instance will not trust it by default. -Currently the only way to make this work is by disabling certificate validation by setting this environment variable (for Linux): +To bypass this, disable certificate validation by setting the following environment variable (for Linux): -```text-plain +```sh export NODE_TLS_REJECT_UNAUTHORIZED=0 trilium ``` -Trilium comes with scripts to start Trilium in this mode, e.g. `trilium-no-cert-check.bat` for Windows. +Trilium provides scripts to start in this mode, such as `trilium-no-cert-check.bat` for Windows. -\*\* Note that disabling TLS certificate validation is insecure, so do it only if you're sure you know what you're doing! \*\* +**Warning**: Disabling TLS certificate validation is insecure. Proceed only if you fully understand the implications. diff --git a/Wiki/tree-concepts.md b/Wiki/tree-concepts.md index 61484c7..50a03d6 100644 --- a/Wiki/tree-concepts.md +++ b/Wiki/tree-concepts.md @@ -1,28 +1,25 @@ -# Tree concepts -This page describes some basic concepts related to the tree structure of notes in Trilium. +# Tree Concepts -Note ----- +This page explains the basic concepts related to the tree structure of notes in TriliumNext. -Note is a central entity in Trilium. See [Note](note.md) for details. +## Note -Branch ------- +A note is the central entity in TriliumNext. For more details, see [Note](note.md). -Branch describes note placement in the note tree - in essence it's a tuple of parentNoteId and noteId which says that given note is placed as a child into this parent note. +## Branch -Each note can have more than one such branches, in other words any note can have multiple placements in the tree. For lack of better word we call this "[cloning](cloning-notes.md)". +A branch describes the placement of a note within the note tree. Essentially, it is a tuple of `parentNoteId` and `noteId`, indicating that the given note is placed as a child under the specified parent note. -Prefix ------- +Each note can have multiple branches, meaning any note can be placed in multiple locations within the tree. This concept is referred to as "[cloning](cloning-notes.md)." -Prefix is branch (placement) specific title prefix for the note. Let's say you have your note placed into two different places in the tree, but you want to change the title a bit in one of the placements. For this you can use prefix. +## Prefix -To edit prefix, right-click on a note in the tree pane and choose "Edit branch prefix". +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 the title slightly in one of those placements, you can use a prefix. -Prefix is not part of the note itself and thus is not encrypted when the note is protected. That can be useful when you want to keep part of the title in the tree visible even when protected for easier orientation. +To edit a prefix, right-click on the note in the tree pane and select "Edit branch prefix." -Subtree -------- +The prefix is not part of the note itself and is not encrypted when the 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 protected. -Subtree is a set of notes consisting of a particular note (subtree root) and all its children, children of these children (= all its descendants). Some operations work on subtrees (e.g. export). +## Subtree + +A subtree consists of a particular note (the subtree root) and all its children and descendants. Some operations, such as exporting, work on entire subtrees. diff --git a/Wiki/tree-manipulation.md b/Wiki/tree-manipulation.md index a177450..31f9452 100644 --- a/Wiki/tree-manipulation.md +++ b/Wiki/tree-manipulation.md @@ -1,26 +1,22 @@ -# Tree manipulation -This page describes how you can manipulate the note tree - specifically moving notes. +# Tree Manipulation -Drag and drop -------------- +This page explains how to manipulate the note tree in TriliumNext, focusing on moving notes. -You can manipulate the tree simply by dragging and dropping notes as you can see in the demo: +## Drag and Drop -![](images/drag-and-drop.gif) +![Drag and drop example](images/drag-and-drop.gif) +You can easily rearrange the note tree by dragging and dropping notes, as demonstrated in the example above. -Keyboard manipulation ---------------------- +## Keyboard Manipulation -Trilium provides fast keyboard based manipulation with following [shortcuts](keyboard-shortcuts.md): +![Example of using keyboard keys to move a note](images/move-note-with-keyboard.gif) +Trilium offers efficient keyboard-based manipulation using the following [shortcuts](keyboard-shortcuts.md): -* `CTRL-UP` and `CTRL-DOWN` - move note up or down in the order -* `CTRL-LEFT` - move note upwards in the hierarchy by changing a note's parent to note's parent's parent. -* `CTRL-RIGHT` - move note downwards in the hierarchy by setting parent to the note currently above (this is a bit hard to explain - it's best to see a demo or try it for yourself) -* `LEFT` and `RIGHT` expands and collapses a sub-tree +- `CTRL-UP` and `CTRL-DOWN`: 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. +- `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). +- `LEFT` and `RIGHT`: Expand and collapse a sub-tree. -![](images/move-note-with-keyboard.gif) +## Context Menu -Context menu ------------- - -You can also move notes with familiar cut & paste from context menu or associated keyboard [shortcuts](keyboard-shortcuts.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-shortcuts.md): `CTRL-C` ([copy](cloning-notes.md)), `CTRL-X` (cut) and `CTRL-V` (paste). diff --git a/Wiki/troubleshooting.md b/Wiki/troubleshooting.md index 4079bf7..962ef3b 100644 --- a/Wiki/troubleshooting.md +++ b/Wiki/troubleshooting.md @@ -1,90 +1,72 @@ # Troubleshooting -Trilium is currently beta quality software, so it's quite expected there will be some bugs. -General quickfix ----------------- +As Triliumis currently in beta, encountering bugs is to be expected. -You guessed it - it's restart. +## General Quick Fix -If there's a UI problem, it usually means that the Trilium frontend got into an inconsistent state and is acting up. The easiest way to fix it is to reload the application - just press `CTRL-R` and frontend will be reloaded. +The first step in troubleshooting is often a restart. -If this still doesn't help, or you suspect it's actually a backend issue, you can restart the whole application - in case of desktop (Electron) build, you just close the window and re-open it again. +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. -Broken note crashes Trilium ---------------------------- +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. -Sometimes a particular problem can cause issues for Trilium (e.g. render note with faulty script) and causes Trilium to crash. But since Trilium will normally try to load previously open notes, it will attempt to load again the note, causing the crash again. +## Broken Note Crashes Trilium -To break out of this vicious cycle, you can specify `TRILIUM_START_NOTE_ID` environment variable, which will reset the open tabs to only one with the specified note ID (just use `root`). In linux you could use it like this: +Certain problems, such as rendering a note with a faulty script, can cause Trilium to crash. If Trilium attempts to reload the problematic note upon restart, it will continue to crash. -```text-plain -TRILIUM_START_NOTE_ID=root ./trilium -``` +To resolve this, use the `TRILIUM_START_NOTE_ID` environment variable to reset the open tabs to a single specified note ID (e.g., `root`). In Linux, you can set it as follows: -Alternatively, you can also start up Trilium in a "safe mode" which will reset the current note to root: - -```text-plain -TRILIUM_SAFE_MODE=true ./trilium +```sh +TRILIUM_START_NOTE_ID=root ./trilium ``` -Broken script prevents application startup ------------------------------------------- - -If you experiment with scripting, it might happen that you create a script which crashes the whole Trilium. That's even worse if you set it as a startup script or in an active [custom widget](custom-widget.md). +## Broken Script Prevents Application Startup -In such cases you can start Trilium in "safe mode" which will not execute any custom scripts: +If a custom script causes Triliumto crash, and it is set as a startup script or in an active [custom widget](custom-widget.md), start Triliumin "safe mode" to prevent any custom scripts from executing: -```text-plain +```sh TRILIUM_SAFE_MODE=true ./trilium ``` -Depending on the Trilium distribution, there are also ready made scripts for this: `trilium-safe-mode.bat` and `trilium-safe-mode.sh`. +Depending on your Trilium distribution, you may have pre-made scripts available: `trilium-safe-mode.bat` and `trilium-safe-mode.sh`. -Once Trilium starts up, find the note which caused the crash and fix it/delete it. +Once Trilium starts, locate and fix or delete the problematic note. -Sync and consistency checks ---------------------------- +## Sync and Consistency Checks -Trilium periodically checks logical consistency of the database (e.g. that every note should have a parent). If some inconsistency is detected, the user is notified on the UI about the inconsistency. +Trilium periodically verifies the logical consistency of the database (e.g., ensuring every note has a parent). If inconsistencies are detected, you will be notified via the UI. -In such case, it is recommended to file a bug report and attach anonymized database (see below). +In such cases, file a bug report and attach an [anonymized database](anonymized-database.md) if necessary. -Restoring backup ----------------- +## Restoring Backup -Trilium makes regular automatic backup, so When things go really bad we might need the last option - [restore backup](backup.md). +Trilium makes regular automatic backups. If issues become severe, you can [restore from a backup](backup.md). -Forgotten username/password ---------------------------- +## Forgotten Password -In case you forgot your password, this means that: +If you forget your password: -* your protected notes are forever lost - they cannot be decrypted without the password -* normal (unprotected) notes are recoverable. Read below to see how. +- Protected notes are irretrievable without the password. +- Unprotected notes can be recovered. Follow these steps: -To be able to change username/password and thus recover your unprotected notes, you need to get access to the [database](database.md) file in a [data directory](data-directory.md). You then need to open the `document.db` file with SQLite client (command line or e.g. [DB Browser](https://sqlitebrowser.org/)) and execute following queries: +Access the [database](database.md) file in the [data directory](data-directory.md). Open the `document.db` file with an SQLite client (e.g., [DB Browser](https://sqlitebrowser.org/)) and execute the following queries: -```text-plain -UPDATE options SET value = 'your_username' WHERE name = 'username'; -- feel free to change 'your_username' to your desired username +```sql UPDATE options SET value = '77/twC5O00cuQgNC63VK32qOKKYwj21ev3jZDXoytVU=' WHERE name = 'passwordVerificationSalt'; UPDATE options SET value = '710BMasZCAgibzIc07X4P9Q4TeBd4ONnqJOho+pWcBM=' WHERE name = 'passwordDerivedKeySalt'; UPDATE options SET value = 'Eb8af1/T57b89lCRuS97tPEl4CwxsAWAU7YNJ77oY+s=' WHERE name = 'passwordVerificationHash'; UPDATE options SET value = 'QpC8XoiYYeqHPtHKRtbNxfTHsk+pEBqVBODYp0FkPBa22tlBBKBMigdLu5GNX8Uu' WHERE name = 'encryptedDataKey'; ``` -After executing the changes, don't forget to commit/write the changes! - -This will set the password to "password". You can use that to login to the application again. - -If you already had protected notes (which are not unrecoverable), I recommend deleting them or alternatively export the unprotected notes, delete the document.db and start anew. +After executing the changes, commit/write the changes. **This sets the password to "password," allowing you to log in again.** -If you decide to continue using the existing document file, don't forget to change your password (Options -> Change password). +For pre-existing protected notes (now unrecoverable), consider deleting them or exporting the unprotected notes. Then, delete `document.db` and start fresh. -Reporting bugs --------------- +If you continue using the existing document file, change your password (Options -> Change Password). -It's a great help to send bug reports. Here are some tips where to look at: +## Reporting Bugs -Trilium uses GitHub issues - so please send your reports here: [https://github.com/TriliumNext/Notes/issues](https://github.com/TriliumNext/Notes/issues) +Reporting bugs is highly valuable. Here are some tips: -Check [error logs](error-logs.md) page for info how to provide the necessary info. +- Use GitHub issues for reporting: [https://github.com/TriliumNext/Notes/issues](https://github.com/TriliumNext/Notes/issues) +- Refer to the [error logs](error-logs.md) page for information on providing necessary details. diff --git a/Wiki/upgrading-trilium.md b/Wiki/upgrading-trilium.md index 17fe799..2a82cd8 100644 --- a/Wiki/upgrading-trilium.md +++ b/Wiki/upgrading-trilium.md @@ -1,22 +1,18 @@ -# Upgrading Trilium -Topic of this page is upgrading Trilium from one version to another. +# Upgrading TriliumNext -How to upgrade --------------- +This document outlines the steps required to upgrade Triliumto a new release version. -Trilium does not have a built-in auto upgrade - all upgrades have to be done manually. How to do this depends on the installation method: +## How to Upgrade -* for [docker server installation](docker-server-installation.md) - pull the image of the newer version and restart -* for all others you need to download new version of the release artifact of your choice from the [release page](https://github.com/TriliumNext/Notes/releases/latest) and replace existing version of the application - i.e. rename/delete the old directory and extract the archive of the new version +Triliumdoes not support built-in automatic upgrades; all updates must be performed manually. The upgrade process varies depending on the installation method: -Document compatibility and migration ------------------------------------- +- **[Docker Server Installation](docker-server-installation.md)**: Pull the new image and restart the container. +- **Other Installations**: Download the latest version from the [release page](https://github.com/TriliumNext/Notes/releases/latest) and replace the existing application files. -During Trilium startup, [database](database.md) will be checked whether it conforms to the version supported by the application. In case the document is in the old version, Trilium will automatically migrate it to the new version. This will then mean that the document will not be readable anymore by the older versions of Trilium. In case you want to go back to the old version of the document and Trilium, you can restore the [backed up](backup.md) `backup-before-migration.db` which is created before every migration. +## Database Compatibility and Migration -Sync compatibility ------------------- +Upon startup, Triliumwill automatically migrate the [database](database.md) to 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 of Triliumand its database, you can restore the [backup](backup.md) that is created prior to migration. -[Synchronization](synchronization.md) protocol is versioned and all members of the sync cluster need to talk in the same protocol version. Therefore, when you are upgrading from one version to another, it might be necessary to upgrade all instances in the cluster. +## Sync Compatibility -Change in protocol version is usually indicated on a release page. +The [synchronization](synchronization.md) protocol used by Triliumis versioned, requiring all members of the sync cluster to use the same protocol version. Therefore, when upgrading to a new version, you may need to upgrade all instances in the sync cluster. Changes to the sync protocol version are typically indicated on the release page. diff --git a/Wiki/web-clipper.md b/Wiki/web-clipper.md index 2d292ad..6bc4308 100644 --- a/Wiki/web-clipper.md +++ b/Wiki/web-clipper.md @@ -1,48 +1,38 @@ # Web-clipper -![screenshot of webclipper in chrome](images/Web-clipper%20chrome-trilium-web.png) +![screenshot of webclipper in chrome](images/web-clipper-chrome-trilium-web.png) 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 Trilium Notes. -Project is hosted [here](https://github.com/zadam/trilium-web-clipper). +Project is hosted [here](https://github.com/TriliumNext/web-clipper). Firefox and Chrome are supported browsers, but the chrome build should work on other chromium based browsers as well. ## Functionality -------------- - * select text and clip it with the right-click context menu * click on an image or link and save it through context menu * save whole page from the popup or context menu * save screenshot (with crop tool) from either popup or context menu * create short text note from popup -Trilium will save these clippings as a new child note under a "clipper inbox" note. +Trilium will save these clippings as a new child note under a "clipper inbox" note. -By default, that's the [day note](Day-notes.md) but you can override that by setting the [label](Attributes.md) `clipperInbox`, on any other note. +By default, that's the [day note](day-notes.md) but you can override that by setting the [label](attributes.md) `clipperInbox`, on any other note. If there's multiple clippings from the same page (and on the same day), then they will be added to the same note. -Get it - -------------- - -Extension is available from: +**Extension is available from:** -* [Project release page](https://github.com/zadam/trilium-web-clipper/releases) - .xpi for Firefox and .zip for Chromium based browsers. -* [Chrome Web Store](https://chrome.google.com/webstore/detail/trilium-web-clipper/dfhgmnfclbebfobmblelddiejjcijbjm?hl=en&authuser=0) +* [Project release page](https://github.com/TriliumNext/web-clipper/releases) - .xpi for Firefox and .zip for Chromium based browsers. +* %%{WARNING}%% [Chrome Web Store](https://chromewebstore.google.com/detail/trilium-web-clipper/dfhgmnfclbebfobmblelddiejjcijbjm) ## Configuration -------------- - 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. -It's also possible to configure the [server](Server-installation.md) address if you don't run the desktop application, or want it to work without the desktop application running. +It's also possible to configure the [server](server-installation.md) address if you don't run the desktop application, or want it to work without the desktop application running. ## Username -------------- - Older versions of Trilium (before 0.50) required username & password to authenticate, but this is no longer the case. You may enter anything in that field, it will not have any effect. diff --git a/Wiki/weight-tracker.md b/Wiki/weight-tracker.md index 0c0cc42..9f7d9aa 100644 --- a/Wiki/weight-tracker.md +++ b/Wiki/weight-tracker.md @@ -1,11 +1,11 @@ # Weight-tracker +![screenshot of weight tracker](images/weight-tracker.png) + The `Weight Tracker` is a [Script API](script-api.md) showcase present in the [demo notes](database.md). By adding `weight` as a [promoted attribute](promoted-attributes.md) in the [template](template.md) from which [day notes](day-notes.md) are created, you can aggregate the data and plot weight change over time. -![](images/weight-tracker.png) - ## Implementation The `Weight Tracker` note in the screenshot above is of the type `Render Note`. That type of note doesn't have any useful content itself. Instead it is a placeholder where a [script](scripts.md) can render its output.