mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
refactored ``code
` into
code`
parent
cb65986e91
commit
01a688050c
@ -23,16 +23,17 @@ Labels can be used when [[searching|Search]].
|
||||
|
||||
Following labels are used for advanced configuration:
|
||||
|
||||
* ```disableVersioning``` - disables auto-versioning. Useful for e.g. large, but unimportant notes - e.g. large JS libraries used for scripting
|
||||
* ```calendarRoot``` - marks note which should be used as root for [[day notes|Day note]]. Only one should be marked as such.
|
||||
* ```archived``` - notes with this label won't be visible in autocomplete-based search (jump to, add link). Applies also to all its sub-notes.
|
||||
* ```excludeFromExport``` - notes (with their sub-tree) won't be included in any note export
|
||||
* ```run``` - defines on which events script should run. Possible values are:
|
||||
* ```frontendStartup``` - when Trilium frontend starts up (or is refreshed).
|
||||
* ```backendStartup``` - when Trilium backend starts up
|
||||
* ```hourly``` - run once an hour
|
||||
* ```daily``` - run once a day
|
||||
* ```disableInclusion``` - scripts with this label won't be included into parent script execution.
|
||||
* `disableVersioning` - disables auto-versioning. Useful for e.g. large, but unimportant notes - e.g. large JS libraries used for scripting
|
||||
* `calendarRoot` - marks note which should be used as root for [[day notes|Day note]]. Only one should be marked as such.
|
||||
* `archived` - notes with this label won't be visible in autocomplete-based search (jump to, add link). Applies also to all its sub-notes.
|
||||
* `excludeFromExport` - notes (with their sub-tree) won't be included in any note export
|
||||
* `run` - defines on which events script should run. Possible values are:
|
||||
* `frontendStartup` - when Trilium frontend starts up (or is refreshed).
|
||||
* `backendStartup` - when Trilium backend starts up
|
||||
* `hourly` - run once an hour
|
||||
* `daily` - run once a day
|
||||
* `disableInclusion` - scripts with this label won't be included into parent script execution.
|
||||
* `sorted` - keeps child notes sorted by title alphabetically
|
||||
|
||||
## Relations
|
||||
Relation is a kind of link between two notes.
|
||||
@ -43,10 +44,10 @@ More importantly relations are used for some more advanced things - like attachi
|
||||
|
||||
### Standard relations
|
||||
|
||||
* ```runOnNoteView``` - attached script will be run whenever the note has been loaded
|
||||
* ```runOnNoteTitleChange``` - attached script will be run whenever the note title has been changed
|
||||
* ```runOnAttributeChange``` - attached script will be run whenever the note's attribute has been changed
|
||||
* ```template``` - attached note's attributes will be inherited even without parent-child relationship
|
||||
* `runOnNoteView` - attached script will be run whenever the note has been loaded
|
||||
* `runOnNoteTitleChange` - attached script will be run whenever the note title has been changed
|
||||
* `runOnAttributeChange` - attached script will be run whenever the note's attribute has been changed
|
||||
* `template` - attached note's attributes will be inherited even without parent-child relationship
|
||||
|
||||
## Multiplicity
|
||||
|
||||
@ -54,7 +55,7 @@ Attributes allow multiplicity - there can be multiple attributes with the same n
|
||||
|
||||
## Attribute inheritance
|
||||
|
||||
Every attribute has a flag called ```isInheritable```. If this is true, then this attribute (key-value) is also applied to all its children notes, children's children notes etc.
|
||||
Every attribute has a flag called `isInheritable`. If this is true, then this attribute (key-value) is also applied to all its children notes, children's children notes etc.
|
||||
|
||||
Different kind of inheritance is achieved using "child:" attribute name prefix. If we create a child note in a note with "child:exampleAttribute" attribute, then 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.
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
Document is [SQLite](https://www.sqlite.org) database which contains all notes, tree structure, metadata, even some of the configuration.
|
||||
|
||||
It's stored in single file, by default in ```trilium-data/document.db```
|
||||
It's stored in single file, by default in `trilium-data/document.db`
|
||||
|
||||
If you want to backup your Trilium data, just backup this single file - it contains everything you need.
|
||||
|
||||
|
@ -2,55 +2,55 @@ This is supposed to be a complete list of keyboard shortcuts. Note that some of
|
||||
|
||||
## Note navigation
|
||||
|
||||
* ```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+.``` - 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)
|
||||
* `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+.` - 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)
|
||||
|
||||
See demo of some of these features in [[note navigation|Note navigation]].
|
||||
|
||||
## Creating notes
|
||||
|
||||
* ```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
|
||||
* `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
|
||||
|
||||
## Moving / cloning notes
|
||||
|
||||
* ```CTRL+UP```, ```CTRL+DOWN``` - move note up/down in the note list
|
||||
* ```CTRL+LEFT``` - move note up in the note tree
|
||||
* ```CTRL+RIGHT``` - move note down in the note tree
|
||||
* ```SHIFT+UP```, ```SHIFT+DOWN``` - multi-select note above/below
|
||||
* ```CTRL+A``` - select all notes in the current level
|
||||
* ```CTRL+click``` - multi select note which you clicked on
|
||||
* ```CTRL+C``` - copies current note (or current selection) into clipboard (used for [[cloning|Cloning notes]])
|
||||
* ```CTRL+X``` - cuts current (or current selection) note into clipboard (used for moving notes)
|
||||
* ```CTRL+V``` - pastes note(s) as sub-note into current note (which is either move or clone depending on whether it was copied or cut into clipboard)
|
||||
* ```DEL``` / ```CTRL+DEL``` - delete note / sub-tree. Just ```DELETE``` works in tree pane, ```CTRL-DEL``` works globally.
|
||||
* `CTRL+UP`, `CTRL+DOWN` - move note up/down in the note list
|
||||
* `CTRL+LEFT` - move note up in the note tree
|
||||
* `CTRL+RIGHT` - move note down in the note tree
|
||||
* `SHIFT+UP`, `SHIFT+DOWN` - multi-select note above/below
|
||||
* `CTRL+A` - select all notes in the current level
|
||||
* `CTRL+click` - multi select note which you clicked on
|
||||
* `CTRL+C` - copies current note (or current selection) into clipboard (used for [[cloning|Cloning notes]])
|
||||
* `CTRL+X` - cuts current (or current selection) note into clipboard (used for moving notes)
|
||||
* `CTRL+V` - pastes note(s) as sub-note into current note (which is either move or clone depending on whether it was copied or cut into clipboard)
|
||||
* `DEL` / `CTRL+DEL` - delete note / sub-tree. Just `DELETE` works in tree pane, `CTRL-DEL` works globally.
|
||||
|
||||
## 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
|
||||
* ```ALT+T``` - inserts current date and time at caret position
|
||||
* `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
|
||||
* `ALT+T` - inserts current date and time at caret position
|
||||
|
||||
## Runtime shortcuts
|
||||
|
||||
These are hooked in Electron to be similar to native browser keyboard shortcuts.
|
||||
|
||||
* ```F5```, ```CTRL-R``` - reloads trilium frontend
|
||||
* ```CTRL+SHIFT+I``` - show developer tools
|
||||
* ```CTRL+F``` - show search dialog
|
||||
* `F5`, `CTRL-R` - reloads trilium frontend
|
||||
* `CTRL+SHIFT+I` - show developer tools
|
||||
* `CTRL+F` - show search dialog
|
||||
|
||||
## 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+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
|
||||
|
4
Links.md
4
Links.md
@ -1,7 +1,7 @@
|
||||
## External links
|
||||
External link is general web link targeting some external web resource - e.g. https://en.wikipedia.org/wiki/South_China_Sea is an external link to one Wikipedia page.
|
||||
|
||||
External links are done through CKEditor native links. To create an external link, select text and press ```CTRL-K``` or wait for the "balloon" to appear and click link icon there.
|
||||
External links are done through CKEditor native links. To create an external link, select text and press `CTRL-K` or wait for the "balloon" to appear and click link icon there.
|
||||
|
||||
[[gifs/create-external-link.gif]]
|
||||
|
||||
@ -9,7 +9,7 @@ You can follow external link by either double clicking (will open new tab/window
|
||||
|
||||
## Internal links to notes
|
||||
|
||||
Links to internal notes are created a bit differently. To create link to note at current cursor position, press ```CTRL-L```.
|
||||
Links to internal notes are created a bit differently. To create link to note at current cursor position, press `CTRL-L`.
|
||||
|
||||
In the dialog you can see radio button to choose from different types of linking. First one is classic link to note, the other two are related to [[cloning|Cloning notes]] and will be covered separately.
|
||||
|
||||
|
@ -12,7 +12,7 @@ Of course this is basic and expected functionality, but it's worth mentioning th
|
||||
|
||||
## Jump to note
|
||||
|
||||
This is useful to quickly find and view arbitrary note - click on ```Jump to``` button on the top or press ```CTRL-J```.
|
||||
This is useful to quickly find and view arbitrary note - click on `Jump to` button on the top or press `CTRL-J`.
|
||||
Then type part of the note name and autocomplete will help you pick the desired note.
|
||||
|
||||
[[gifs/jump-to.gif]]
|
||||
@ -21,7 +21,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.
|
||||
|
||||
|
@ -3,10 +3,10 @@ This is the easiest and recommended method method on how to install Trilium on y
|
||||
## Steps
|
||||
|
||||
* ssh into your server
|
||||
* use ```wget``` (or ```curl``` or whatever) to download latest [
|
||||
* use `wget` (or `curl` or whatever) to download latest [
|
||||
trilium-linux-x64-[VERSION]-server.7z](https://github.com/zadam/trilium/releases/latest) (notice -server suffix) on your server
|
||||
* unpack the archive, e.g. using ```p7zip -d```
|
||||
* ```cd trilium-linux-x64-server```
|
||||
* unpack the archive, e.g. using `p7zip -d`
|
||||
* `cd trilium-linux-x64-server`
|
||||
* nohup ./trilium &
|
||||
* 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
|
||||
|
24
Scripts.md
24
Scripts.md
@ -49,21 +49,21 @@ The solution is marked by red circle at the bottom - this note has [[label|Attri
|
||||
|
||||
In general we may say that script notes are triggered by events. "run" represents global events:
|
||||
|
||||
* ```run```
|
||||
* ```frontendStartup``` - executes on frontend upon startup
|
||||
* ```backendStartup``` - executes on backend upon startup
|
||||
* ```hourly``` - executes once an hour on backend
|
||||
* ```daily``` - executes once a day on backend
|
||||
* `run`
|
||||
* `frontendStartup` - executes on frontend upon startup
|
||||
* `backendStartup` - executes on backend upon startup
|
||||
* `hourly` - executes once an hour on backend
|
||||
* `daily` - executes once a day on backend
|
||||
|
||||
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
|
||||
* ```runOnNoteCreation``` - executes when note is created on backend
|
||||
* ```runOnNoteTitleChange``` - executes when note title is changed (includes note creation as well)
|
||||
* ```runOnNoteChange``` - executes when note is changed (includes note creation as well)
|
||||
* ```runOnChildNoteCreation``` - executes when new note is created under *this* note
|
||||
* ```runOnAttributeCreation``` - executes when new attribute is created under *this* note
|
||||
* ```runOnAttributeChange``` - executes when attribute is changed under *this* note
|
||||
* `runOnNoteView` - executes when note is displayed on frontend
|
||||
* `runOnNoteCreation` - executes when note is created on backend
|
||||
* `runOnNoteTitleChange` - executes when note title is changed (includes note creation as well)
|
||||
* `runOnNoteChange` - executes when note is changed (includes note creation as well)
|
||||
* `runOnChildNoteCreation` - executes when new note is created under *this* note
|
||||
* `runOnAttributeCreation` - executes when new attribute is created under *this* note
|
||||
* `runOnAttributeChange` - executes when attribute is changed under *this* note
|
||||
|
||||
## Script API
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
|
||||
|
||||
## Filter query syntax
|
||||
|
||||
Following examples demonstrates syntax:
|
||||
|
@ -14,10 +14,10 @@ This approach is used when you already have a desktop instance of Trilium and yo
|
||||
|
||||
### Sync server setup
|
||||
|
||||
1. Run Trilium in your new environment - this will generate default directory ```trilium-data``` in your home directory, default config etc.
|
||||
1. Run Trilium in your new environment - this will generate default directory `trilium-data` in your home directory, default config etc.
|
||||
2. Stop Trilium in the new environment
|
||||
3. Copy your existing trilium [[document|Document]] file (by default located in your home directory under ```trilium-data/document.db```) into your target environment into ```trilium-data``` directory
|
||||
4. Edit client's ```trilium-data/config.ini``` and set ```syncServerHost``` to the host and port where the sync server is running
|
||||
3. Copy your existing trilium [[document|Document]] file (by default located in your home directory under `trilium-data/document.db`) into your target environment into `trilium-data` directory
|
||||
4. Edit client's `trilium-data/config.ini` and set `syncServerHost` to the host and port where the sync server is running
|
||||
5. Start the sync server
|
||||
6. Start the client
|
||||
|
||||
@ -25,7 +25,7 @@ You should be able to see in the client logs that sync connection has been estab
|
||||
|
||||
### Additional sync client(s) setup
|
||||
|
||||
Setting up extra sync clients is very similar to setting up a server - make sure everything is stopped, copy the [[document|Document]], set up client's ```syncServerHost``` in ```config.ini``` to point to the sync server and then start everything up.
|
||||
Setting up extra sync clients is very similar to setting up a server - make sure everything is stopped, copy the [[document|Document]], set up client's `syncServerHost` in `config.ini` to point to the sync server and then start everything up.
|
||||
|
||||
## Conflict resolution
|
||||
|
||||
|
@ -10,13 +10,13 @@ You can manipulate the tree simply by dragging and dropping notes as you can see
|
||||
|
||||
Trilium provides fast keyboard based manipulation with following shortcuts:
|
||||
|
||||
* ```SHIFT-UP``` and ```SHIFT-DOWN``` - move note up or down in the order
|
||||
* ```SHIFT-LEFT``` - move note upwards in the hierarchy by changing a note's parent to note's parent's parent.
|
||||
* ```SHIFT-RIGHT``` - move note downwards in the hierarchy by setting parent to the note currently above (this is a bit hard to explain - it's best to see a demo or try it for yourself)
|
||||
* ```LEFT``` and ```RIGHT``` expands and collapses a sub-tree
|
||||
* `SHIFT-UP` and `SHIFT-DOWN` - move note up or down in the order
|
||||
* `SHIFT-LEFT` - move note upwards in the hierarchy by changing a note's parent to note's parent's parent.
|
||||
* `SHIFT-RIGHT` - move note downwards in the hierarchy by setting parent to the note currently above (this is a bit hard to explain - it's best to see a demo or try it for yourself)
|
||||
* `LEFT` and `RIGHT` expands and collapses a sub-tree
|
||||
|
||||
[[gifs/move-note-with-keyboard.gif]]
|
||||
|
||||
## Context menu
|
||||
|
||||
You can also move notes with familiar cut & paste from context menu or associated keyboard shortcuts ```CTRL-X``` (cut) and ```CTRL-V``` (paste).
|
||||
You can also move notes with familiar cut & paste from context menu or associated keyboard shortcuts `CTRL-X` (cut) and `CTRL-V` (paste).
|
@ -4,7 +4,7 @@ Trilium is currently alpha quality software so it's quite expected there will be
|
||||
|
||||
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 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.
|
||||
|
||||
@ -24,13 +24,13 @@ Trilium uses GitHub issues - so please send your reports here: https://github.co
|
||||
|
||||
### Browser console
|
||||
|
||||
If Trilium UI is acting up, open developer console by pressing ```CTRL-SHIFT-I```, there might be some relevant errors or warnings.
|
||||
If Trilium UI is acting up, open developer console by pressing `CTRL-SHIFT-I`, there might be some relevant errors or warnings.
|
||||
|
||||
All JavaScript errors should be also logged to backend logs, but it's possible something was missed.
|
||||
|
||||
### Backend logs
|
||||
|
||||
Trilium logs important events and errors into ```trilium-data/logs``` directory. These logs are very helpful in debugging problems so please attach the latest ones with your bug report. You don't have to worry, they don't contain any sensitive information about your notes.
|
||||
Trilium logs important events and errors into `trilium-data/logs` directory. These logs are very helpful in debugging problems so please attach the latest ones with your bug report. You don't have to worry, they don't contain any sensitive information about your notes.
|
||||
|
||||
### Anonymized database
|
||||
|
||||
@ -38,4 +38,4 @@ In some cases it's necessary to see the database structure to be able to debug t
|
||||
|
||||
For this Trilium supports anonymization of the database - you can trigger this in Settings -> Advanced tab.
|
||||
|
||||
This will create a copy of your document and remove all sensitive data (currently note titles and note contents) while leaving all structure and metadata (e.g. date of last change). After this is done, database is [VACUUMed](https://sqlite.org/lang_vacuum.html) to make sure there's no stale sensitive data in the document file. Resulting file is stored in ```trilium-data/anonymized``` directory. You can safely attach it with your bug report.
|
||||
This will create a copy of your document and remove all sensitive data (currently note titles and note contents) while leaving all structure and metadata (e.g. date of last change). After this is done, database is [VACUUMed](https://sqlite.org/lang_vacuum.html) to make sure there's no stale sensitive data in the document file. Resulting file is stored in `trilium-data/anonymized` directory. You can safely attach it with your bug report.
|
||||
|
Loading…
x
Reference in New Issue
Block a user