Skip to content

Build your personal knowledge base with Trilium Notes

feat(docs): update day notes documentation

Elian Doran15f62ba1c3c9
diff --git a/docs/User Guide/User Guide/Advanced Usage/Advanced Showcases/Day Notes.md b/docs/User Guide/User Guide/Advanced Usage/Advanced Showcases/Day Notes.md
index 0120574acf..06e40a9d0b 100644
--- a/docs/User Guide/User Guide/Advanced Usage/Advanced Showcases/Day Notes.md
+++ b/docs/User Guide/User Guide/Advanced Usage/Advanced Showcases/Day Notes.md
@@ -1,4 +1,4 @@
-# Day Notes
+# Day Notes
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.
@@ -100,4 +100,4 @@ Trilium has some special support for day notes in the form of [backend Script AP
Day (and year, month) notes are created with a label - e.g. `#dateNote="2025-03-09"` 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). Please note that, when you enable week notes or quarter notes, it will not automatically change the relation for the child level.
+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). Please note that, when you enable week notes or quarter notes, it will not automatically change the relation for the child level.
\ No newline at end of file
diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Advanced Showcases/Day Notes.html b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Advanced Showcases/Day Notes.html
index f9b3cbf2ee..2b4b909ee0 100644
--- a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Advanced Showcases/Day Notes.html
+++ b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Advanced Showcases/Day Notes.html
@@ -35,12 +35,19 @@
<img src="Day Notes_image.png">
</p>
<p>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
+ - there's a note for the whole year 2025, under it, you have "03 - March"
+ which then contains "09 - Monday". This is our "day note" which contains
some text in its content and also has some child notes (some of them are
from <a href="Task%20Manager.html">Task manager</a>).</p>
<p>You can also notice how this day note has <a href="../Attributes/Promoted%20Attributes.html">promoted attribute</a> "weight"
where you can track your daily weight. This data is then used in <a href="Weight%20Tracker.html">Weight tracker</a>.</p>
+ <h2>Week Note and Quarter Note</h2>
+ <p>Week and quarter notes are disabled by default, since it might be too
+ much for some people. To enable them, you need to set <code>#enableWeekNotes</code> and <code>#enableQuarterNotes</code> attributes
+ on the root calendar note, which is identified by <code>#calendarRoot</code> label.
+ Week note is affected by the first week of year option. Be careful when
+ you already have some week notes created, it will not automatically change
+ the existing week notes and might lead to some duplicates.</p>
<h2>Templates</h2>
<p>Trilium provides <a href="../Templates.html">template</a> functionality,
and it could be used together with day notes.</p>
@@ -48,36 +55,69 @@
(identified by <code>#calendarRoot</code> label):</p>
<ul>
<li>yearTemplate</li>
+ <li>quarterTemplate (if <code>#enableQuarterNotes</code> is set)</li>
<li>monthTemplate</li>
+ <li>weekTemplate (if <code>#enableWeekNotes</code> is set)</li>
<li>dateTemplate</li>
</ul>
<p>All of these are relations. When Trilium creates a new note for year or
month or date, it will take a look at the root and attach a corresponding <code>~template</code> relation
to the newly created role. Using this, you can e.g. create your daily template
with e.g. checkboxes for daily routine etc.</p>
- <h2>Date pattern</h2>
+ <h2>Naming pattern</h2>
+ <p>You can customize the title of generated journal notes by defining a <code>#datePattern</code>, <code>#weekPattern</code>, <code>#monthPattern</code>, <code>#quarterPattern</code> and <code>#yearPattern</code> attribute
+ on a root calendar note (identified by <code>#calendarRoot</code> label).
+ The naming pattern replacements follow a level-up compatibility - each
+ level can use replacements from itself and all levels above it. For example, <code>#monthPattern</code> can
+ use month, quarter and year replacements, while <code>#weekPattern</code> can
+ use week, month, quarter and year replacements. But it is not possible
+ to use week replacements in <code>#monthPattern</code>.</p>
+ <h3>Date pattern</h3>
<p>It's possible to customize the title of generated date notes by defining
- a <code>#datePattern</code> label on a root calendar note (identified by <code>#calendarRoot</code> label).
- Following are possible values:</p>
+ a <code>#datePattern</code> attribute on a root calendar note (identified
+ by <code>#calendarRoot</code> label). Following are possible values:</p>
<ul>
- <li><code>{dayInMonthPadded} - {weekDay}</code> day notes are named e.g. "24
- - Monday"</li>
- <li><code>{dayInMonthPadded}: {weekDay3}</code> day notes are named e.g. "24:
- Mon"</li>
- <li><code>{dayInMonthPadded}: {weekDay2}</code> day notes are named e.g. "24:
- Mo"</li>
- <li><code>{isoDate} - {weekDay}</code> day notes are named e.g. "2020-12-24
- - Monday"</li>
+ <li><code>{isoDate}</code> results in an ISO 8061 formatted date (e.g. "2025-03-09"
+ for March 9, 2025)</li>
+ <li><code>{dateNumber}</code> results in a number like <code>9</code> for the
+ 9th day of the month, <code>11</code> for the 11th day of the month</li>
+ <li><code>{dateNumberPadded}</code> results in a number like <code>09</code> for
+ the 9th day of the month, <code>11</code> for the 11th day of the month</li>
<li><code>{ordinal}</code> is replaced with the ordinal date (e.g. 1st, 2nd,
3rd) etc.</li>
+ <li><code>{weekDay}</code> results in the full day name (e.g. <code>Monday</code>)</li>
+ <li><code>{weekDay3}</code> is replaced with the first 3 letters of the day,
+ e.g. Mon, Tue, etc.</li>
+ <li><code>{weekDay2}</code> is replaced with the first 2 letters of the day,
+ e.g. Mo, Tu, etc.</li>
</ul>
- <h2>Month pattern</h2>
+ <p>The default is <code>{dateNumberPadded} - {weekDay}</code>
+ </p>
+ <h3>Week pattern</h3>
+ <p>It is also possible to customize the title of generated week notes through
+ the <code>#weekPattern</code> attribute on the root calendar note. The options
+ are:</p>
+ <ul>
+ <li><code>{weekNumber}</code> results in a number like <code>9</code> for the
+ 9th week of the year, <code>11</code> for the 11th week of the year</li>
+ <li><code>{weekNumberPadded}</code> results in a number like <code>09</code> for
+ the 9th week of the year, <code>11</code> for the 11th week of the year</li>
+ <li><code>{shortWeek}</code> results in a short week string like <code>W9</code> for
+ the 9th week of the year, <code>W11</code> for the 11th week of the year</li>
+ <li><code>{shortWeek3}</code> results in a short week string like <code>W09</code> for
+ the 9th week of the year, <code>W11</code> for the 11th week of the year</li>
+ </ul>
+ <p>The default is <code>Week {weekNumber}</code>
+ </p>
+ <h3>Month pattern</h3>
<p>It is also possible to customize the title of generated month notes through
- the <code>#monthPattern</code> attribute, much like <code>#datePattern</code>.
- The options are:</p>
+ the <code>#monthPattern</code> attribute on the root calendar note. The options
+ are:</p>
<ul>
<li><code>{isoMonth}</code> results in an ISO 8061 formatted month (e.g. "2025-03"
for March 2025)</li>
+ <li><code>{monthNumber}</code> results in a number like <code>9</code> for September,
+ and <code>11</code> for November</li>
<li><code>{monthNumberPadded}</code> results in a number like <code>09</code> for
September, and <code>11</code> for November</li>
<li><code>{month}</code> results in the full month name (e.g. <code>September</code> or <code>October</code>)</li>
@@ -88,14 +128,37 @@
</ul>
<p>The default is <code>{monthNumberPadded} - {month}</code>
</p>
+ <h3>Quarter pattern</h3>
+ <p>It is also possible to customize the title of generated quarter notes
+ through the <code>#quarterPattern</code> attribute on the root calendar note.
+ The options are:</p>
+ <ul>
+ <li><code>{quarterNumber}</code> results in a number like <code>1</code> for
+ the 1st quarter of the year</li>
+ <li><code>{shortQuarter}</code> results in a short quarter string like <code>Q1</code> for
+ the 1st quarter of the year</li>
+ </ul>
+ <p>The default is <code>Quarter {quarterNumber}</code>
+ </p>
+ <h3>Year pattern</h3>
+ <p>It is also possible to customize the title of generated year notes through
+ the <code>#yearPattern</code> attribute on the root calendar note. The options
+ are:</p>
+ <ul>
+ <li><code>{year}</code> results in the full year (e.g. <code>2025</code>)</li>
+ </ul>
+ <p>The default is <code>{year}</code>
+ </p>
<h2>Implementation</h2>
<p>Trilium has some special support for day notes in the form of <a href="https://triliumnext.github.io/Notes/backend_api/BackendScriptApi.html">backend Script API</a> -
see e.g. getDayNote() function.</p>
- <p>Day (and year, month) notes are created with a label - e.g. <code>#dateNote="2018-08-16"</code> this
+ <p>Day (and year, month) notes are created with a label - e.g. <code>#dateNote="2025-03-09"</code> this
can then be used by other scripts to add new notes to day note etc.</p>
<p>Journal also has relation <code>child:child:child:template=Day template</code> (see
[[attribute inheritance]]) which effectively adds [[template]] to day notes
- (grand-grand-grand children of Journal).</p>
+ (grand-grand-grand children of Journal). Please note that, when you enable
+ week notes or quarter notes, it will not automatically change the relation
+ for the child level.</p>
</div>
</div>
</body>