From c892c95aae6b34e32b083f1993cda4c64033cfd3 Mon Sep 17 00:00:00 2001
From: Elian Doran Select an existing day note, and the menubar contains a calendar widget.
Select any day to create a note for that day.
- This pattern works well also because of Cloning Notes functionality
- note can appear in multiple places in the note tree, so besides appearing
under day note, it can also be categorized into other notes.
- 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"
@@ -43,9 +41,7 @@
from Task manager). You can also notice how this day note has promoted attribute "weight"
where you can track your daily weight. This data is then used in Weight tracker. Trilium provides template functionality,
and it could be used together with day notes. You can define one of the following relations on the root of the journal
@@ -59,9 +55,7 @@
month or date, it will take a look at the root and attach a corresponding It's possible to customize the title of generated date notes by defining
a It is also possible to customize the title of generated month notes through
the The default is Trilium has some special support for day notes in the form of backend Script API -
see e.g. getDayNote() function. Day (and year, month) notes are created with a label - e.g. Task Manager is a promoted attributes and
scriptsshowcase present in the demo notes.
- Task Manager manages outstanding (TODO) tasks and finished tasks (non-empty
doneDate attribute). Outstanding tasks are further categorized by location
@@ -30,16 +28,12 @@
notes are cloned into
day note to both todoDate note and doneDate note (with prefix of
either "TODO" or "DONE"). New tasks are created in the TODO note which has Task template defines several promoted attributes -
todoDate, doneDate, tags, location. Importantly it also defines There's also "button" note which contains simple script which adds a button
- to create new note (task) in the TODO note.
+
Demo
-
+ Demo
+
Templates
-
+ Templates
~template
relation
to the newly created role. Using this, you can e.g. create your daily template
with e.g. checkboxes for daily routine etc.Date pattern
-
+ Date pattern
#datePattern
label on a root calendar note (identified by #calendarRoot
label).
Following are possible values:{ordinal}
is replaced with the ordinal date (e.g. 1st, 2nd,
3rd) etc.Month pattern
-
+ Month pattern
#monthPattern
attribute, much like #datePattern
.
The options are:{monthNumberPadded} - {month}
Implementation
-
+ Implementation
#dateNote="2018-08-16"
this
diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Advanced Showcases/Task Manager.html b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Advanced Showcases/Task Manager.html
index 0666d4c7d..1a7e9bf4e 100644
--- a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Advanced Showcases/Task Manager.html
+++ b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Advanced Showcases/Task Manager.html
@@ -16,11 +16,9 @@
Demo
-
+ Demo
+
Implementation
-
+ Implementation
~child:template
relation(see attribute inheritance)
pointing to the task template.Attributes
-
+ Attributes
~runOnAttributeChange
relation
- event handler which is
@@ -47,12 +41,9 @@
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
-
+ New task button
api.addButtonToToolbar({
+ to create new note (task) in the TODO note.
api.addButtonToToolbar({
title: 'New task',
icon: 'check',
shortcut: 'alt+n',
@@ -71,12 +62,10 @@
}
});
In the demo screenshot above you may notice that TODO tasks are in red color and DONE tasks are green.
This is done by having this CSS code note which - defines extra CSS classes:
-span.fancytree-node.todo .fancytree-title {
+ defines extra CSS classes:span.fancytree-node.todo .fancytree-title {
color: red !important;
}
diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Advanced Showcases/Weight Tracker.html b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Advanced Showcases/Weight Tracker.html
index 2060f0b5c..1629f2af4 100644
--- a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Advanced Showcases/Weight Tracker.html
+++ b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Advanced Showcases/Weight Tracker.html
@@ -14,16 +14,14 @@
-
+
The Weight Tracker
is a Script API showcase
present in the demo notes.
By adding weight
as a promoted attribute in
the template from which day notes are
created, you can aggregate the data and plot weight change over time.
-
-Implementation
-
+ Implementation
The Weight Tracker
note in the screenshot above is of the type Render Note
.
That type of note doesn't have any useful content itself. Instead it is
a placeholder where a script can
@@ -37,12 +35,9 @@
chart.jswhich is imported as an attachment, since it's not built into
Trilium.
-
-Code
-
+ Code
Here's the content of the script which is placed in a code note of
- type JS Frontend
:
-async function getChartData() {
+ type JS Frontend
:async function getChartData() {
const days = await api.runOnBackend(async () => {
const notes = api.getNotesWithLabel('weight');
const days = [];
@@ -88,7 +83,6 @@ new chartjs.Chart(ctx, {
data: await getChartData()
});
How to remove the Weight Tracker button from the top bar
-
In the link map of the Weight Tracker
, there is a note called Button
.
Open it and delete or comment out its contents. The Weight Tracker
button
will disappear after you restart Trilium.
diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Attributes.html b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Attributes.html
index a4e1f4023..8dddf4433 100644
--- a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Attributes.html
+++ b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Attributes.html
@@ -22,11 +22,9 @@
These attributes play a crucial role in organizing, categorising, and
enhancing the functionality of notes.
-
+
-
-Labels
-
+ Labels
Labels in Trilium can be used for a variety of purposes:
- Metadata: Assign labels with optional values for categorization,
@@ -39,9 +37,7 @@
Labels are also searchable, enhancing note retrieval.
-
-Common Labels for Advanced Configuration
-
+ Common Labels for Advanced Configuration
**disableVersioning**
: Disables automatic versioning, ideal
for large, unimportant notes like script libraries
@@ -111,41 +107,29 @@
note's editor
**viewType**
: Sets the view of child notes (grid or list)
-
-Relations
-
+ Relations
Relations define connections between notes, similar to links.
-
-Uses
-
+ Uses
- Metadata Relationships: For example, linking a book note
to an author note
- Scripting: Attaching scripts to events or conditions
related to the note
-
-Common Relations
-
+ Common Relations
- Event-based Relations: Such as
runOnNoteCreation
or runOnNoteChange
,
which trigger scripts on specific actions
- Other Relations: Include
template
, renderNote
, widget
,
and sharing-related relations
-
-Multiplicity
-
+ Multiplicity
Attributes in Trilium can be "multivalued", meaning multiple attributes
with the same name can coexist.
-
-Attribute Definitions and Promoted Attributes
-
+ Attribute Definitions and Promoted Attributes
Special labels create "label/attribute" definitions, enhancing the organization
and management of attributes. For more details, see Promoted attributes.
-
-Attribute Inheritance
-
+ Attribute Inheritance
Trilium supports attribute inheritance, allowing child notes to inherit
attributes from their parents. For more information, see Attribute inheritance.
diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Attributes/Attribute Inheritance.html b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Attributes/Attribute Inheritance.html
index b47059053..f07d3a74f 100644
--- a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Attributes/Attribute Inheritance.html
+++ b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Attributes/Attribute Inheritance.html
@@ -14,27 +14,20 @@
1. Standard Inheritance
-
In Trilium, attributes can be automatically inherited by child notes if
they have the isInheritable
flag set to true
. This
means the attribute (a key-value pair) is applied to the note and all its
descendants.
-
-Example Use Case
-
+ Example Use Case
The archived
label can be set to be inheritable, allowing you
to hide a whole subtree of notes from searches and other dialogs by applying
this label at the top level.
-
-2. Copying Inheritance
-
+ 2. Copying Inheritance
Copying inheritance differs from standard inheritance by using a child:
prefix
in the attribute name. This prefix causes new child notes to automatically
receive specific attributes from the parent note. These attributes are
independent of the parent and will persist even if the note is moved elsewhere.
-
-How to Use
-
+ How to Use
- Syntax:
#child:attributeName
@@ -42,16 +35,12 @@
as #child:child:attributeName
, where each child down the hierarchy
receives the appropriate attribute.
-
-Example
-
+ Example
If a parent note has the label #child:exampleAttribute
, all
newly created child notes will inherit the #exampleAttribute
label.
This can be useful for setting default properties for notes in a specific
section.
-
-3. Template Inheritance
-
+ 3. Template Inheritance
Attributes can also be inherited from templates.
When a new note is created using a template, it inherits the attributes
defined in that template. This is particularly useful for maintaining consistency
diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Attributes/Promoted Attributes.html b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Attributes/Promoted Attributes.html
index 3ba0f2a97..325639164 100644
--- a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Attributes/Promoted Attributes.html
+++ b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Attributes/Promoted Attributes.html
@@ -17,7 +17,7 @@
are considered important and thus are "promoted" onto the main note UI.
See example below:
-
+
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
@@ -26,15 +26,13 @@
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?
-
-Attribute definition
-
+ Attribute definition
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? And importantly, should we promote the attribute or not?
-
+
You can notice tag attribute definition. These "definition" attributes
define how the "value" attributes should behave.
@@ -43,9 +41,7 @@
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.
-
-Inverse relation
-
+ Inverse relation
Some relations always occur in pairs - my favorite example is on the family.
If you have a note representing husband and note representing wife, then
there might be a relation between those two of isPartnerOf
.
diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Attributes/Template.html b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Attributes/Template.html
index cf981128e..2fbb6b93a 100644
--- a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Attributes/Template.html
+++ b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Attributes/Template.html
@@ -28,9 +28,7 @@
Child Note Duplication: All child notes of the template
are deep-duplicated to the instance note.
-
-Example
-
+ Example
A typical example would be a "Book" template note, which might include:
- Promoted Attributes: Such as publication year, author,
@@ -41,18 +39,15 @@
etc.
-
+
-
-Instance Note
-
+ Instance Note
An instance note is a note related to a template note. This relationship
means the instance note's content is initialized from the template, and
all attributes from the template are inherited.
To create an instance note through the UI:
-
+
For the template to appear in the menu, the template note must have the #template
label.
Do not confuse this with the ~template
relation, which links
@@ -61,9 +56,7 @@
them only in the workspace.
Templates can also be added or changed after note creation by creating
a ~template
relation pointing to the desired template note.
-
-Additional Notes
-
+ Additional Notes
From a visual perspective, templates can define #iconClass
and #cssClass
attributes,
allowing all instance notes (e.g., books) to display a specific icon and
CSS style.
diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Bulk actions.html b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Bulk actions.html
index ae5aa731a..1def3fbf0 100644
--- a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Bulk actions.html
+++ b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Bulk actions.html
@@ -14,15 +14,12 @@
Execute script
-
For more complex scenarios, it is possible to type in a JavaScript expression
in order to apply the necessary changes.
To apply a suffix (- suffix
in this example), to the note
- title:
-note.title = note.title + " - suffix";
+ title:note.title = note.title + " - suffix";
To alter attributes of a note in a bulk action, such as setting the #shareAlias
label
- to the title of the note:
-note.setLabel("shareAlias", note.title)
+ to the title of the note:note.setLabel("shareAlias", note.title)