diff --git a/Events.md b/Events.md index 5af9421..1d5f2ea 100644 --- a/Events.md +++ b/Events.md @@ -1,4 +1,8 @@ -In general we may say that [[script|scripts]] notes are triggered by events. "run" represents global events: +In general we may say that [[script|scripts]] note execution is triggered by events. + +## Global events + +Global events are attached to the script note via label. Simply create e.g. "run" label with some of these values and script note will be executed once the event occurs. * `run` * `frontendStartup` - executes on frontend upon startup @@ -6,6 +10,8 @@ In general we may say that [[script|scripts]] notes are triggered by events. "ru * `hourly` - executes once an hour on backend * `daily` - executes once a day on backend +## Entity events + Other events are bound to some entity, these are defined as [[relations|Attributes]] - meaning that script is triggered only if note has this script attached to it through relations (or it can inherit it). * `runOnNoteView` - executes when note is displayed on frontend diff --git a/Family tree.md b/Family tree.md index 4997550..d7910c6 100644 --- a/Family tree.md +++ b/Family tree.md @@ -15,4 +15,4 @@ This `Person template` defines multiple [[promoted attributes]], some of which ( Using these promoted attributes, user can define the whole family tree. -JS code note then uses [[Script API]] to pick up all the notes from Members note (pointing to it via `familyContainer` relation), constructs the graph in memory and renders it via 3rd party [Dagre](https://github.com/dagrejs/dagre) library which is uploaded (together with its [D3](https://d3js.org/) dependency) as an attachment. \ No newline at end of file +JS code note then uses [[Script API]] to pick up all the notes from Members note (pointing to it via `familyContainer` relation), constructs the graph in memory and renders it via 3rd party [Dagre](https://github.com/dagrejs/dagre) JavaScript library which is uploaded (together with its [D3](https://d3js.org/) dependency) as an attachment. \ No newline at end of file diff --git a/Keyboard shortcuts.md b/Keyboard shortcuts.md index 50fc92a..6f4a666 100644 --- a/Keyboard shortcuts.md +++ b/Keyboard shortcuts.md @@ -5,7 +5,7 @@ This is supposed to be a complete list of keyboard shortcuts. Note that some of * `UP`, `DOWN` - go up/down in the list of notes, `CTRL-SHIFT-UP` and `CTRL-SHIFT-DOWN` work also from editor * `LEFT`, `RIGHT` - collapse/expand node * `ALT+LEFT`, `ALT+RIGHT` - go back / forwards in the history -* `CTRL+J` - show "Jump to" dialog +* `CTRL+J` - show [["Jump to" dialog|Note navigation#jump-to-note]] * `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 @@ -17,7 +17,7 @@ See demo of some of these features in [[note navigation|Note navigation]]. * `CTRL+O` - creates new note after the current note * `CTRL+P` - creates new sub-note into current note -* `F2` - edit prefix of current note clone +* `F2` - edit [[prefix|Tree concepts#prefix]] of current note clone ## Moving / cloning notes @@ -35,9 +35,10 @@ See demo of some of these features in [[note navigation|Note navigation]]. ## Editing notes * `ENTER` in tree pane switches from tree pane into editor. `CTRL+.` switches back from editor to tree pane. -* `CTRL+K` - create / edit external link -* `CTRL+L` - create internal (note) link +* `CTRL+K` - create / edit [[external link|Links]] +* `CTRL+L` - create [[internal (note) link|Links]] * `ALT+T` - inserts current date and time at caret position +* `CTRL+.` - jump away from the editor to tree pane and scroll to current note ## Runtime shortcuts @@ -49,8 +50,7 @@ These are hooked in Electron to be similar to native browser keyboard shortcuts. ## Other -* `CTRL+U` - show note source (read only) * `ALT+O` - show SQL console (use only if you know what you're doing) * `ALT+M` - distraction-free mode - display only note editor, everything else is hidden -* `CTRL+S` - toggle search form in tree pane -* `ALT+A` - show note attributes dialog +* `CTRL+S` - toggle [[search]] form in tree pane +* `ALT+A` - show note [[attributes]] dialog diff --git a/Packaged server installation.md b/Packaged server installation.md index 325a212..685a55e 100644 --- a/Packaged server installation.md +++ b/Packaged server installation.md @@ -7,7 +7,7 @@ This is essentially Trilium sources + node modules + node.js runtime packaged in trilium-linux-x64-server-[VERSION].7z](https://github.com/zadam/trilium/releases/latest) (notice -server suffix) on your server * unpack the archive, e.g. using `p7zip -d trilium-linux-x64-server-[VERSION].7z` * `cd trilium-linux-x64-server` -* nohup ./trilium.sh & +* `nohup ./trilium.sh &` * this will start the trilium application in background and keep it running even after your ssh connection disconnects * you can open the browser and open http://[your-server-hostname]:8080 and you should see Trilium initialization page diff --git a/Promoted attributes.md b/Promoted attributes.md index 57a158e..d2e54c1 100644 --- a/Promoted attributes.md +++ b/Promoted attributes.md @@ -12,11 +12,10 @@ Now, how do we make attribute to appear on the UI? Attribute is always name-value pair where both name and value are strings. -Attribute definition specifies how should this value be interpreted - is it just string, or is it a date? Should we allow multiple values or note? +*Attribute definition* specifies how should this value be interpreted - is it just string, or is it a date? Should we allow multiple values or note? And importantly, should we *promote* the attribute or not? [[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. -So there's one attribute for value and one for attribute. But notice how definition attribute is Inheritable, 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. - +So there's one attribute for value and one for attribute. 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. diff --git a/Server installation.md b/Server installation.md index 5de9ef9..be20938 100644 --- a/Server installation.md +++ b/Server installation.md @@ -8,4 +8,14 @@ There are three options how to do this, each one with some advantage: ## Configuration -For server installations, you might want to configure e.g. port or [[TLS|TLS configuration]]. This is done in the Trilium config file, by default it's in ~/trilium-data/config.ini (where ~ is your home directory). \ No newline at end of file +For server installations, you might want to configure e.g. port or [[TLS|TLS configuration]]. This is done in the Trilium config file, by default it's in ~/trilium-data/config.ini (where ~ is your home directory). + +### Config location + +`config.ini`, [[document]] and some other important Trilium data files are by default persisted in `trilium-data` directory placed in your home directory. + +If this is not desired, you may change it via `TRILIUM_DATA_DIR` environment variable to some other location, e.g.: + +```bash +export TRILIUM_DATA_DIR=/home/adam/trilium-server-data +``` \ No newline at end of file diff --git a/Template.md b/Template.md index 0a3b924..0917e03 100644 --- a/Template.md +++ b/Template.md @@ -2,9 +2,9 @@ Template is a concept related to [[promoted attributes]]. Often we have some kind of note "class" - e.g. we want to keep track of books we've read and there are some common attributes we'd like to fill for all such books - we want to have author's name there, link to amazon or wikipedia, genre or publication date. -To make these attributes really obvious, we make them "promoted" so they are visible on the UI on the first sight. But we don't want to set them as promoted for each note separately so what we'll do is that we'll create a "Book template" note where we'll define all those promoted attribute. +To make these attributes really obvious, we make them "[[promoted|promoted attributes]]" so they are visible on the UI on the first sight. But we don't want to set them as promoted for each note separately so what we'll do is that we'll create a "Book template" note where we'll define all those promoted attribute. -Then whenever we create a new note for book we'll just link the template to the book note via [[relation|Attributes]] "template". Book note will then automatically inherit all the promoted attributes and display them. +Then whenever we create a new note for book we'll just link the template to the book note via special system [[relation|Attributes]] `template`. Book note will then automatically inherit all the inheritable attributes from the template note (including the promoted ones) and display them. To make this even more automated, we can create "child:template" (see [[attribute inheritance]]) attribute on common parent note of our books and whenever we create new note inside this parent, the book note will get the template relation automatically. diff --git a/Themes.md b/Themes.md index ba59d26..4f7b15a 100644 --- a/Themes.md +++ b/Themes.md @@ -13,3 +13,5 @@ This is also useful in the context of [[scripting|scripts]] where you may want t To do this, just create a code note with CSS type, put your custom CSS code into the note's content and create "appCss" [[label|Attributes]]. When Trilium frontend starts, all notes with "appCss" label are appended in the style element of the Trilium HTML page. Once you made your changes, you can reload the Trilium frontend by pressing CTRL-R after which the changes will take effect. + +[[images/app-css.png]] \ No newline at end of file diff --git a/Troubleshooting.md b/Troubleshooting.md index 6fb7414..1d8d0da 100644 --- a/Troubleshooting.md +++ b/Troubleshooting.md @@ -1,4 +1,4 @@ -Trilium is currently alpha 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 diff --git a/images/app-css.png b/images/app-css.png new file mode 100644 index 0000000..8ff5c79 Binary files /dev/null and b/images/app-css.png differ