updated images/gifs/article content to reflect current state of Trilium

zadam 2022-01-05 19:24:21 +01:00
parent 834c350bfa
commit 7ee6edb06a
102 changed files with 343 additions and 439 deletions

@ -5,4 +5,4 @@ Trilium provides some advanced functionality in the form of [[Scripts]] and [[pr
* [[Weight Tracker]]
* [[Task Manager]]
Important thing to keep in mind is that above showcases and demoed functionality are not built-in into Trilium - these are just examples of Trilium's extensibility.
An important thing to keep in mind is that above showcases and demoed functionality are not built-in into Trilium - these are just examples of Trilium's extensibility.

@ -1,4 +1,4 @@
I've assumed you have created a DNS A record for `trilium.yourdomain.com` that you want to use for your trilium server.
I've assumed you have created a DNS A record for `trilium.yourdomain.com` that you want to use for your Trilium server.
1. Download docker image and create container

@ -6,9 +6,9 @@ Example how this might be useful is `archived` label which hides its note from J
## Copying inheritance
A different kind of inheritance is achieved using `child:` attribute name prefix. We can define that when a note is created under a certain parent note then the new child note will automatically receive define attributes. The difference from standard inheritance is that these are real new attributes which are completely independent of the parent and will be therefore kept even if the note is moved elsewhere in the note tree.
A different kind of inheritance is achieved using `child:` attribute name prefix. We can define that when a note is created under a certain parent note then the new child note will automatically receive defined attributes. The difference from standard inheritance is that these are real new attributes which are completely independent of the parent and will be therefore kept even if the note is moved elsewhere in the note tree.
For defining the copy-attributes we use `child:` prefix in attribute name, the rest is defined normally. So as an example, when we create a child note in a note with `child:exampleAttribute` attribute, then the child note will have `exampleAttribute` created. This can be even chained, e.g. `child:child:exampleAttribute`, in this case `exampleAttribute` will be created in the child of the child.
For defining the copy-attributes we use `child:` prefix in attribute name, the rest is defined normally. So as an example, when we create a child note in a note with `#child:exampleAttribute` label, then the child note will have `#exampleAttribute` label. This can be even chained, e.g. `#child:child:exampleAttribute`, in this case `#child:exampleAttribute` will be created in the child and `#exampleAttribute` will be created in the child of the child.
Which kind of attribute inheritance (or if any at all) should be used depends on the specific use case.

@ -1,19 +1,18 @@
Note attributes are key-value records owned by (assigned to) given note.
There are four types of attributes:
There are 2 types of attributes:
* Labels - simple key-value text record
* Relation - specifies named relation (link) to another note
* Label and relation definition - these are described in [[Promoted attributes]] page
Sometimes we're talking about labels and relations - keep in mind that both of them are types of attributes.
[[images/attributes.png]]
## Labels
Labels are used for several things:
Labels can be used for several things:
* user can use them as labels with optional value - e.g. when catalogizing books, you might add labels like #year=1999, #genre=sci-fi, #author="Neal Stephenson"
* as labels with optional value - e.g. when cataloguing books, you might add labels like #year=1999, #genre="sci-fi", #author="Neal Stephenson"
* attributes can be used to configure some advanced features / settings - see below
* plugins / scripts can use these to mark notes with some special values / metadata (e.g. [[Weight Tracker]] will have "weight" attribute on [[day notes]] based on whose it can create chart).
@ -40,6 +39,15 @@ The following labels are used for advanced configuration:
* `cssClass` - value of this label is then added as CSS class to the node representing the given note in the tree. This can be useful for advanced [[theming|themes]]. 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. An example might be `bx bx-home` - icons are taken from [boxicons](https://boxicons.com/). Can be used in [[template]] notes.
* `customRequestHandler` and `customResourceProvider` - see [[Custom request handler]]
* `widget` - see [[Custom widget]],
* `workspace`, `workspaceIconClass`, `workspaceTabBackgroundColor` - see [[Workspace]
* `searchHome` - new search notes will be created as children of this note (otherwise they are created in [[Day notes]])
* `hoistedSearchHome` - new search notes will be created as children of this note when hoisted to some ancestor of this note
* `inbox` - default inbox location for new notes
* `hoistedInbox` - default inbox location for new notes when hoisted to some ancestor of this note
* `sqlConsoleHome` - default location of SQL console notes
* `bookmarked` and `bookmarkFolder` - see [[Bookmarks]]
* `shareXXX` labels described in [[Sharing]]
## Relations
Relation is a kind of link between two notes.
@ -62,10 +70,15 @@ Other relations:
* `template` - attached note's attributes will be inherited even without parent-child relationship. See [[template]] for details.
* `renderNote` - notes of type "render HTML 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` - target of this relation will be executed and rendered as a widget in the sidebar
* `shareXXX` relations described in [[Sharing]]
## Multiplicity
Attributes allow multiplicity - there can be multiple attributes with the same name. We're then calling such attributes "multi valued".
Attributes allow multiplicity - there can be multiple attributes with the same name. We're then calling such attributes "multivalued".
## Attribute definitions / promoted attributes
Special kind of labels are used to create "label/attribute" definitions. See [[Promoted attributes]] for details.
## Attribute inheritance

@ -7,7 +7,7 @@ Trilium supports simple backup scheme where it saves copy of the [[document]] on
So in total you'll have at most 4 backups from different points in time which should protect you from various problems. These backups are stored by default in `backup` directory placed in the [[data directory]].
This is only very basic backup solution and you're encouraged to add some better backup solution - e.g. backing up the [[document]] to cloud / different computer etc.
This is only very basic backup solution, and you're encouraged to add some better backup solution - e.g. backing up the [[document]] to cloud / different computer etc.
Note that [[synchronization]] provides also some backup capabilities by its nature of distributing the data to other computers.
@ -25,3 +25,18 @@ Let's assume you want to restore the weekly backup, here's how to do it:
* start Trilium again
If you have configured sync then you need to do it across all members of the sync cluster, otherwise older version (restored backup) of the document will be detected and synced to the newer version.
# Disabling backup
Although this is not recommended, it is possible to disable backup in `config.ini` in the [[data directory]]:
```ini
[General]
... some other configs
# set to true to disable backups (e.g. because of limited space on server)
noBackup=true
```
See [sample config](https://github.com/zadam/trilium/blob/master/config-sample.ini).

@ -1,11 +1,9 @@
Book [[note]] is a type of note which displays all its children's content in a linear fashion so you can read note sub tree like a book. This can be useful for reading many smaller notes. Seeing an example might explain this concept better:
Book [[note]] is a type of note which displays all its children's content in a linear fashion, so you can read note subtree like a book. This can be useful for reading many smaller notes. Seeing an example might explain this concept better:
[[images/book-note.png]]
Notice in the tree on the left pane how "node.js" note has some children and these are then displayed on the right pane.
This note type can be zoomed out like this:
You can also switch to "grid view" in the Book properties:
[[images/book-note-pictures.png]]
Note that book note is available since Trilium 0.36

13
Bookmarks.md Normal file

@ -0,0 +1,13 @@
To easily access selected notes, you can bookmark them. See demo:
[[gifs/bookmarks.gif]]
What this technically does is that it add a `#bookmarked` label to the note.
## Bookmark folder
Space in the left panel is limited, and you might want to bookmark many items. One possible solution is to bookmark a folder, so it shows its children:
[[images/bookmark-folder.png]]
To do this, you need to add a `#bookmarkFolder` label to the note.

@ -1,7 +1,7 @@
## Motivation
Trilium's core feature is the ability to structure your notes into hierarchical tree-like structure.
It is expected then that you'll have an elaborate and deep note hierarchy - each sub-tree will represent a more refined and specialized view of your knowledge base.
It is expected then that you'll have an elaborate and deep note hierarchy - each subtree will represent a more refined and specialized view of your knowledge base.
This is a pretty powerful approach, but it also carries a hidden assumption that each "subtopic" is "owned" by one parent. I'll illustrate this with an example - let's say my basic structure is this:
@ -13,14 +13,15 @@ This is a pretty powerful approach, but it also carries a hidden assumption that
* Linux
* Windows
Now, I'm starting to learn about [Bash](https://en.wikipedia.org/wiki/Bash_(Unix_shell)) and would like to create notes related to this topic. But now I'm facing a problem of where to "categorize" this. The issue here is that Bash is both a programming language and a tool (shell) very much tied into Linux. It seems it belongs to both of these, I can't (and don't want to) choose one over the other.
Now, I'm starting to learn about [Bash](https://en.wikipedia.org/wiki/Bash_(Unix_shell)) and would like to create notes related to this topic. But now I'm facing a problem of where to categorize this. The issue here is that Bash is both a programming language and a tool (shell) very much tied into Linux. It seems it belongs to both of these, I can't (and don't want to) choose one over the other.
## Solution
The solution to the problem shown above is to allow notes to have multiple parents.
I call these "clones", but that is a bit misleading - there's no original and cloned note - the notes in both of the parents categories are identical.
Another misleading thing about "cloning" is that it suggests that a copy of the note has been made. That's not really true, the note itself stays in just one file, but they are just referenced in multiple places in the note hierarchy. So changing it in one category changes it in all the others, because they're all the same file.
Another misleading thing about "cloning" is that it suggests that a copy of the note has been made. That's not really true, the note itself stays in just one original, it is just referenced in multiple places in the tree hierarchy. So changing it in one category changes it in all the others, because they're all the same note.
Here's the final structure with cloning:
* Technology
@ -28,33 +29,31 @@ Here's the final structure with cloning:
* Kotlin
* JavaScript
* Bash
* some subnotes ...
* some sub-notes ...
* Operating systems
* Linux
* Bash
* some subnotes ...
* some sub-notes ...
* Windows
So now the "Bash" sub-tree appears on multiple locations in the hierarchy. Both the Bash sub-trees are the same and contain the same sub-categories and notes.
So now the "Bash" subtree appears on multiple locations in the hierarchy. Both the Bash subtrees are the same and contain the same sub-categories and notes.
### Demo
[[gifs/create-clone.gif]]
In the demo, you can see how a clone can be created using the context menu. It's possible to do this also using the Add Link dialog or with CTRL+C and CTRL+V [[shortcuts|keyboard shortcuts]].
You can also notice how after creating the clone, all clones are highlighted. This is so you can easily see which notes are cloned into other locations in the hierarchy.
As seen in the demo, you can view the list of all available clones in the "Note Paths" tab in the Ribbon toolbar.
Please note: in more recent versions, titles of cloned notes in the tree view have an asterisk to the right. The location for finding the clones within a category has also been changed to a drop-down menu that you can find at the top of the category tree-view when you've selected a cloned category. The reason for this change is documented in [issue 1139](https://github.com/zadam/trilium/issues/1139#issuecomment-651582746).
![Example of finding new cloned category paths](https://user-images.githubusercontent.com/617641/86092919-7c420a00-baae-11ea-93dd-f7abbc9125b6.png)
Titles of cloned notes in the tree view have an asterisk to the right to easily see that the note is also placed into some other location.
## Prefix
Since notes can be categorized into multiple places, it's recommended to choose a generalized name that fits into all locations instead of something more specific to avoid confusion. In some cases this isn't possible so Trilium provides "branch prefixes", which is shown before the note name in the tree and as such provides a specific kind of context. The prefix is location specific so it's displayed only in the tree pane.
Since notes can be categorized into multiple places, it's recommended to choose a generalized name that fits into all locations instead of something more specific to avoid confusion. In some cases this isn't possible so Trilium provides "branch prefixes", which is shown before the note name in the tree and as such provides a specific kind of context. The prefix is location specific, so it's displayed only in the tree pane.
## Deleting notes/clones
With clones it might not be immediately obvious how deleting works.
With clones, it might not be immediately obvious how deleting works.
If you try to delete a note, it works like this:

@ -11,7 +11,7 @@ This can be useful for few things:
## Extra languages
Trilium supports syntax highlighting for many languages, but by default displays only some of them (to reduce number of items). You can add extra languages in Options -> Code notes (available since Trilium 0.35).
Trilium supports syntax highlighting for many languages, but by default displays only some of them (to reduce number of items). You can add extra languages in Options -> Code notes.
## Code blocks

@ -27,12 +27,12 @@ else {
This script note has also following two attributes:
* label `customRequestHandler` with value `create-note`
* relation `targetNote` pointing to a note where new notes should be saved
* label `#customRequestHandler` with value `create-note`
* relation `~targetNote` pointing to a note where new notes should be saved
### Explanation
Let's test this by using a HTTP client to send a request:
Let's test this by using an HTTP client to send a request:
```http request
POST http://my.trilium.org/custom/create-note
@ -49,7 +49,7 @@ Notice the `/custom` part in the request path - Trilium considers any request wi
Trilium will then find our code note created above and execute it. `api.req`, `api.res` are set to [request](https://expressjs.com/en/api.html#req) and [response](https://expressjs.com/en/api.html#res) objects from which we can get details of the request and also respond.
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.
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]].
@ -57,9 +57,9 @@ Once we pass these checks we will just create the desired note using [[Script AP
Another common use case is that you want to just expose a file note - in such case you create label `customResourceProvider` (value is again path regex).
Note: The file that is supposed to be exposed needs to wear an "#customResourceProvider="fonts/myFont.woff"
For example, your file is in custom/fonts, you can call it via `custom/fonts/myFont.woff`
But only if `myFont.woff` wears the `customRessourceProvider` label. Otherwise, nothing would be found.
Note: The file that is supposed to be exposed needs to have a label `#customResourceProvider="fonts/myFont.woff`
For example, your file is in custom/fonts, you can call it via `custom/fonts/myFont.woff`.
## Advanced concepts
@ -79,7 +79,7 @@ The last part is dynamic so the matching of the URL must also be dynamic - for t
notes/([0-9]+)
```
Additionally this also defines a matching group with the use of parenthesis which then makes it easier to extract the value. The matched groups are available in `api.pathParams`:
Additionally, this also defines a matching group with the use of parenthesis which then makes it easier to extract the value. The matched groups are available in `api.pathParams`:
```javascript
const noteId = api.pathParams[0];

@ -8,27 +8,23 @@ Positions are:
## Example - word count widget
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**.
```javascript
/*
* This defines a custom widget which displays number of sentences, words, and characters in a current text note.
* This defines a custom widget which displays number of words and characters in a current text note.
* To be activated for a given note, add label 'wordCount' to the note, you can also make it inheritable and thus activate it for the whole subtree.
*
* See it in action in "Books" and its subtree.
*/
const TPL = `<div style="contain: none; padding: 10px; border-top: 1px solid var(--main-border-color);">
<i>Word count: </i>
<strong><span class="word-count"></span></strong>
const TPL = `<div style="padding: 10px; border-top: 1px solid var(--main-border-color); contain: none;">
<strong>Word count: </strong>
<span class="word-count"></span>
&nbsp;
<i>Character count: </i>
<strong><span class="character-count"></span></strong>
&nbsp;
<i>Sentence count: </i>
<strong><span class="sentence-count"></span></strong>
<strong>Character count: </strong>
<span class="character-count"></span>
</div`;
class WordCountWidget extends api.TabAwareWidget {
@ -36,32 +32,28 @@ class WordCountWidget extends api.TabAwareWidget {
get parentWidget() { return 'center-pane'; }
isEnabled() {
return super.isEnabled()
&& note.type === 'text'
&& note.hasLabel('wordCount');
}
doRender() {
this.$widget = $(TPL);
this.$wordCount = this.$widget.find('.word-count');
this.$characterCount = this.$widget.find('.character-count');
this.$sentenceCount = this.$widget.find('.sentence-count');
return this.$widget;
}
async refreshWithNote(note) {
if (note.type !== 'text' || !note.hasLabel('wordCount')) {
// show widget only on text notes and when marked with 'wordCount' label
this.toggleInt(false); // hide
return;
}
this.toggleInt(true); // display
const {content} = await note.getNoteComplement();
const text = $(content).text(); // get plain text only
const counts = this.getCounts(text);
this.$wordCount.text(counts.words);
this.$characterCount.text(counts.characters);
this.$sentenceCount.text(counts.sentences);
}
getCounts(text) {
@ -79,8 +71,8 @@ class WordCountWidget extends api.TabAwareWidget {
}
const characters = chunks.join('').length;
const sentences = text.split(/\s+[^.!?]*[.!?]/g).length;
return {words, characters, sentences};
return {words, characters};
}
async entitiesReloadedEvent({loadResults}) {

@ -20,7 +20,7 @@ Data directory is normally named `trilium-data` and it is stored in:
* user's home is a fallback if some of the paths above don't exist
* user's home is also a default setup for [[docker|Docker server installation]]
If you want to backup your Trilium data, just backup this single directory - it contains everything you need.
If you want to back up your Trilium data, just backup this single directory - it contains everything you need.
### Changing the location of data directory

@ -1,4 +1,4 @@
A common pattern in note taking is that a lot of notes will be centered around a certain date - e.g. you have some tasks which needs to be done on a certain date, you have meeting minutes from a certain date, you have your thoughts etc. and it all revolves around a date on which they occurred. For this reason, it makes sense to create a certain "day workspace" which will centralize all those notes relevant for a certain date.
A common pattern in note-taking is that a lot of notes will be centered around a certain date - e.g. you have some tasks which needs to be done on a certain date, you have meeting minutes from a certain date, you have your thoughts etc. and it all revolves around a date on which they occurred. For this reason, it makes sense to create a certain "day workspace" which will centralize all those notes relevant for a certain date.
For this, Trilium provides a concept of "day note". Trilium semi-automatically generates a single note for each day. Under this note you can save all those relevant notes.
@ -10,7 +10,7 @@ This pattern works well also because of [[cloning|Cloning notes]] functionality
## Demo
[[images/day-notes.png]]
You can see the structure of day notes appearing under "Journal" note - there's a note for the whole year 2017, under it you have "12 - December" which then contains "18 - Monday". This is our "day note" which contains some text in its content and also has some child notes (some of them are from [[Task manager]]).
You can see the structure of day notes appearing under "Journal" note - there's a note for the whole year 2017, under it, you have "12 - December" which then contains "18 - Monday". This is our "day note" which contains some text in its content and also has some child notes (some of them are from [[Task manager]]).
You can also notice how this day note has [[promoted attribute|Promoted attributes]] "weight" where you can track your daily weight. This data is then used in [[Weight tracker]].
@ -38,6 +38,6 @@ It's possible to customize the title of generated date notes by defining a `#dat
Trilium has some special support for day notes in the form of [backend Script API](https://zadam.github.io/trilium/backend_api/BackendScriptApi.html) - see e.g. getDateNote() function.
Day (and year, month) notes are created with a label - e.g. `#dateNote=2018-08-16` this can then be used by other scripts to add new notes to day note etc.
Day (and year, month) notes are created with a label - e.g. `#dateNote="2018-08-16"` this can then be used by other scripts to add new notes to day note etc.
Journal also has relation `child:child:child:template=Day template` (see [[attribute inheritance]]) which effectively adds [[template]] to day notes (grand-grand-grand children of Journal).

12
Desktop installation.md Normal file

@ -0,0 +1,12 @@
If you want to use Trilium on the desktop, download binary release for your platform from [latest release](https://github.com/zadam/trilium/releases/latest), unzip the package and run `trilium` executable.
# Startup scripts
There are also some other options to start Trilium:
* `trilium-no-cert-check` - Trilium will not validate the certificates, useful e.g. when you're syncing against a sync server with self-signed certificate
* `trilium-portable` - Trilium will try to create [[data directory]] in the trilium's directory
* `trilium-safe-mode` - start up in "safe mode" which disables any startup scripts which might e.g. crash the application
# Synchronization
If you are using a desktop instance and would like to sync with your server instance: [[Synchronization]]

@ -1,4 +0,0 @@
If you want to use Trilium on the desktop, download binary release for your platform from [latest release](https://github.com/zadam/trilium/releases/latest), unzip the package and run `trilium` executable.
# Synchronization
If you are using a desktop instance and would like to sync with your server instance: [[Synchronization]]

@ -16,7 +16,7 @@ When you run Trilium for the first time, it will generate a demo document for yo
### Restoring demo document
In some cases you might want to take a look at the demo document after you deleted it. Or you might want to see if there was something added (sometimes we add a new feature demonstration into demo document). In such case you can just [download .zip archive](https://github.com/zadam/trilium/raw/stable/db/demo.zip) of the latest document and import it somewhere into the tree (right click on a note where you want to import the demo document and choose "Import").
In some cases you might want to take a look at the demo document after you deleted it. Or you might want to see if there was something added (sometimes we add a new feature demonstration into demo document). In such case you can just [download .zip archive](https://github.com/zadam/trilium/raw/stable/db/demo.zip) of the latest document and import it somewhere into the tree (right-click on a note where you want to import the demo document and choose "Import").
## Manually modifying the document

@ -7,7 +7,7 @@ To export ENEX file, you need to have desktop version of Evernote (i.e. not web/
Once you have ENEX file, you can import it to Trilium. Right click on some note (to which you want to import the file), click on "Import" and select the ENEX file.
After importing the ENEX file, go over the imported notes and resources to be sure the import went well and you didn't lose any data.
After importing the ENEX file, go over the imported notes and resources to be sure the import went well, and you didn't lose any data.
## Limitations

16
FAQ.md

@ -1,14 +1,14 @@
# Mac OS support
Originally, desktop builds of Trilium Notes has been available for Windows & Linux,
but there has been a considerable demand for Mac OS build.
but there has been a considerable demand for macOS build.
So I made one, but I underestimated the differences and specifics of Mac platform which seems
to require special handling in several places. My lack of knowledge and frankly
willingness to learn & code Mac specific functionality resulted in a current state
where [Trilium does not integrate well into the OS](https://github.com/zadam/trilium/issues/511).
Mac OS build is from now on considered "unsupported". I will strive to keep it fundamentally functional,
macOS build is from now on considered "unsupported". I will strive to keep it fundamentally functional,
but I won't work on Mac specific features or integrations.
Note that this is more of an acknowledgment of an existing state rather than sudden change of direction.
@ -25,12 +25,12 @@ For Chinese, there's an unofficial fork [here](https://github.com/Nriver/trilium
Common request is to allow multiple users collaborate, share notes etc. So far I'm resisting this because of these reasons:
* it's a huge feature, or rather a Pandora's box of collaboration features like user management, permissions, conflict resolution, real-time editing of a note by multiple people etc. This would be a huge amount of work. Trilium Notes is project made mostly by one person in free time and that's unlikely to change in the future.
* given its size it would probably pivot the attention away from my main focus which is a personal note taking
* the assumption that only single person has access to the app simplifies many things, or just outright makes them possible. In multi-user app, our [[scripting|scripts]] support would be a XSS security hole, while with the single user assumption it's an endless customizability tool.
* given its size it would probably pivot the attention away from my main focus which is a personal note-taking
* the assumption that only single person has access to the app simplifies many things, or just outright makes them possible. In multi-user app, our [[scripting|scripts]] support would be a XSS security hole, while with the single user assumption it's an endless customizable tool.
# How to open multiple documents in one Trilium instance
This is normally not supported - one Trilium process can open only a single instance of a [[document]]. However you can run two Trilium processes (from one installation), each connected to a separate document. To achieve this, you need to set a location for the [[data directory]] in the `TRILIUM_DATA_DIR` environment variable and separate port on `TRILIUM_PORT` environment variable. How to do that depends on the platform, in Unix-based systems you can achieve that by running command such as this:
This is normally not supported - one Trilium process can open only a single instance of a [[document]]. However, you can run two Trilium processes (from one installation), each connected to a separate document. To achieve this, you need to set a location for the [[data directory]] in the `TRILIUM_DATA_DIR` environment variable and separate port on `TRILIUM_PORT` environment variable. How to do that depends on the platform, in Unix-based systems you can achieve that by running command such as this:
```shell
TRILIUM_DATA_DIR=/home/me/path/to/data/dir TRILIUM_PORT=12345 trilium
@ -53,7 +53,7 @@ The only supported way to sync Trilium's data across the network is to use a [[s
Trilium stores notes in a [[document]] which is an SQLite database. People often ask why doesn't Trilium rather use flat files
for note storage - it's fair question since flat files are easily interoperable, work with SCM/git etc.
Short answer is that file systems are simply not powerful enough for what we want to achieve with Trilium. Using filesystem would mean less features with probably more problems.
Short answer is that file systems are simply not powerful enough for what we want to achieve with Trilium. Using filesystem would mean fewer features with probably more problems.
More detailed answer:
@ -61,6 +61,6 @@ More detailed answer:
* filesystems make a distinction between directory and file while there's intentionally no such difference in Trilium
* files are stored in no particular order and user can't change this
* Trilium allows storing note [[attributes]] which could be represented in extended user attributes but their support differs greatly among different filesystems / operating systems
* Trilium makes links / relations between different notes which can be quickly retrieved / navigated (e.g. for [[link map]]). There's no such support in file systems which means these would have to be stored in some kind of side car files (mini-databases).
* Filesystems are generally not transactional. While this is not completely required for a note taking application, having transactions make it way easier to keep notes and their metadata in predictable and consistent state.
* Trilium makes links / relations between different notes which can be quickly retrieved / navigated (e.g. for [[note map]]). There's no such support in file systems which means these would have to be stored in some kind of side-car files (mini-databases).
* Filesystems are generally not transactional. While this is not completely required for a note-taking application, having transactions make it way easier to keep notes and their metadata in predictable and consistent state.

@ -1,6 +1,6 @@
Trilium supports storing and displaying images. Supported formats are JPEG, PNG and GIF.
Image is actually type of [[note|Tree concepts#note]] placed into the note tree. It's reference can be copied into text note so it is displayed in the text itself.
Image is actually type of [[note|Tree concepts#note]] placed into the note tree. It's reference can be copied into text note, so it is displayed in the text itself.
## Uploading images
To add image to the note, simply drag it from file explorer onto the note editor inside Trilium and image will be uploaded.
@ -11,9 +11,7 @@ Alternatively you can click on block toolbar and then on "Insert image":
[[images/block-toolbar-insert-image.png]]
You can also copy paste image from web
- Version 0.41.5 and onwards: image will be downloaded and embedded
- Pre version 0.41.5: only the reference is copied and image copy won't be saved in Trilium. Image will not be available if it's deleted or moved from its original location (or you're offline). The workaround is to first save the image to your computer and then add it to Trilium with one of the methods mentioned above.
You can also copy and paste image from web - the image will be (asynchronously) downloaded and embedded.
## Compression

@ -1,6 +1,6 @@
This is supposed to be a complete list of keyboard shortcuts. Note that some of these may work only in certain contexts (e.g. in tree pane or note editor).
Since Trilium 0.38, it is possible to configure keyboard shortcuts in Options -> Keyboard shortcuts.
It is also possible to configure most keyboard shortcuts in Options -> Keyboard shortcuts.
## Note navigation
@ -11,7 +11,7 @@ Since Trilium 0.38, it is possible to configure keyboard shortcuts in Options ->
* `CTRL+.` - scroll to current note (useful when you scroll away from your note or your focus is currently in the editor)
* `BACKSPACE` - jumps to parent note
* `ALT+C` - collapse whole note tree
* `ALT+-` (alt with minus sign) - collapse sub-tree (if some subtree takes too much space on tree pane you can collapse it)
* `ALT+-` (alt with minus sign) - collapse subtree (if some subtree takes too much space on tree pane you can collapse it)
See demo of some of these features in [[note navigation|Note navigation]].

@ -1,4 +1,4 @@
As trilium can be run in Docker it also can be deployed in Kubernetes.
As Trilium can be run in Docker it also can be deployed in Kubernetes.
Trilium can be applied to Kubernetes manually or per helm chart.
The recommended way is helm.

@ -1,17 +0,0 @@
Link map is a visualization of links and relations incoming to and outgoing from a particular note.
This provides an insight into a structure ("web") of notes. You can open link map by clicking on "Note actions -> Link map".
[[images/link-map.png]]
There's several types of links:
* hyperlinks - internal hyperlinks from one text note to another note
* relations - relation [[attributes]]
* image links - this link represents inclusion of an image in a text note
* relation map links - this link represents inclusion of a note in a [[relation map]]
[[Relation map]] is a similar concept, with some differences:
* link map is automatically generated while relation map must be created manually
* relation map is a type of note while a link map is just virtual visualization

@ -26,6 +26,6 @@ Alternatively if you only wish to quickly preview the content, you can hover ove
Trilium also provides "inline" linking - type `@` and you'll see an autocomplete, just type few characters from the desired note title, press enter and you have a link.
## Link map
## Note map
Trilium provides a visualisation of incoming and outgoing links for a particular note. See [[link map]] for details.
Trilium provides a visualisation of incoming and outgoing links for a particular note. See [[note map]] for details.

@ -2,7 +2,7 @@ This page describes manually installing Trilium on your server.
## Requirements
Trilium is a [node.js](http://nodejs.org/) application. Supported (tested) version of node.js is latest 10.X.X (note that node.js 10 older than 10.5.0 are buggy and don't work).
Trilium is a [node.js](http://nodejs.org/) application. Supported (tested) version of node.js is latest 14.X.X and 16.X.X. Trilium might work with older versions as well.
You can check your node version with this command (node.js needs to be installed):
~~~~

@ -30,4 +30,4 @@ Trilium decides automatically whether to use mobile or desktop frontend. If this
# Scripting
You can alter the behavior with [[scripts]] just like for normal frontend. For script notes to be executed, they need to have label `#run=mobileStartup`.
You can alter the behavior with [[scripts]] just like for normal frontend. For script notes to be executed, they need to have labeled `#run=mobileStartup`.

@ -4,4 +4,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 navigation#Jump-to-note]] to just notes present in hoisted subtree.
Trilium supports this feature since version 0.26. Up to 0.45 note hoisting was global, from 0.46 it is per tab.
See also [[Workspace]] which extends this feature.

23
Note map.md Normal file

@ -0,0 +1,23 @@
Note map is a visualization of connections between notes.
This provides an insight into a structure ("web") of notes.
There are two types of note map:
## Link Map
Shows [[relations|attributes]] between notes:
[[images/link-map.png]]
## Tree Map
Shows hierarchical map of notes:
[[images/tree-map.png]]
## See also
[[Relation map]] is a similar concept, with some differences:
* note map is automatically generated while relation map must be created manually
* relation map is a type of note while a link map is just virtual visualization

@ -6,8 +6,6 @@ You can use alt-left and alt-right to move back and forward in history of viewed
This works identically to browser backwards / forwards, it's actually using built-in browser support for this.
Of course this is basic and expected functionality, but it's worth mentioning that Trilium plays nicely here.
[[gifs/back-and-forwards.gif]]
## Jump to note
@ -21,7 +19,7 @@ Then type part of the note name and autocomplete will help you pick the desired
Jump to note also has the ability to show the list of recently viewed / edited notes and quickly jump to it.
To access this functionality, click on `Jump to` button on the top. By default (when nothing is entered into autocomplete), this dialog will show the list of recent notes.
To access this functionality, click on `Jump to` button on the top. By default, (when nothing is entered into autocomplete), this dialog will show the list of recent notes.
Alternatively you can click on the "time" icon on the right.

@ -1,11 +1,9 @@
Trilium supports seamless versioning of notes by storing snapshots ("revisions") of notes at regular intervals.
Time interval of taking note snapshot is configurable in the Options dialog. This provides a tradeoff between more revisions and more data to store.
Time interval of taking note snapshot is configurable in the Options -> Other dialog. This provides a tradeoff between more revisions and more data to store.
To turn off note versioning for particular note (or subtree), add `disableVersioning` [[label|Attributes]] to the note.
To turn off note versioning for a particular note (or subtree), add `disableVersioning` [[label|Attributes]] to the note.
Note revisions can be accessed through note detail menu.
Note revisions can be accessed through the button on the right of ribbon toolbar.
[[images/note-revisions.png]]
Above you can see list of 3 note revisions for given note.

20
Note.md

@ -1,9 +1,5 @@
Note is a central entity in Trilium. Main attributes of note are title and content.
Importantly, note itself doesn't carry information on its placement in note tree.
Tree structure of notes can resemble file system - but compared to that notes in Trilium can act as both file and directory - meaning that note can both have its own content and have children. "Leaf note" is a note which doesn't have any children.
### Note types
* [[text note|Text notes]] - this is default note type which allows you to put rich text, images etc.
@ -11,28 +7,32 @@ Tree structure of notes can resemble file system - but compared to that notes in
* [image note](https://github.com/zadam/trilium/wiki/Images) - represents single image
* file note - represents uploaded file (e.g. docx MS Word document).
* render HTML note - this works as an output screen of attached [[scripts]]
* saved search note - contains saved search query and dynamically displays result of the search as its sub-notes
* [[saved search]] note - contains saved search query and dynamically displays result of the search as its sub-notes
* [[relation map]] note - visualizes notes and their relations
* [[book note]] - displays its children notes, useful for reading many short notes
Remember there's no "folder" note type. Any note can be folder or "leaf" note.
In Trilium there's no specific "folder" note type. Any note can have children and thus be a folder.
### Root note
There's one special note called "root note" which is root of the note tree. All other notes are placed below it in the structure.
### Deleting / undeleting notes
### Tree structure
_Description below is valid only since Trilium 0.40_
Importantly, note itself doesn't carry information on its placement in note tree. See [[cloning]] for details.
Tree structure of notes can resemble file system - but compared to that notes in Trilium can act as both file and directory - meaning that note can both have its own content and have children. "Leaf note" is a note which doesn't have any children.
### Deleting / undeleting notes
When you delete a note in Trilium, it is actually only marked for deletion (soft-delete) - the actual content, title, attributes etc. are not deleted, only hidden.
Within (by default) 7 days, it is possible to undelete these soft-deleted notes - open Recent Changes dialog and you will see a list of all modified notes including the deleted ones. Notes available for undeletion have a link to do so. This is kind of "trash can" functionality known from e.g. Windows.
Within (by default) 7 days, it is possible to undelete these soft-deleted notes - open Recent Changes dialog, and you will see a list of all modified notes including the deleted ones. Notes available for undeletion have a link to do so. This is kind of "trash can" functionality known from e.g. Windows.
Clicking an undelete will recover the note, it's content and attributes - note should be just as before being deleted. This action will also undelete note's children which have been deleted in the same action.
To be able to undelete a note, it is necessary that deleted note's parent must be undeleted (otherwise there's no place where we can undelete it to). This might become a problem when you delete more notes in succession - the solution is then undelete in the reverse order of your deletion.
After the 7 days (configurable) the notes will be "erased" - their title, content, revisions and attributes will be erased and it will not be possible anymore to recover them (unless you restore [[backup]]).
After the 7 days (configurable) the notes will be "erased" - their title, content, revisions and attributes will be erased, and it will not be possible anymore to recover them (unless you restore [[backup]]).
## See also

@ -1,112 +0,0 @@
**This document describes search syntax as used in versions 0.43 and older. For up-to-date syntax see [[Search]].**
Trilium supports searching in notes. There are several ways to search notes:
* 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.
* full text search - search in text and [[code note|code notes]] content. Since this is implemented as a database search, this works only for not protected notes (doesn't matter if you're in protected session or not)
* [[attribute|Attributes]] search - you can e.g. search for notes having certain label - see *Attribute query syntax* below.
* you can save search string (composed of either fulltext or attribute search) into so-called "saved search" note. If you expand this note, you will see the search results as child notes.
* saved search can also reference [[script|scripts]] through relation - upon expanding, the script will provide a list of results
You can activate search by clicking on magnifier icon on the left or pressing `CTRL-S` keyboard [[shortcut|keyboard shortcuts]].
## Fulltext
Fulltext search is triggered whenever search string doesn't start with `@` (used in attribute search) or `=` (saved search with script).
Fulltext searches on both title and content of undeleted, unprotected text and code notes which are not [[archived|archived notes]].
Input string is tokenized by whitespace separators and each individual token (word) must be present in the title or content. If you don't want this automatic tokenization, you can surround your search with double quotes, e.g. `"hello world"` will search for exact match.
## Attribute query syntax
### Standard attributes
Here you query by standard [[attributes]]:
* `@abc` - returns notes with label abc
* `@!abc` - returns notes which don't have label abc
* `@year=2019` - matches notes with label `year` having value `2019`
* `@year!=2019` - matches notes with label `year`, but not having value 2019 or not having label `year` at all.
* if you want to express condition that note must have `year` label, but not value 2019, then you can do that with `@year @year!=2019`
* `@year<=2000` - return notes with label `year` having value 2000 or smaller. `>`, `<`, `>=` and `<=` are supported.
* In this case parameter can be parsed as a number so number-wise comparison is done. But it's also possible to compare strings lexicographically in the same way. This is useful for comparing dates as seen below.
* `@rock @pop` - matches notes which have both `rock` and `pop` labels
* `@rock and @pop` is an alternative syntax for the same thing
* `@rock or @pop` - only one of the labels must be present
* `and` has a precedence over `or` in case both operators are used in a search string
* `@frontMan=*John` - matches notes where `frontMan` label starts with "John". There's also `!=*` for "doesn't start with", `*=` for "ends with" and `!*=` for "does not end with", `*=*` for "contains" and `!*=*` for "does not contain"
### Virtual attributes
It's also possible to query by so called "virtual attributes":
* `dateCreated` - local date of note's creation date in YYYY-MM-DD HH:mm:ss.sss+OOPP where OOPP are hours and minutes of offset compared to UTC (e.g. "+0100" for Central European Time)
* `dateModified` - local date of last note's modification in YYYY-MM-DD HH:mm:ss.sss+OOPP
* `utcDateCreated` - UTC date of note's creation date in YYYY-MM-DD HH:mm:ss.sssZ
* `utcDateModified` - UTC date of last note's modification date in YYYY-MM-DD HH:mm:ss.sssZ
* `noteId`
* `isProtected` - 1 if the note is protected, 0 otherwise
* `title` - useful if you want to search title separately
* `content`
* `type` - `text`, `code`, `image`, `file`, `search` or `relation-map`
* `mime` - e.g. `text/html` for text note
* `text` - fulltext attribute of both title and content together
* For example `@text*=*Hello`. So that you can combine searching for both text and attributes.
* `isArchived` - filters only for [[archived notes]], `@!archived` then filters only for non-archived notes. Note that this filter does not work in OR relation, it is always AND.
* `in` - for example `@in=VuvLpfAPx2L9` will filter only notes which have note with noteId `VuvLpfAPx2L9` as one of the ancestors - i.e. note is in the subtree of `VuvLpfAPx2L9`. With negating operator - `@in!=VuvLpfAPx2L9` will filter notes which don't have note `VuvLpfAPx2L9` as their ancestor. Since Trilium 0.37
### Order and limit
It's possible to order the results by one or more attribute, e.g. `@orderBy=year,-genre` will order notes by `year` label in ascending order and then by `genre` label in descending order (because of `-` sign).
You can also limit the number of results using e.g. `@limit=1` will return only the first result. If there's no `limit`, then all notes are returned.
### Date comparisons
Attribute values are untyped strings which means that although you can save into it any kind of value like number or date, Trilium doesn't really know what kind of value it is and can't really treat it properly.
Fortunately if we stick to storing dates in YYYY-MM-DD format, we can still do quite a lot since such dates can be correctly compared as strings - e.g. `@dateCreated>=2015-01-01` will return notes which were created since 2015 even though Trilium is doing just string comparison.
What if you want to find notes created in 2015? You can use "starts with" operator (`=*`) like this: `@dateCreated=*2019` - this will match notes with label starting with string "2019" which all notes created in that year will satisfy.
### Smart filters
Trilium supports few special values which will might help you with some search queries:
* `NOW` means this instant to second precision, e.g. `2019-04-01 10:12:54`
* `NOW-3600` means 1 hour ago
* `TODAY` means today with the day precision, e.g. `2019-04-01`
* `TODAY-1` means yesterday, `TODAY+1` means tomorrow
* `MONTH` means this month, e.g. `2019-04`
* `MONTH-1` means last month - i.e. `2019-03`
* `YEAR` means current year, e.g. `2019`
* `YEAR-1` means last year - 2018
Using this you can create queries like:
* `@dateModified>=NOW-3600` - show me notes changed in the last hour
* `@dateCreated=*TODAY-1` - show me notes created during whole yesterday
## Saved search
Trilium provides a way to save common search as a note in the note tree. Search results will then appear as subnotes of this "saved search" note. You can see how this works in action:
[[gifs/saved-search.gif]]
### Saved search with script relation
If saved search string starts with `=`, then the following string is taken as a relation name and the target script is executed to get the list of note results.
So let's say the search string is `=handler`, then Trilium tries to find this saved note's relation with name "handler". Relation is expected to point to [[script|scripts]] which is then executed - script is expected to return a list of notes which should be presented as search results. This option exists for use cases where normal attribute/fulltext search doesn't cover all needs.
## Auto trigger search from URL
Opening Trilium like in the example below will open search pane and automatically trigger search for "abc":
```
http://localhost:8080/#search=abc
```

@ -63,7 +63,7 @@ Error: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required b
at tryModuleLoad (module.js:505:12)
```
If you get an error like this, you need to either upgrade your glibc (typically by upgrading to up to date distribution version) or use some other [[server installation]] method.
If you get an error like this, you need to either upgrade your glibc (typically by upgrading to up-to-date distribution version) or use some other [[server installation]] method.
## TLS

@ -18,12 +18,12 @@ My rule of thumb for estimation of size of personal knowledge base is that you c
#### Lazy hierarchy
My approach to creating the hierarchy is being lazy - I don't create the structure first and then fill it with notes, instead I create single note for some specific topic and start using this one note. Once the content starts to grow and I see how *some* parts could be split out, I move them out into separate sub notes. As an example I have a book review for *The Fellowship of the Ring*:
My approach to creating the hierarchy is being lazy - I don't create the structure first and then fill it with notes, instead I create single note for some specific topic and start using this one note. Once the content starts to grow, and I see how *some* parts could be split out, I move them out into separate sub notes. As an example I have a book review for *The Fellowship of the Ring*:
* Book reviews
* The Fellowship of the Ring
The note contains basic book info (author, publisher etc.), book highlights with the comments and then overall review. Now it turns out there's far too many book highlights and overall review is also rather long so I want to change the structure to the following:
The note contains basic book info (author, publisher etc.), book highlights with the comments and then overall review. Now it turns out there's far too many book highlights and overall review is also rather long, so I want to change the structure to the following:
* Book reviews
* The Fellowship of the Ring &nbsp; &nbsp; &nbsp; *(still contains basic info)*
@ -34,7 +34,7 @@ If I used standard text file stored in a filesystem I would soon run into an ann
### Sorting notes into multiple places in the hierarchy
While organizing the notes into the hierarchy, you very quickly run into a dilemma - your note seem to belong to two places in the hierarchy equally. As an example - you want to make a note about [bash](https://en.wikipedia.org/wiki/Bash_(Unix_shell)) - does it belong to "OS / Linux" or "Programming / Scripting languages"? This is actually a false dichotomy forced down by the limits of the basic tree hierarchy - the answer is *of course it belongs to both*. This is the reason why Trilium doesn't use standard tree structure (which requires every note to have exactly one parent), but an extension which allows every note to have several parents, thus effectively allowing it to appear in multiple places in the hierarchy. For lack of better term I call this "[cloning](https://github.com/zadam/trilium/wiki/Cloning-notes)". The main problem with this term is that it suggests that each clone must have an original, but here all clones are completely equal - effectively there's no original.
While organizing the notes into the hierarchy, you very quickly run into a dilemma - your note seem to belong to two places in the hierarchy equally. As an example - you want to make a note about [bash](https://en.wikipedia.org/wiki/Bash_(Unix_shell)) - does it belong to "OS / Linux" or "Programming / Scripting languages"? This is actually a false dichotomy forced down by the limits of the basic tree hierarchy - the answer is *of course it belongs to both*. This is the reason why Trilium doesn't use standard tree structure (which requires every note to have exactly one parent), but an extension which allows every note to have several parents, thus effectively allowing it to appear in multiple places in the hierarchy. For lack of better term I call this "[cloning](https://github.com/zadam/trilium/wiki/Cloning notes)". The main problem with this term is that it suggests that each clone must have an original, but here all clones are completely equal - effectively there's no original.
In tech lingo, it might be better to describe it as a [hard link](https://en.wikipedia.org/wiki/Hard_link) with an important difference that it is possible to hard link (clone) a directory (inner note).
@ -44,7 +44,7 @@ I have Trilium Notes opened non-stop. Sometimes I forget to lock my computer whe
### Archiving notes
Notes can lose relevancy with time - let's say I switch jobs - all the notes specific to the former employer immediately lose most of its import. This doesn't mean I want to delete these notes though - typically I just want them to somehow deprioritize - in Trilium I would do that by assigning an [inherited](https://github.com/zadam/trilium/wiki/Attribute-inheritance) [label](https://github.com/zadam/trilium/wiki/Attributes) ```archived``` to the company root note. The main effect of this label is that all the notes from this sub-tree are filtered out from search results (fast search via note autocomplete is my main [navigation approach](https://github.com/zadam/trilium/wiki/Note-navigation)). Apart from this, I also typically move such outdated notes to some less prominent place in the hierarchy.
Notes can lose relevancy with time - let's say I switch jobs - all the notes specific to the former employer immediately lose most of its import. This doesn't mean I want to delete these notes though - typically I just want them to somehow deprioritize - in Trilium I would do that by assigning an [inherited](https://github.com/zadam/trilium/wiki/Attribute inheritance) [label](https://github.com/zadam/trilium/wiki/Attributes) ```archived``` to the company root note. The main effect of this label is that all the notes from this sub-tree are filtered out from search results (fast search via note autocomplete is my main [navigation approach](https://github.com/zadam/trilium/wiki/Note navigation)). Apart from this, I also typically move such outdated notes to some less prominent place in the hierarchy.
I use archivation also for notes which are not very relevant from their creation - an example might be automatically imported reddit comments.
@ -52,7 +52,7 @@ Sometimes there's no clear *category* split between relevant and non-relevant no
* Credentials
* Personal
* OLD &nbsp; &nbsp; &nbsp; *(contains bunch of notes with credentials for services I don't use anymore)*
* OLD &nbsp; &nbsp; &nbsp; *(contains a bunch of notes with credentials for services I don't use anymore)*
* Gmail
* Github
* ...
@ -77,18 +77,18 @@ What notes do I keep under this day note?
* TODO list for given day (this can be automated - see [Task Manager](https://github.com/zadam/trilium/wiki/Task-manager))
* Personal diary
* [clones](https://github.com/zadam/trilium/wiki/Cloning-notes) of notes I created during this day (which kind of represents what I've been working on).
* [clones](https://github.com/zadam/trilium/wiki/Cloning notes) of notes I created during this day (which kind of represents what I've been working on).
* I often clone notes (or sub-trees) of e.g. projects I'm working on at given day so they are at hand
* I have some [scripts](https://github.com/zadam/trilium/wiki/Scripts) which allow me to track certain daily metrics (like weight). These are saved into one daily "data note" (actually JSON [code note](https://github.com/zadam/trilium/wiki/Code-notes)).
* I have other scripts which then help me to visualize these data (see a [Weight Tracker](https://github.com/zadam/trilium/wiki/Weight-tracker) example)
* I have other scripts which then help me to visualize these data (see a [Weight Tracker](https://github.com/zadam/trilium/wiki/Weight tracker) example)
* I have a script which automatically imports all my comments from reddit into the day note.
* People are sometimes wondering why. The answer is that I usually put some effort and thought into a comment and that's why I feel it's worth preserving, especially if it can be done automatically.
For most notes, this day note placement is *secondary* and their primary location is somewhere else (e.g. for a book review I've been working on it's *Book / Reviews*, not the day note). So for this pattern to work, ability to [clone](https://github.com/zadam/trilium/wiki/Cloning-notes) notes into multiple places is pretty fundamental.
For most notes, this day note placement is *secondary* and their primary location is somewhere else (e.g. for a book review I've been working on it's *Book / Reviews*, not the day note). So for this pattern to work, ability to [clone](https://github.com/zadam/trilium/wiki/Cloning notes) notes into multiple places is pretty fundamental.
### Projects
*Project* is pretty self explanatory, for me specifically it also means being long term (years) - an example of a project might be Trilium Notes or university studies. Given their longevity, projects can be large and deep, but their structure is very domain specific and I don't see any common patterns. What's pretty clear is they are often widely interconnected with other parts of the knowledge base - e.g. university credentials are cloned from "Credentials / University" top level notes and Trilium related blog posts are in "Blog / \[Name of the blog\] / Trilium".
*Project* is pretty self-explanatory, for me specifically it also means being long term (years) - an example of a project might be Trilium Notes or university studies. Given their longevity, projects can be large and deep, but their structure is very domain specific, and I don't see any common patterns. What's pretty clear is they are often widely interconnected with other parts of the knowledge base - e.g. university credentials are cloned from "Credentials / University" top level notes and Trilium related blog posts are in "Blog / \[Name of the blog\] / Trilium".
*Epics* are the same thing as projects, but differ in scope - they are typically several months long and as such are usually placed into a year note (e.g. *2018 / Epics*). Epics are often of work nature (also cloned into work note) and personal (e.g. currently I have large epic for moving to a different city).
@ -102,15 +102,15 @@ I keep all my credentials in the knowledge base, they are sorted into categories
This might seem creepy to some, but I keep a profile on most people. It contains pretty standard things like date of birth, contacts, address, but also current and previous employments, their hobbies and worldviews and sometimes even important (IM/mail/meatspace) conversations. Just about everything I find notable. It helps to refresh some basic info before meeting people, especially if you haven't been in touch in a while. It gets pretty awkward to ask for the tenth time where do they work for example, because you keep forgetting it.
Naturally I have a lot of (extended) family members, friends, acquaintances etc. so I need some way to sort them. My main method is to sort them by social circle (work, high school, sports club etc.), sometimes also by their town of residence. Family *circle* is still too large so the further organization is by *clan* (as in "Smiths"). Some people are members of several such circles so they are just cloned into multiple places.
Naturally I have a lot of (extended) family members, friends, acquaintances etc. so I need some way to sort them. My main method is to sort them by social circle (work, high school, sports club etc.), sometimes also by their town of residence. Family *circle* is still too large so the further organization is by *clan* (as in "Smiths"). Some people are members of several such circles, so they are just cloned into multiple places.
For family specifically it's pretty useful to create [relation map](https://github.com/zadam/trilium/wiki/Relation-map) to visualize relationships:
For family specifically it's pretty useful to create [relation map](https://github.com/zadam/trilium/wiki/Relation map) to visualize relationships:
[[images/relation-map-family.png|width=800]]
### Books
Of course I keep standard "To read" list. I also keep a record on the books I've read - typically one book has one subtree where the root has some basic info like author, page count, publication date, date started, date finished (in the form of [promoted labels](https://github.com/zadam/trilium/wiki/Promoted-attributes)). I also write a (private) review and keep list of highlights from Kindle, optionally with some commentary, these are usually stored in sub notes (unless they are pretty short).
Of course, I keep standard "To read" list. I also keep a record on the books I've read - typically one book has one subtree where the root has some basic info like author, page count, publication date, date started, date finished (in the form of [promoted labels](https://github.com/zadam/trilium/wiki/Promoted attributes)). I also write a (private) review and keep list of highlights from Kindle, optionally with some commentary, these are usually stored in sub notes (unless they are pretty short).
To keep the list of books manageable, I sort them per year (of reading them), this also gives me some basic overview of "reading performance" for given year. I plan to create a [script](https://github.com/zadam/trilium/wiki/Scripts) which would show some timeline chart visualizing book attributes ```dateStarted``` - ```dateFinished``` to have nicer view of my reading sprints and trends.
@ -136,11 +136,11 @@ Inventory contains documents and other relevant importation for my important bel
### Topic knowledge base
This where I store hard "knowledge" - summarized topics and findings from different domains. Topics can range from traditional sciences - physics, history, economy to philosophy, mental models, apps (notes about specific apps I use) etc. Of course this is very subjective - given what I do, my Physics sub-tree is pretty sparse compared to my Programming sub-tree.
This where I store hard "knowledge" - summarized topics and findings from different domains. Topics can range from traditional sciences - physics, history, economy to philosophy, mental models, apps (notes about specific apps I use) etc. Of course this is very subjective - given what I do, my Physics sub-tree is pretty sparse compared to my Programming subtree.
### Work knowledge base
I usually keep top level note for the company I currently work at (past jobs are moved elsewhere). I track basic organization of the company (divisions, business units), who is who ([relation maps](https://github.com/zadam/trilium/wiki/Relation-map)) are again useful for visualization), projects I work at etc.
I usually keep top level note for the company I currently work at (past jobs are moved elsewhere). I track basic organization of the company (divisions, business units), who is who ([relation maps](https://github.com/zadam/trilium/wiki/Relation map)) are again useful for visualization), projects I work at etc.
There's a number of credentials to various company services I need to use. Companies usually have a bunch of complex processes and tools. I record meeting minutes, link to the company wiki (which is usually difficult to find relevant info). In general there's a lot of company specific information I need to know or need have them at hand in a nice structure I can understand. Often it's just copy pasting and reshuffling of existing information into something more understandable for me.

@ -1,10 +1,10 @@
Promoted attributes are [[attributes|Attributes]] which are considered important and thus are "promoted" onto main note UI. See example below:
Promoted attributes are [[attributes|Attributes]] which are considered important and thus are "promoted" onto the main note UI. See example below:
[[images/promoted-attributes.png]]
You can see the note having kind of form with several fields. Each of these is just regular attribute, the only difference is that they appear on the note itself.
Attributes can be pretty useful since they allow for querying and script automation etc. but they are also inconveniently hidden in the note attributes dialog. This allows you to select few of the important ones and push them to the front of the user.
Attributes can be pretty useful since they allow for querying and script automation etc. but they are also inconveniently hidden. This allows you to select few of the important ones and push them to the front of the user.
Now, how do we make attribute to appear on the UI?
@ -16,7 +16,7 @@ Attribute is always name-value pair where both name and value are strings.
[[images/attribute-definitions.png]]
In the above picture you can see two labels - tag and todoDate with some values. But below them you can notice again tag and todoDate attributes, but now of type "Label definition". These "definition" attributes define how the "value" attributes should behave.
You can notice tag attribute definition. These "definition" attributes define how the "value" attributes should behave.
So there's one attribute for value and one for definition. But notice how definition attribute is [[Inheritable|Attribute inheritance]], meaning that it's also applied to all descendant note. So in a way, this definition is used for the whole subtree while "value" attributes are applied only for this note.
@ -28,4 +28,4 @@ Another example is with parent - child relationship. Again these always occur in
Relation definition allows you to specify such "inverse relation" - for the relation you just define you specify which is the inverse relation. Note that in the second example we should have two relation definitions - one for `isParentOf` which defines `isChildOf` as inverse relation and then second relation definition for `isChildOf` which defines `isParentOf` as inverse relation.
What this does internally is that whenever we save a relation which has defined inverse relation, we check that this inverse relation exists on the relation target note. Similarly when we delete relation, we also delete inverse relation on the target note.
What this does internally is that whenever we save a relation which has defined inverse relation, we check that this inverse relation exists on the relation target note. Similarly, when we delete relation, we also delete inverse relation on the target note.

@ -6,9 +6,9 @@ For such sensitive data Trilium can protect these notes which essentially means:
* This means that without your password, protected notes are not decipherable so even if somebody managed to steal your Trilium [[document|Document]], your protected notes could not be read.
* time-limited access to protected notes
* To first access protected notes you need to enter your password which will decrypt the note and allow you to read / write them. But after certain time period (by default 10 minutes) this decrypted note is unloaded from memory and to read it again you need to enter your password again.
* This time limit counts from the last interaction with protected session - so e.g. if you continuously write into a protected note, session is getting extended automatically and you are not kicked out. Once you change to an unprotected note, expiration starts counting and session ends in 10 minutes (unless you again interact with protected notes).
* This time limit counts from the last interaction with protected session - so e.g. if you continuously write into a protected note, session is getting extended automatically, and you are not kicked out. Once you change to an unprotected note, expiration starts counting and session ends in 10 minutes (unless you again interact with protected notes).
* This protects against a possible scenario where you leave your computer unlocked for a long time and somebody can access your Trilium application.
* protected notes protect only confidentiality and partially integrity of the notes. User outside of the protected sessions can still e.g. delete the protected notes or move them to a new location.
* protected notes protect only confidentiality and partially integrity of the notes. User outside the protected sessions can still e.g. delete the protected notes or move them to a new location.
## How to use protected notes
@ -16,8 +16,6 @@ Notes are by default unprotected. If you want your note to be protected, click o
[[gifs/protecting-note.gif]]
You can also notice how protected notes are greyed in the note tree and given subtle shield background in the note editor so you have good overview of what's protected and what isn't.
## What is encrypted
In principle Trilium encrypts data, but doesn't encrypt metadata. This specifically means:
@ -30,7 +28,6 @@ Encrypted:
Not encrypted:
* structure of the notes - i.e. you can still see that there are protected notes.
* there's no attempt to hide the fact there are encrypted notes
* various metadata - e.g. date of last modification
* [[attributes]]
@ -47,9 +44,3 @@ Not encrypted:
* data encryption key is random key generated at the time of [[document|Document]] initialization and is constant over the lifetime of the document. If we change password, we re-encrypt only this key.
5. We use data encryption key to decrypt actual data - note title and content.
* encryption used is again AES-128 with [CBC chaining](https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation). Unique IV is generated with every encryption operation and stored together with the cipher text.
## Search
Since full text search is implemented as a database search, it cannot work over encrypted data in protected notes. Searching by [[attributes]] is not affected and will find protected notes since attributes are not encrypted.
As a limited work around you can use Jump-To dialog (by default `CTRL-J`) which uses an in-memory search of titles only and will find protected notes if the protected session is active.

@ -6,6 +6,6 @@ You can set the note as read only by adding [[label|attributes]] `readOnly`.
## Auto read only
If the note is too large then Trilium will automatically set the note as readOnly as an optimalization - 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.
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.
If you want to keep specific note automatically editable, you can add [[label|attributes]] `autoReadOnlyDisabled`.

@ -43,4 +43,4 @@ You can specify which relations should be displayed with comma delimited names o
## See also
* [[Link map]] is a similar concept to relation maps
* [[Note map]] is a similar concept

@ -1,120 +1,120 @@
# Release notes v0.48
0.48 is a big release and contains many changes, some of them breaking:
Major frontend redesign
-----------------------
![](relnotes48/screenshot.png)
* right panel is no more, most of these widgets have been moved to the new ribbon-style widget under note title
* right panel is still possible to activate for scripts
* Trilium has a new icon (there might be further color changes)
Vertical split window
---------------------
![](relnotes48/split.png)
Link map re-implemented
-----------------------
Now supports also hierarchical view of the notes:
![](relnotes48/note-map.png)
Mermaid diagrams
----------------
Thanks to [@abitofevrything](https://github.com/abitofevrything) for this contribution!
![](relnotes48/mermaid.png)
Basic bookmark support
----------------------
![](relnotes48/bookmarks.png)
Other changes
-------------
* persistence/entity layer in backend was largely refactored - "repository" and unified with note cache which should bring performance improvements for many operations
* search and SQL query notes now don't create “saved” notes by default
* added underline heading style and make it a default
* updated CKEditor to 30.0.0
Migration
---------
### Backup restore
Trilium v0.48 is currently in beta and may contain serious bugs.
Before migration to 0.48 Trilium will make automatically backup into `~/trilium-data/backup/backup-before-migration.db`. In case of problems you can restore this backup with this guide: [https://github.com/zadam/trilium/wiki/Backup#restoring-backup](https://github.com/zadam/trilium/wiki/Backup#restoring-backup)
### Direct upgrade only from 0.47.X
Direct upgrade to 0.48 is possible only from 0.47.X. If you want to upgrade from an older version, you need to upgrade to 0.47.X first and only then to 0.48. This is caused by extensive backend refactoring which broke older migration scripts.
### All backend script notes should avoid being async
Backend operations were in older versions used async/await because of the SQLite driver. But Trilium recently migrated to the synchronous (and much faster) `better-sqlite3`. As a consequence backend script notes which are wrapped in a transaction should to be converted to the sync variant.
e.g. old script looked like this:
const todayDateStr = api.formatDateISO(new Date());
const todayNote = await api.runOnServer(async todayDateStr => {
const dateNote = await api.getDateNote(todayDateStr);
({note: logNote} = await api.createNote(dateNote.noteId, 'log'));
}, [todayDateStr]);
api.activateNote(todayNote.noteId);
all the `await` (and `async`) should disappear from the backend code, but should remain when calling backend from frontend (that's still async):
const todayDateStr = api.formatDateISO(new Date());
const todayNote = await api.runOnServer(todayDateStr => {
const dateNote = api.getDateNote(todayDateStr);
({note: logNote} = api.createNote(dateNote.noteId, 'log'));
}, [todayDateStr]);
api.activateNote(todayNote.noteId);
### Migrate custom themes
With the redesign you might need to adjust your custom themes - check the modified list of available CSS variables in the [default theme](https://github.com/zadam/trilium/blob/master/src/public/stylesheets/theme-light.css). If your theme also uses CSS selectors then that will probably have to be rewritten as well.
Themes are annotated with `#appTheme` label, previously this label could but did not have to contain value - with this release the value is required so define the label as e.g. `#appTheme=my-theme-name`.
Additionally, CSS themes are now loaded differently than before - previously all themes were loaded at the startup and which one was active was decided by the active CSS class. Themes were then prefixed like this:
body.theme-steel-blue {
--main-font-family: 'Raleway' !important;
--main-font-size: normal;
--tree-font-family: inherit;
--tree-font-size: normal;
...
}
body.theme-steel-blue .note-detail-editable-text, body.theme-steel-blue .note-detail-readonly-text {
font-size: 120%;
}
This prefixing is not needed anymore (and also doesn't work anymore). Remove the prefixes like this:
:root {
--main-font-family: 'Raleway';
--main-font-size: normal;
--tree-font-family: 'Raleway';
--tree-font-size: normal;
...
}
body .note-detail-editable-text, body .note-detail-readonly-text {
font-size: 120%;
# Release notes v0.48
0.48 is a big release and contains many changes, some of them breaking:
Major frontend redesign
-----------------------
![](relnotes48/screenshot.png)
* right panel is no more, most of these widgets have been moved to the new ribbon-style widget under note title
* right panel is still possible to activate for scripts
* Trilium has a new icon (there might be further color changes)
Vertical split window
---------------------
![](relnotes48/split.png)
Link map re-implemented
-----------------------
Now supports also hierarchical view of the notes:
![](relnotes48/note-map.png)
Mermaid diagrams
----------------
Thanks to [@abitofevrything](https://github.com/abitofevrything) for this contribution!
![](relnotes48/mermaid.png)
Basic bookmark support
----------------------
![](relnotes48/bookmarks.png)
Other changes
-------------
* persistence/entity layer in backend was largely refactored - "repository" and unified with note cache which should bring performance improvements for many operations
* search and SQL query notes now don't create “saved” notes by default
* added underline heading style and make it a default
* updated CKEditor to 30.0.0
Migration
---------
### Backup restore
Trilium v0.48 is currently in beta and may contain serious bugs.
Before migration to 0.48 Trilium will make automatically backup into `~/trilium-data/backup/backup-before-migration.db`. In case of problems you can restore this backup with this guide: [https://github.com/zadam/trilium/wiki/Backup#restoring-backup](https://github.com/zadam/trilium/wiki/Backup#restoring-backup)
### Direct upgrade only from 0.47.X
Direct upgrade to 0.48 is possible only from 0.47.X. If you want to upgrade from an older version, you need to upgrade to 0.47.X first and only then to 0.48. This is caused by extensive backend refactoring which broke older migration scripts.
### All backend script notes should avoid being async
Backend operations were in older versions used async/await because of the SQLite driver. But Trilium recently migrated to the synchronous (and much faster) `better-sqlite3`. As a consequence backend script notes which are wrapped in a transaction should to be converted to the sync variant.
e.g. old script looked like this:
const todayDateStr = api.formatDateISO(new Date());
const todayNote = await api.runOnServer(async todayDateStr => {
const dateNote = await api.getDateNote(todayDateStr);
({note: logNote} = await api.createNote(dateNote.noteId, 'log'));
}, [todayDateStr]);
api.activateNote(todayNote.noteId);
all the `await` (and `async`) should disappear from the backend code, but should remain when calling backend from frontend (that's still async):
const todayDateStr = api.formatDateISO(new Date());
const todayNote = await api.runOnServer(todayDateStr => {
const dateNote = api.getDateNote(todayDateStr);
({note: logNote} = api.createNote(dateNote.noteId, 'log'));
}, [todayDateStr]);
api.activateNote(todayNote.noteId);
### Migrate custom themes
With the redesign you might need to adjust your custom themes - check the modified list of available CSS variables in the [default theme](https://github.com/zadam/trilium/blob/master/src/public/stylesheets/theme-light.css). If your theme also uses CSS selectors then that will probably have to be rewritten as well.
Themes are annotated with `#appTheme` label, previously this label could but did not have to contain value - with this release the value is required so define the label as e.g. `#appTheme=my-theme-name`.
Additionally, CSS themes are now loaded differently than before - previously all themes were loaded at the startup and which one was active was decided by the active CSS class. Themes were then prefixed like this:
body.theme-steel-blue {
--main-font-family: 'Raleway' !important;
--main-font-size: normal;
--tree-font-family: inherit;
--tree-font-size: normal;
...
}
body.theme-steel-blue .note-detail-editable-text, body.theme-steel-blue .note-detail-readonly-text {
font-size: 120%;
}
This prefixing is not needed anymore (and also doesn't work anymore). Remove the prefixes like this:
:root {
--main-font-family: 'Raleway';
--main-font-size: normal;
--tree-font-family: 'Raleway';
--tree-font-size: normal;
...
}
body .note-detail-editable-text, body .note-detail-readonly-text {
font-size: 120%;
}

3
Saved search.md Normal file

@ -0,0 +1,3 @@
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:
[[gifs/save-search.gif]]

@ -1,9 +0,0 @@
**As of v0.46 this page is outdated**
Trilium provides a way to save common search as a note in the note tree. Search results will then appear as subnotes of this "saved search" note. You can see how this works in action:
### Saved search with script relation
If saved search string starts with `=`, then the following string is taken as a relation name and the target script is executed to get the list of note results.
So let's say the search string is `=handler`, then Trilium tries to find this saved note's relation with name "handler". Relation is expected to point to [[script|scripts]] which is then executed - script is expected to return a list of notes which should be presented as search results. This option exists for use cases where normal attribute/fulltext search doesn't cover all needs.

@ -5,4 +5,4 @@ For [[Scripts]] to do anything useful, Trilium publishes "Script API". Actually
## Backwards compatibility
Note that Script API is now highly experimental and subject to change in the future.
Note that Script API is now experimental and subject to change in the future.

@ -17,7 +17,7 @@ Let's take a look at our demo script (shipped with default Trilium [[document]])
First take a look at the red circle all the way on the top - this what we want to achieve - new button in UI which will create new note representing a task/todo item.
Red point below the first one marks the note type we have create for this script - it's "JavaScript frontend". It's frontend because adding button to UI is clearly frontend responsibility.
Red point below the first one marks the note type we have created for this script - it's "JavaScript frontend". It's frontend because adding button to UI is clearly frontend responsibility.
In the note content you can see the code which calls one of the API methods, this one is specifically meant to add new buttons. Code needs to set few button properties:
@ -28,7 +28,7 @@ In the note content you can see the code which calls one of the API methods, thi
### Action handler
Saving the note to the database is backend's responsibility so we immediately pass control to the backend and ask it to create a note. Once this is done, we show the newly created note so that the user can set the task title and maybe some attributes.
Saving the note to the database is backend's responsibility, so we immediately pass control to the backend and ask it to create a note. Once this is done, we show the newly created note so that the user can set the task title and maybe some attributes.
### Script execution

@ -52,7 +52,7 @@ However, if your search expression starts with a parenthesis, it needs to be pre
`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, grand-parent, grand-grand-parent …) with title Book. This is a nice way how to reduce the scope of the search to a particular sub-tree.
`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”.
@ -103,7 +103,7 @@ The example above will do the following things (in this sequence):
1. find notes with label author having value “Tolkien”
2. order the results by publicationDate in descending order (so the newest first)
1. in case publication date is equal, use note.title as secondary ordering in ascending order (`asc` is the default and thus can be ommitted)
1. in case publication date is equal, use note.title as secondary ordering in ascending order (`asc` is the default and thus can be omitted)
3. take only the first 10 results
### Negation

@ -1,4 +1,4 @@
This pages describes installing Trilium on your own server. You might want to do this in case you want to setup [[sync|Synchronization]] or you want to use it as online version of Trilium accessible from anywhere.
This pages describes installing Trilium on your own server. You might want to do this in case you want to set up [[sync|Synchronization]] or you want to use it as online version of Trilium accessible from anywhere.
There are three options how to do this, each one with some advantage:
@ -33,8 +33,6 @@ Among others, you can also disable authentication (in case you run on localhost
noAuthentication=true
```
Note that disabling authentication is possible only since version 0.44.
## Reverse proxy setup
### nginx

@ -1,4 +1,4 @@
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:
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:
[[images/star-topology.png]]
@ -12,7 +12,7 @@ Once sync is set up, synchronization is automatic and ongoing - you don't need t
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]].
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.
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.
[[images/sync-config.png]]

@ -2,8 +2,8 @@ TLS configuration is required for server installation, it's not relevant for pur
First thing to do is to get a TLS certificate. You have two options:
* Recommended - get TLS certificate signed by root certificate authority. For personal usage, best choice is [Let's encrypt](https://letsencrypt.org). It's free, automated and easy.
* 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.
* 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.
* 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.
## Modifying config.ini
@ -19,6 +19,6 @@ certPath=/[username]/.acme.sh/[hostname]/fullchain.cer
keyPath=/[username]/.acme.sh/[hostname]/example.com.key
```
Above is only example of how this is setup 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].)
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].)
After you set this up, you may restart trilium and now visit the hostname with "https".
After you set this up, you may restart Trilium and now visit the hostname with "https".

@ -9,11 +9,11 @@ Task Manager also integrates with [[day notes]] - notes are [[cloned|cloning not
## Implementation
New tasks are created in the TODO note which has "child:template" [[relation|attributes]] (see [[attribute inheritance]]) pointing to the task template.
New tasks are created in the TODO note which has `~child:template` [[relation|attributes]] (see [[attribute inheritance]]) pointing to the task template.
### Attributes
Task template defines several [[promoted attributes]] - todoDate, doneData, tags, location. Importantly it also defines `runOnAttributeChange` relation - [[event|events]] handler which is run on attribute change. This [[script|scripts]] handles when e.g. we fill out the doneDate attribute - meaning the task is done and should be moved to "Done" note and removed from TODO, locations and tags.
Task template defines several [[promoted attributes]] - todoDate, doneData, tags, location. Importantly it also defines `~runOnAttributeChange` relation - [[event|events]] handler which is run on attribute change. This [[script|scripts]] handles when e.g. we fill out the doneDate attribute - meaning the task is done and should be moved to "Done" note and removed from TODO, locations and tags.
### New task button
@ -56,6 +56,6 @@ span.fancytree-node.done .fancytree-title {
}
```
This [[code note|code notes]] has `appCss` [[label|attributes]] which is recognized by Trilium on startup and loaded as CSS into the application.
This [[code note|code notes]] has `#appCss` [[label|attributes]] which is recognized by Trilium on startup and loaded as CSS into the application.
Second part of this functionality is based in event handler described above which assigns `cssClass` label to the task to either "done" or "todo" based on the task status.
Second part of this functionality is based in event handler described above which assigns `#cssClass` label to the task to either "done" or "todo" based on the task status.

@ -3,7 +3,7 @@ Template is a note which serves as a kind of "template" for other kind of notes
Assignment of a template relation to a note brings these three effects:
* all attributes from the template note are [[inherited|attribute inheritance]] 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 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
@ -15,6 +15,6 @@ A typical example would be a "Book" template note which will:
And then we have instance note - this note has a [[relation|attributes]] 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.
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 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.
You can check out the concept in the [[demo document|Document#demo-document]] in e.g. [[Relation map]], [[Task manager]] or [[Day notes]].

@ -1 +0,0 @@
wdsds

@ -22,25 +22,22 @@ Note that the use of `#` for Heading1 style is not supported because the editor
## Math support
Trilium provides Math support with the help of KaTex (available since 0.45):
Trilium provides Math support with the help of KaTex:
[[gifs/math.gif]]
## Cut selection to sub-note
**This feature is available since 0.39.3**
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 subnotes - the process is essentially like this:
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:
* select the desired piece of text and cut it into clipboard
* create new subnote & give it name
* paste the content from clipboard into subnote
* create new sub-note & give it name
* paste the content from clipboard into sub-note
Trilium provides a way to automate this:
[[gifs/cut-to-subnote.gif]]
You can notice how heading "Formatting" is automatically detected and new subnote is named "Formatting".
You can notice how heading "Formatting" is automatically detected and new sub-note is named "Formatting".
It is also possible to assign a keyboard shortcut for this action.

@ -14,7 +14,7 @@ Each note can have more than one such branches, in other words any note can have
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.
To edit prefix, right click on a note in the tree pane and choose "Edit branch prefix".
To edit prefix, right-click on a note in the tree pane and choose "Edit branch 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.

@ -1,4 +1,4 @@
Trilium is currently beta quality software so it's quite expected there will be some bugs.
Trilium is currently beta quality software, so it's quite expected there will be some bugs.
## General quickfix
@ -6,7 +6,7 @@ You guessed it - it's restart.
If there's a UI problem, it usually means that the Trilium frontend got into inconsistent state and is acting up. Easiest way to fix it is to reload the application - just press `CTRL-R` and frontend will be reloaded.
If this still doesn't help or you suspect it's actually 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 this still doesn't help, or you suspect it's actually backend issue, you can restart the whole application - in case of desktop (Electron) build, you just close the window and re-open it again.
## Forgotten username/password
@ -83,7 +83,7 @@ Trilium logs important events and errors into `logs` directory (inside [[data di
### Anonymized database
In some cases it's necessary to see the database structure to be able to debug the problem. Of course we can't ask you to send us your [[document|Document]] file with your notes.
In some cases it's necessary to see the database structure to be able to debug the problem. Of course, we can't ask you to send us your [[document|Document]] file with your notes.
For this Trilium supports anonymization of the database - you can trigger this in Options -> Advanced tab.
@ -97,4 +97,4 @@ If the database is corrupted in a way which prevents Trilium to start up, you wo
node src/anonymize.js
```
This needs to be executed in the directory with Trilium source files, for desktop builds this in in `resources/app` directory.
This needs to be executed in the directory with Trilium source files, for desktop builds this in `resources/app` directory.

@ -13,6 +13,6 @@ During Trilium startup, [[document]] will be checked whether it conforms to the
# Sync compatibility
[[Synchronization]] 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.
[[Synchronization]] 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.
Change in protocol version is usually indicated on a release page.

@ -14,7 +14,7 @@ Project is hosted [here](https://github.com/zadam/trilium-web-clipper). Firefox
Trilium will save these clippings as a new child note under a "clipper inbox" note. Clipper inbox is:
* if there's a note with [[label|attributes]] `clipperInbox`, then this note is used as parent for the clipped notes
* otherwise [[day note|day notes]] is used as a parent
* otherwise, [[day note|day notes]] is used as a parent
If there's multiple clippings from the same page (and on the same day), then they will be added to the same note.
@ -27,6 +27,6 @@ Extension is available from:
# 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.
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 [[server|Server installation]] address for cases when the desktop application is not currently running.

@ -15,8 +15,6 @@ So far workspace consists of these features:
Let's say you have identified the workspaces and their subtrees. Define on the root of this subtree following labels:
* `workspace` - just marks this note as workspace, button to enter the workspace is controlled by this
* `workspaceIconClass` - controls box icon to be displayed in the tree and tabs, example `bx bx-home`. See [https://boxicons.com/](https://boxicons.com/)
* `workspaceTabBackgroundColor` - color of the tab, use any CSS color format, e.g. "lightblue" or "#ddd"
Workspaces are available since Trilium v0.46.
* `#workspace` - just marks this note as workspace, button to enter the workspace is controlled by this
* `#workspaceIconClass` - controls box icon to be displayed in the tree and tabs, example `bx bx-home`. See [https://boxicons.com/](https://boxicons.com/)
* `#workspaceTabBackgroundColor` - color of the tab, use any CSS color format, e.g. "lightblue" or "#ddd"

@ -14,6 +14,7 @@
* [[Tree manipulation]]
* [[Note navigation]]
* [[Search]]
* [[Bookmarks]]
* [[Note hoisting]]
* [[Workspace]]
* [[Keyboard shortcuts]]
@ -43,7 +44,7 @@
* [[Promoted attributes]]
* [[Template]]
* [[Relation map]]
* [[Link map]]
* [[Note map]]
* [[Book note]]
* [[Sharing]]
* [[Code notes]]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

After

Width:  |  Height:  |  Size: 130 KiB

BIN
gifs/bookmarks.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 305 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 256 KiB

After

Width:  |  Height:  |  Size: 367 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 212 KiB

After

Width:  |  Height:  |  Size: 145 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 848 KiB

After

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 219 KiB

After

Width:  |  Height:  |  Size: 222 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 314 KiB

After

Width:  |  Height:  |  Size: 332 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 394 KiB

After

Width:  |  Height:  |  Size: 309 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 296 KiB

After

Width:  |  Height:  |  Size: 714 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 149 KiB

After

Width:  |  Height:  |  Size: 200 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 304 KiB

After

Width:  |  Height:  |  Size: 178 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 301 KiB

After

Width:  |  Height:  |  Size: 716 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 297 KiB

After

Width:  |  Height:  |  Size: 265 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 MiB

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 MiB

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 272 KiB

After

Width:  |  Height:  |  Size: 260 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 407 KiB

After

Width:  |  Height:  |  Size: 385 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 127 KiB

After

Width:  |  Height:  |  Size: 127 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 146 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 932 KiB

After

Width:  |  Height:  |  Size: 932 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 227 KiB

After

Width:  |  Height:  |  Size: 227 KiB

BIN
images/bookmark-folder.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 122 KiB

After

Width:  |  Height:  |  Size: 128 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 KiB

After

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 179 KiB

After

Width:  |  Height:  |  Size: 179 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 235 KiB

After

Width:  |  Height:  |  Size: 235 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 98 KiB

After

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 126 KiB

After

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 211 KiB

After

Width:  |  Height:  |  Size: 211 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 91 KiB

After

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 102 KiB

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 248 KiB

After

Width:  |  Height:  |  Size: 248 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 99 KiB

After

Width:  |  Height:  |  Size: 99 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 184 KiB

After

Width:  |  Height:  |  Size: 191 KiB

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