Merge branch 'develop' into feat/clean-share-url

This commit is contained in:
Jin
2025-04-10 21:47:44 +02:00
677 changed files with 17151 additions and 9629 deletions

4
.github/FUNDING.yml vendored
View File

@@ -1,4 +1,4 @@
# These are supported funding model platforms
github: [zadam]
custom: ["https://paypal.me/za4am"]
github: [eliandoran]
custom: ["https://paypal.me/eliandoran"]

100
.github/workflows/codeql.yml vendored Normal file
View File

@@ -0,0 +1,100 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL Advanced"
on:
push:
branches: [ "develop" ]
pull_request:
branches: [ "develop" ]
schedule:
- cron: '20 7 * * 0'
jobs:
analyze:
name: Analyze (${{ matrix.language }})
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners (GitHub.com only)
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
permissions:
# required for all workflows
security-events: write
# required to fetch internal or private CodeQL packs
packages: read
# only required for workflows in private repositories
actions: read
contents: read
strategy:
fail-fast: false
matrix:
include:
- language: actions
build-mode: none
- language: javascript-typescript
build-mode: none
# CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
# Use `c-cpp` to analyze code written in C, C++ or both
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
steps:
- name: Checkout repository
uses: actions/checkout@v4
# Add any setup steps before running the `github/codeql-action/init` action.
# This includes steps like installing compilers or runtimes (`actions/setup-node`
# or others). This is typically only required for manual builds.
# - name: Setup runtime (example)
# uses: actions/setup-example@v1
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
# If the analyze step fails for one of the languages you are analyzing with
# "We were unable to automatically build your code", modify the matrix above
# to set the build mode to "manual" for that language. Then modify this step
# to build your code.
# Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
- if: matrix.build-mode == 'manual'
shell: bash
run: |
echo 'If you are using a "manual" build mode for one or more of the' \
'languages you are analyzing, replace this with the commands to build' \
'your code, for example:'
echo ' make bootstrap'
echo ' make release'
exit 1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"

View File

@@ -1,6 +1,6 @@
# TriliumNext Notes
![Docker Pulls](https://img.shields.io/docker/pulls/triliumnext/notes) ![GitHub Downloads (all assets, all releases)](https://img.shields.io/github/downloads/triliumnext/notes/total)
![GitHub Sponsors](https://img.shields.io/github/sponsors/eliandoran) ![Docker Pulls](https://img.shields.io/docker/pulls/triliumnext/notes) ![GitHub Downloads (all assets, all releases)](https://img.shields.io/github/downloads/triliumnext/notes/total)
[English](./README.md) | [Chinese](./README-ZH_CN.md) | [Russian](./README.ru.md) | [Japanese](./README.ja.md) | [Italian](./README.it.md) | [Spanish](./README.es.md)

View File

@@ -14,7 +14,8 @@ UPDATE attributes SET name = 'name', value = 'value' WHERE type = 'label'
'widget', 'noteInfoWidgetDisabled', 'linkMapWidgetDisabled', 'revisionsWidgetDisabled',
'whatLinksHereWidgetDisabled', 'similarNotesWidgetDisabled', 'workspace', 'workspaceIconClass',
'workspaceTabBackgroundColor', 'workspaceCalendarRoot', 'workspaceTemplate', 'searchHome', 'workspaceInbox',
'workspaceSearchHome', 'sqlConsoleHome', 'datePattern', 'pageSize', 'viewType', 'mapRootNoteId',
'workspaceSearchHome', 'sqlConsoleHome', 'datePattern', 'weekPattern', 'enableWeekNote', 'monthPattern',
'quarterPattern', 'yearPattern', 'enableQuarterNote', 'pageSize', 'viewType', 'mapRootNoteId',
'bookmarkFolder', 'sorted', 'sortDirection', 'sortFoldersFirst', 'sortNatural', 'sortLocale', 'top',
'fullContentWidth', 'shareHiddenFromTree', 'shareExternalLink', 'shareOmitDefaultCss', 'shareRoot', 'shareDescription',
'shareRaw', 'shareDisallowRobotIndexing', 'shareIndex', 'displayRelations', 'hideRelations', 'titleTemplate',
@@ -31,7 +32,8 @@ UPDATE attributes SET name = 'name' WHERE type = 'relation'
'widget', 'noteInfoWidgetDisabled', 'linkMapWidgetDisabled', 'revisionsWidgetDisabled',
'whatLinksHereWidgetDisabled', 'similarNotesWidgetDisabled', 'workspace', 'workspaceIconClass',
'workspaceTabBackgroundColor', 'workspaceCalendarRoot', 'workspaceTemplate', 'searchHome', 'workspaceInbox',
'workspaceSearchHome', 'sqlConsoleHome', 'datePattern', 'pageSize', 'viewType', 'mapRootNoteId',
'workspaceSearchHome', 'sqlConsoleHome', 'datePattern', 'weekPattern', 'enableWeekNote', 'monthPattern',
'quarterPattern', 'yearPattern', 'enableQuarterNote', 'pageSize', 'viewType', 'mapRootNoteId',
'bookmarkFolder', 'sorted', 'sortDirection', 'sortFoldersFirst', 'sortNatural', 'sortLocale', 'top',
'fullContentWidth', 'shareHiddenFromTree', 'shareExternalLink', 'shareOmitDefaultCss', 'shareRoot', 'shareDescription',
'shareRaw', 'shareDisallowRobotIndexing', 'shareIndex', 'displayRelations', 'hideRelations', 'titleTemplate',

Binary file not shown.

View File

@@ -147,7 +147,7 @@
"title": "Inbox",
"notePosition": 10,
"prefix": null,
"isExpanded": false,
"isExpanded": true,
"type": "text",
"mime": "text/html",
"attributes": [
@@ -219,7 +219,22 @@
"isExpanded": false,
"type": "text",
"mime": "text/html",
"attributes": [],
"attributes": [
{
"type": "relation",
"name": "includeNoteLink",
"value": "ZWCYra81yOFO",
"isInheritable": false,
"position": 10
},
{
"type": "relation",
"name": "internalLink",
"value": "_help_nBAXQFj20hS1",
"isInheritable": false,
"position": 20
}
],
"format": "html",
"dataFileName": "The Last Question.html",
"attachments": [],

View File

@@ -18,22 +18,28 @@
height="150">
</figure>
<p><strong>Welcome to TriliumNext Notes!</strong>
</p>
<p>This is initial "demo" document provided by TriliumNext by default to
showcase some of its features and also give you some ideas how you might
structure your notes. You can play with it, modify note content and tree
structure as you wish.</p>
<p>If you need any help, visit TriliumNext website: <a href="https://github.com/TriliumNext">https://github.com/TriliumNext</a>
</p>
<h3>Cleanup</h3>
<p>Once you're finished with experimenting and want to cleanup these pages,
you can simply delete them all.</p>
<h3>Formatting</h3>
<p>TriliumNext supports classic formatting like <em>italic</em>, <strong>bold</strong>, <em><strong>bold and italic</strong></em>.
Of course you can add links like this one pointing to <a href="http://www.google.com">google.com</a>
</p>
<p>Lists</p>
<p><strong>Ordered:</strong>
</p>
<ol>
<li>First Item</li>
@@ -48,6 +54,7 @@
</li>
</ol>
<p><strong>Unordered:</strong>
</p>
<ul>
<li>Item</li>

View File

@@ -18,21 +18,25 @@
<li>
<label class="todo-list__label">
<input type="checkbox" disabled="disabled"><span class="todo-list__label__description">buy milk&nbsp;&nbsp;</span>
</label>
</li>
<li>
<label class="todo-list__label">
<input type="checkbox" checked="checked" disabled="disabled"><span class="todo-list__label__description">do the laundry&nbsp;&nbsp;</span>
</label>
</li>
<li>
<label class="todo-list__label">
<input type="checkbox" checked="checked" disabled="disabled"><span class="todo-list__label__description">watch TV&nbsp;&nbsp;</span>
</label>
</li>
<li>
<label class="todo-list__label">
<input type="checkbox" disabled="disabled"><span class="todo-list__label__description">eat ice cream&nbsp;&nbsp;</span>
</label>
</li>
</ul>

View File

@@ -15,7 +15,9 @@
<div class="ck-content">
<p><span class="math-tex">\(% \f is defined as #1f(#2) using the macro \f\relax{x} = \int_{-\infty}^\infty &nbsp; &nbsp; \f\hat\xi\,e^{2 \pi i \xi x} &nbsp; &nbsp; \,d\xi\)</span>Some
math examples:</p><span class="math-tex">\[\displaystyle \frac{1}{\Bigl(\sqrt{\phi \sqrt{5}}-\phi\Bigr) e^{\frac25 \pi}} = 1+\frac{e^{-2\pi}} {1+\frac{e^{-4\pi}} {1+\frac{e^{-6\pi}} {1+\frac{e^{-8\pi}} {1+\cdots} } } }\]</span>
<p>Another:</p><span class="math-tex">\[\displaystyle \left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right)\]</span>
<p>Inline math is also possible:&nbsp;<span class="math-tex">\(c^2 = a^2 + b^2\)</span>&nbsp;</p>
<p>&nbsp;</p>
</div>

View File

@@ -21,8 +21,7 @@
class="include-note" data-note-id="ZWCYra81yOFO" data-box-size="medium">&nbsp;</section>
<p>This page demonstrates two things:</p>
<ul>
<li>possibility to <a href="https://github.com/zadam/trilium/wiki/Text-editor#include-note">include one note into another</a>
<li>possibility to <a href="#root/_hidden/_help/_help_KSZ04uQ2D1St/_help_iPIMuisry3hd/_help_nBAXQFj20hS1">include one note into another</a>
</li>
<li>PDF preview - you can read PDFs directly in Trilium!</li>
</ul>

View File

@@ -14,6 +14,7 @@
<div class="ck-content">
<p>You can read some explanation on how this journal works here: <a href="https://github.com/zadam/trilium/wiki/Day-notes">https://github.com/zadam/trilium/wiki/Day-notes</a>
</p>
</div>
</div>

View File

@@ -24,14 +24,17 @@
<span
class="footnote-reference" data-footnote-reference="" data-footnote-index="1"
data-footnote-id="6qz4pm021mi" role="doc-noteref" id="fnref6qz4pm021mi"><sup><a href="#fn6qz4pm021mi">[1]</a></sup>
</span>
</p>
<ol class="footnote-section footnotes" data-footnote-section="" role="doc-endnotes">
<li class="footnote-item" data-footnote-item="" data-footnote-index="1"
data-footnote-id="6qz4pm021mi" role="doc-endnote" id="fn6qz4pm021mi"><span class="footnote-back-link" data-footnote-back-link="" data-footnote-id="6qz4pm021mi"><sup><strong><a href="#fnref6qz4pm021mi">^</a></strong></sup></span>
<div
class="footnote-content" data-footnote-content="">
<p><a href="https://www.thecollector.com/what-are-the-seven-wonders-of-the-world/">What Are the 7 Wonders of the World? (with HD Images) | TheCollector</a>
</p>
</div>
</li>

View File

@@ -26,13 +26,16 @@
been brought to its knees.<span class="footnote-reference" data-footnote-reference=""
data-footnote-index="1" data-footnote-id="o6g991vkrwj" role="doc-noteref"
id="fnrefo6g991vkrwj"><sup><a href="#fno6g991vkrwj">[1]</a></sup></span>
</p>
<ol class="footnote-section footnotes" data-footnote-section="" role="doc-endnotes">
<li class="footnote-item" data-footnote-item="" data-footnote-index="1"
data-footnote-id="o6g991vkrwj" role="doc-endnote" id="fno6g991vkrwj"><span class="footnote-back-link" data-footnote-back-link="" data-footnote-id="o6g991vkrwj"><sup><strong><a href="#fnrefo6g991vkrwj">^</a></strong></sup></span>
<div
class="footnote-content" data-footnote-content="">
<p><a href="https://www.thecollector.com/what-are-the-seven-wonders-of-the-world/">What Are the 7 Wonders of the World? (with HD Images) | TheCollector</a>
</p>
</div>
</li>

View File

@@ -22,13 +22,16 @@
around 1450 in polished drystone walls.<span class="footnote-reference"
data-footnote-reference="" data-footnote-index="1" data-footnote-id="4prjheuho88"
role="doc-noteref" id="fnref4prjheuho88"><sup><a href="#fn4prjheuho88">[1]</a></sup></span>
</p>
<ol class="footnote-section footnotes" data-footnote-section="" role="doc-endnotes">
<li class="footnote-item" data-footnote-item="" data-footnote-index="1"
data-footnote-id="4prjheuho88" role="doc-endnote" id="fn4prjheuho88"><span class="footnote-back-link" data-footnote-back-link="" data-footnote-id="4prjheuho88"><sup><strong><a href="#fnref4prjheuho88">^</a></strong></sup></span>
<div
class="footnote-content" data-footnote-content="">
<p><a href="https://www.thecollector.com/what-are-the-seven-wonders-of-the-world/">What Are the 7 Wonders of the World? (with HD Images) | TheCollector</a>
</p>
</div>
</li>

View File

@@ -23,13 +23,16 @@
by earthquakes.<span class="footnote-reference" data-footnote-reference=""
data-footnote-index="1" data-footnote-id="ej5sd0bakne" role="doc-noteref"
id="fnrefej5sd0bakne"><sup><a href="#fnej5sd0bakne">[1]</a></sup></span>
</p>
<ol class="footnote-section footnotes" data-footnote-section="" role="doc-endnotes">
<li class="footnote-item" data-footnote-item="" data-footnote-index="1"
data-footnote-id="ej5sd0bakne" role="doc-endnote" id="fnej5sd0bakne"><span class="footnote-back-link" data-footnote-back-link="" data-footnote-id="ej5sd0bakne"><sup><strong><a href="#fnrefej5sd0bakne">^</a></strong></sup></span>
<div
class="footnote-content" data-footnote-content="">
<p><a href="https://www.thecollector.com/what-are-the-seven-wonders-of-the-world/">What Are the 7 Wonders of the World? (with HD Images) | TheCollector</a>
</p>
</div>
</li>

View File

@@ -26,14 +26,17 @@
<span
class="footnote-reference" data-footnote-reference="" data-footnote-index="1"
data-footnote-id="4kitkusvyi3" role="doc-noteref" id="fnref4kitkusvyi3"><sup><a href="#fn4kitkusvyi3">[1]</a></sup>
</span>
</p>
<ol class="footnote-section footnotes" data-footnote-section="" role="doc-endnotes">
<li class="footnote-item" data-footnote-item="" data-footnote-index="1"
data-footnote-id="4kitkusvyi3" role="doc-endnote" id="fn4kitkusvyi3"><span class="footnote-back-link" data-footnote-back-link="" data-footnote-id="4kitkusvyi3"><sup><strong><a href="#fnref4kitkusvyi3">^</a></strong></sup></span>
<div
class="footnote-content" data-footnote-content="">
<p><a href="https://www.thecollector.com/what-are-the-seven-wonders-of-the-world/">What Are the 7 Wonders of the World? (with HD Images) | TheCollector</a>
</p>
</div>
</li>

View File

@@ -23,14 +23,17 @@
<span
class="footnote-reference" data-footnote-reference="" data-footnote-index="1"
data-footnote-id="o0o2das7ljm" role="doc-noteref" id="fnrefo0o2das7ljm"><sup><a href="#fno0o2das7ljm">[1]</a></sup>
</span>
</p>
<ol class="footnote-section footnotes" data-footnote-section="" role="doc-endnotes">
<li class="footnote-item" data-footnote-item="" data-footnote-index="1"
data-footnote-id="o0o2das7ljm" role="doc-endnote" id="fno0o2das7ljm"><span class="footnote-back-link" data-footnote-back-link="" data-footnote-id="o0o2das7ljm"><sup><strong><a href="#fnrefo0o2das7ljm">^</a></strong></sup></span>
<div
class="footnote-content" data-footnote-content="">
<p><a href="https://www.thecollector.com/what-are-the-seven-wonders-of-the-world/">What Are the 7 Wonders of the World? (with HD Images) | TheCollector</a>
</p>
</div>
</li>

View File

@@ -23,13 +23,16 @@
the complex.<span class="footnote-reference" data-footnote-reference=""
data-footnote-index="1" data-footnote-id="zzzjn52iwk" role="doc-noteref"
id="fnrefzzzjn52iwk"><sup><a href="#fnzzzjn52iwk">[1]</a></sup></span>
</p>
<ol class="footnote-section footnotes" data-footnote-section="" role="doc-endnotes">
<li class="footnote-item" data-footnote-item="" data-footnote-index="1"
data-footnote-id="zzzjn52iwk" role="doc-endnote" id="fnzzzjn52iwk"><span class="footnote-back-link" data-footnote-back-link="" data-footnote-id="zzzjn52iwk"><sup><strong><a href="#fnrefzzzjn52iwk">^</a></strong></sup></span>
<div
class="footnote-content" data-footnote-content="">
<p><a href="https://www.thecollector.com/what-are-the-seven-wonders-of-the-world/">What Are the 7 Wonders of the World? (with HD Images) | TheCollector</a>
</p>
</div>
</li>

View File

@@ -18,6 +18,7 @@
width="209" height="300">
</figure>
<p>Maybe CodeNames? <a href="https://boardgamegeek.com/boardgame/178900/codenames">https://boardgamegeek.com/boardgame/178900/codenames</a>
</p>
</div>
</div>

View File

@@ -20,6 +20,7 @@
href="https://en.wikipedia.org/wiki/Node.js#cite_note-b1-31">[31]</a>Developers can create scalable servers without using <a href="https://en.wikipedia.org/wiki/Thread_(computing)">threading</a>,
by using a simplified model of <a href="https://en.wikipedia.org/wiki/Event-driven_programming">event-driven programming</a> that
uses callbacks to signal the completion of a task.<a href="https://en.wikipedia.org/wiki/Node.js#cite_note-b1-31">[31]</a>
</p>
</div>
</div>

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,5 @@
# Advanced Showcases
Trilium offers advanced functionality through [Scripts](../Note%20Types/Code/Scripts.md) and [Promoted Attributes](Attributes/Promoted%20Attributes.md). To illustrate these features, we've prepared several showcases available in the [demo notes](Database.md):
Trilium offers advanced functionality through [Scripts](../Scripting.md) and [Promoted Attributes](Attributes/Promoted%20Attributes.md). To illustrate these features, we've prepared several showcases available in the [demo notes](Database.md):
* [Relation Map](../Note%20Types/Relation%20Map.md)
* [Day Notes](Advanced%20Showcases/Day%20Notes.md)

View File

@@ -13,37 +13,63 @@ This pattern works well also because of [Cloning Notes](../../Basic%20Concepts%2
![](Day%20Notes_image.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](Task%20Manager.md)).
You can see the structure of day notes appearing under "Journal" note - 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 [Task manager](Task%20Manager.md)).
You can also notice how this day note has [promoted attribute](../Attributes/Promoted%20Attributes.md) "weight" where you can track your daily weight. This data is then used in [Weight tracker](Weight%20Tracker.md).
## Week Note and Quarter Note
Week and quarter notes are disabled by default, since it might be too much for some people. To enable them, you need to set `#enableWeekNotes` and `#enableQuarterNotes` attributes on the root calendar note, which is identified by `#calendarRoot` 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.
## Templates
Trilium provides [template](../Attributes/Template.md) functionality, and it could be used together with day notes.
Trilium provides [template](../Templates.md) functionality, and it could be used together with day notes.
You can define one of the following relations on the root of the journal (identified by `#calendarRoot` label):
* yearTemplate
* quarterTemplate (if `#enableQuarterNotes` is set)
* monthTemplate
* weekTemplate (if `#enableWeekNotes` is set)
* dateTemplate
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 `~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
## Naming pattern
It's possible to customize the title of generated date notes by defining a `#datePattern` label on a root calendar note (identified by `#calendarRoot` label). Following are possible values:
You can customize the title of generated journal notes by defining a `#datePattern`, `#weekPattern`, `#monthPattern`, `#quarterPattern` and `#yearPattern` attribute on a root calendar note (identified by `#calendarRoot` label). The naming pattern replacements follow a level-up compatibility - each level can use replacements from itself and all levels above it. For example, `#monthPattern` can use month, quarter and year replacements, while `#weekPattern` can use week, month, quarter and year replacements. But it is not possible to use week replacements in `#monthPattern`.
* `{dayInMonthPadded} - {weekDay}` day notes are named e.g. "24 - Monday"
* `{dayInMonthPadded}: {weekDay3}` day notes are named e.g. "24: Mon"
* `{dayInMonthPadded}: {weekDay2}` day notes are named e.g. "24: Mo"
* `{isoDate} - {weekDay}` day notes are named e.g. "2020-12-24 - Monday"
### Date pattern
It's possible to customize the title of generated date notes by defining a `#datePattern` attribute on a root calendar note (identified by `#calendarRoot` label). Following are possible values:
* `{isoDate}` results in an ISO 8061 formatted date (e.g. "2025-03-09" for March 9, 2025)
* `{dateNumber}` results in a number like `9` for the 9th day of the month, `11` for the 11th day of the month
* `{dateNumberPadded}` results in a number like `09` for the 9th day of the month, `11` for the 11th day of the month
* `{ordinal}` is replaced with the ordinal date (e.g. 1st, 2nd, 3rd) etc.
* `{weekDay}` results in the full day name (e.g. `Monday`)
* `{weekDay3}` is replaced with the first 3 letters of the day, e.g. Mon, Tue, etc.
* `{weekDay2}` is replaced with the first 2 letters of the day, e.g. Mo, Tu, etc.
## Month pattern
The default is `{dateNumberPadded} - {weekDay}`
It is also possible to customize the title of generated month notes through the `#monthPattern` attribute, much like `#datePattern`. The options are:
### Week pattern
It is also possible to customize the title of generated week notes through the `#weekPattern` attribute on the root calendar note. The options are:
* `{weekNumber}` results in a number like `9` for the 9th week of the year, `11` for the 11th week of the year
* `{weekNumberPadded}` results in a number like `09` for the 9th week of the year, `11` for the 11th week of the year
* `{shortWeek}` results in a short week string like `W9` for the 9th week of the year, `W11` for the 11th week of the year
* `{shortWeek3}` results in a short week string like `W09` for the 9th week of the year, `W11` for the 11th week of the year
The default is `Week {weekNumber}`
### Month pattern
It is also possible to customize the title of generated month notes through the `#monthPattern` attribute on the root calendar note. The options are:
* `{isoMonth}` results in an ISO 8061 formatted month (e.g. "2025-03" for March 2025)
* `{monthNumber}` results in a number like `9` for September, and `11` for November
* `{monthNumberPadded}` results in a number like `09` for September, and `11` for November
* `{month}` results in the full month name (e.g. `September` or `October`)
* `{shortMonth3}` is replaced with the first 3 letters of the month, e.g. Jan, Feb, etc.
@@ -51,10 +77,27 @@ It is also possible to customize the title of generated month notes through the
The default is `{monthNumberPadded} - {month}`
### Quarter pattern
It is also possible to customize the title of generated quarter notes through the `#quarterPattern` attribute on the root calendar note. The options are:
* `{quarterNumber}` results in a number like `1` for the 1st quarter of the year
* `{shortQuarter}` results in a short quarter string like `Q1` for the 1st quarter of the year
The default is `Quarter {quarterNumber}`
### Year pattern
It is also possible to customize the title of generated year notes through the `#yearPattern` attribute on the root calendar note. The options are:
* `{year}` results in the full year (e.g. `2025`)
The default is `{year}`
## Implementation
Trilium has some special support for day notes in the form of [backend Script API](https://triliumnext.github.io/Notes/backend_api/BackendScriptApi.html) - see e.g. getDayNote() 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="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).
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.

View File

@@ -1,9 +1,9 @@
# Task Manager
Task Manager is a [promoted attributes](../Attributes/Promoted%20Attributes.md) and [scripts](../../Note%20Types/Code/Scripts.md)showcase present in the [demo notes](../Database.md).
Task Manager is a [promoted attributes](../Attributes/Promoted%20Attributes.md) and [scripts](../../Scripting.md)showcase present in the [demo notes](../Database.md).
## Demo
![](../../Attachments/task-manager.png)
![](Task%20Manager_task-manager.png)
Task Manager manages outstanding (TODO) tasks and finished tasks (non-empty doneDate attribute). Outstanding tasks are further categorized by location and arbitrary tags - whenever you change tag attribute in the task note, this task is then automatically moved to appropriate location.
@@ -15,7 +15,7 @@ New tasks are created in the TODO note which has `~child:template` [relation](..
### Attributes
Task template defines several [promoted attributes](../Attributes/Promoted%20Attributes.md) - todoDate, doneDate, tags, location. Importantly it also defines `~runOnAttributeChange` relation - [event](../../Note%20Types/Code/Events.md) handler which is run on attribute change. This [script](../../Note%20Types/Code/Scripts.md) 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](../Attributes/Promoted%20Attributes.md) - todoDate, doneDate, tags, location. Importantly it also defines `~runOnAttributeChange` relation - [event](../../Scripting/Events.md) handler which is run on attribute change. This [script](../../Scripting.md) 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

View File

@@ -1,13 +1,13 @@
# Weight Tracker
![](Weight%20Tracker_image.png)
The `Weight Tracker` is a [Script API](../../Note%20Types/Code/Script%20API.md) showcase present in the [demo notes](../Database.md).
The `Weight Tracker` is a [Script API](../../Scripting/Script%20API.md) showcase present in the [demo notes](../Database.md).
By adding `weight` as a [promoted attribute](../Attributes/Promoted%20Attributes.md) in the [template](../Attributes/Template.md) from which [day notes](Day%20Notes.md) are created, you can aggregate the data and plot weight change over time.
By adding `weight` as a [promoted attribute](../Attributes/Promoted%20Attributes.md) in the [template](../Templates.md) from which [day notes](Day%20Notes.md) are created, you can aggregate the data and plot weight change over time.
## 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](../../Note%20Types/Code/Scripts.md) can render its output.
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](../../Scripting.md) can render its output.
Scripts for `Render Notes` are defined in a [relation](../Attributes.md) called `~renderNote`. In this example, it's the `Weight Tracker`'s child `Implementation`. The Implementation consists of two [code notes](../../Note%20Types/Code.md) that contain some HTML and JavaScript respectively, which load all the notes with a `weight` attribute and display their values in a chart.

View File

@@ -1,82 +1,33 @@
# Attributes
<figure class="image"><img style="aspect-ratio:1071/146;" src="Attributes_image.png" width="1071" height="146"></figure>
In Trilium, attributes are key-value pairs assigned to notes, providing additional metadata or functionality. There are two primary types of attributes:
1. **Labels**: Simple key-value text records
2. **Relations**: Named links to other notes
1. <a class="reference-link" href="Attributes/Labels.md">Labels</a> can be used for a variety of purposes, such as storing metadata or configuring the behaviour of notes. Labels are also searchable, enhancing note retrieval.
For more information, including predefined labels, see <a class="reference-link" href="Attributes/Labels.md">Labels</a>.
2. <a class="reference-link" href="Attributes/Relations.md">Relations</a> define connections between notes, similar to links. These can be used for metadata and scripting purposes.
For more information, including a list of predefined relations, see <a class="reference-link" href="Attributes/Relations.md">Relations</a>.
These attributes play a crucial role in organizing, categorising, and enhancing the functionality of notes.
![](Attributes_image.png)
## Viewing the list of attributes
## Labels
Both the labels and relations for the current note are displayed in the _Owned Attributes_ section of the <a class="reference-link" href="../Basic%20Concepts%20and%20Features/UI%20Elements/Ribbon.md">Ribbon</a>, where they can be viewed and edited. Inherited attributes are displayed in the _Inherited Attributes_ section of the ribbon, where they can only be viewed.
Labels in Trilium can be used for a variety of purposes:
* **Metadata**: Assign labels with optional values for categorization, such as `#year=1999`, `#genre="sci-fi"`, or `#author="Neal Stephenson"`
* **Configuration**: Labels can configure advanced features or settings
* **Scripts and Plugins**: Used to tag notes with special metadata, such as the "weight" attribute in the [Weight Tracker](Advanced%20Showcases/Weight%20Tracker.md)
Labels are also searchable, enhancing note retrieval.
### Common Labels for Advanced Configuration
* `**disableVersioning**`: Disables automatic versioning, ideal for large, unimportant notes like script libraries
* `**versioningLimit**`: Used to limit the number of revisions for a single note
* `**calendarRoot**`: Marks the note as the root for [day notes](Advanced%20Showcases/Day%20Notes.md). Only one note should carry this label
* `**archived**`: Hides notes from default search results and dialogs
* `**excludeFromExport**`: Excludes notes and their subtrees from export operations
* `**run**`: Specifies events to trigger scripts (e.g., `frontendStartup`, `hourly`)
* `**runAtHour**`: Defines specific hours for scripts to run, used with `#run=hourly`
* `**disableInclusion**`: Prevents a script from being included in parent script executions
* `**sorted**`: Automatically sorts child notes alphabetically by title
* `**top**`: Keeps the note at the top of its parent's list, useful with `sorted`
* `**hidePromotedAttributes**`: Hides certain attributes in the note's display
* `**readOnly**`: Sets the note to read-only mode, applicable to text and code notes
* `**autoReadOnlyDisabled**`: Disables automatic read-only mode for large notes
* `**appCss**`: Marks CSS notes used to modify Triliums appearance
* `**appTheme**`: Marks full CSS themes available in Trilium's options
* `**cssClass**`: Adds a CSS class to the note's representation in the tree
* `**iconClass**`: Adds a CSS class to the note's icon, useful for distinguishing notes visually. See [note icons](../Basic%20Concepts%20and%20Features/Notes/Note%20Icons.md)
* `**pageSize**`: Specifies the number of items per page in note listings
* `**customRequestHandler**` **and** `**customResourceProvider**`: Refer to [Custom request handler](Custom%20Request%20Handler.md)
* `**widget**`: Marks a note as a custom widget, added to Trilium's component tree
* `**workspace**` **and related attributes**: See [Workspace](../Basic%20Concepts%20and%20Features/Navigation/Workspace.md) for more details
* `**searchHome**`: Specifies the parent for new search notes
* `**inbox**`: Designates a default location for new notes created via the sidebar
* `**sqlConsoleHome**`: Default location for SQL console notes
* `**bookmarked**` **and** `**bookmarkFolder**`: See [Bookmarks](../Basic%20Concepts%20and%20Features/Navigation/Bookmarks.md)
* `**shareXXX**`: See [Sharing](Sharing.md)
* `**keyboardShortcut**`: Assigns a keyboard shortcut to open the note
* `**displayRelations**` **and** `**hideRelations**`: Manages the display of note relations
* `**titleTemplate**`: See [Default note title](Default%20Note%20Title.md)
* `**template**`: Makes the note available as a template
* `**toc**`: Controls the visibility of the table of contents
* `**color**`: Defines the color of the note in the tree and links
* `**hideChildrenOverview**`: Hides child notes in the parent note's editor
* `**viewType**`: Sets the view of child notes (grid or list)
## Relations
Relations define connections between notes, similar to links.
### 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
* **Event-based Relations**: Such as `runOnNoteCreation` or `runOnNoteChange`, which trigger scripts on specific actions
* **Other Relations**: Include `template`, `renderNote`, `widget`, and sharing-related relations
In the list of attributes, labels are prefixed with the `#` character whereas relations are prefixed with the `~` character.
## Multiplicity
Attributes in Trilium can be "multivalued", meaning multiple attributes with the same name can coexist.
Attributes in Trilium can be "multi-valued", meaning multiple attributes with the same name can co-exist.
## Attribute Definitions and Promoted Attributes
Special labels create "label/attribute" definitions, enhancing the organization and management of attributes. For more details, see [Promoted attributes](Attributes/Promoted%20Attributes.md).
Special labels create "label/attribute" definitions, enhancing the organization and management of attributes. For more details, see <a class="reference-link" href="Attributes/Promoted%20Attributes.md">Promoted Attributes</a>.
## Attribute Inheritance
Trilium supports attribute inheritance, allowing child notes to inherit attributes from their parents. For more information, see [Attribute inheritance](Attributes/Attribute%20Inheritance.md).
Trilium supports attribute inheritance, allowing child notes to inherit attributes from their parents. For more information, see <a class="reference-link" href="Attributes/Attribute%20Inheritance.md">Attribute Inheritance</a>.

View File

@@ -1,25 +1,38 @@
# Attribute Inheritance
## 1\. Standard Inheritance
Inheritance refers to the process of having a [label](Labels.md) or a [relation](Relations.md) shared across multiple notes, generally in parent-child relations (or anywhere if using templates).
## 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
To make an attribute inheritable, simply use the visual editor for <a class="reference-link" href="Labels.md">Labels</a> or <a class="reference-link" href="Relations.md">Relations</a>. Alternatively, the attribute can be manually defined where `#myLabel=value` becomes `#myLabel(inheritable)=value` when inheritable.
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.
As an example, 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
Standard inheritance forces all the notes that are children (and sub-children) of a note to have that particular label or relation. If there is a need to have some notes not inherit one of the labels, then _copying inheritance_ or _template inheritance_ needs to be used instead.
## 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
If a parent note has the label `#child:exampleAttribute`, all newly created child notes (one level deep) will inherit the `#exampleAttribute` label. This can be useful for setting default properties for notes in a specific section.
* **Syntax:** `#child:attributeName`
* **Chained Inheritance:** You can chain this inheritance, such as `#child:child:attributeName`, where each child down the hierarchy receives the appropriate attribute.
Similarly, for relations use `~child:myRelation`.
### Example
Due to the way it's designed, copying inheritance cannot be used to cascade infinitely within a hierarchy. For that use case, consider using either standard inheritance or templates.
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.
### Chained inheritance
## 3\. Template Inheritance
It is possible to define labels across multiple levels of depth. For example, `#child:child:child:foo` applied to a root note would create:
Attributes can also be inherited from [templates](Template.md). When a new note is created using a template, it inherits the attributes defined in that template. This is particularly useful for maintaining consistency across notes that follow a similar structure or function.
* `#child:child:foo` on the first-level children.
* `#child:foo` on the second-level children.
* `#foo` on the third-level children.
Similarly, use `~child:child:child:foo` if dealing with relations.
Do note that same as simple copying inheritance, the changes will not apply retroactively to existing notes in the hierarchy, it will only apply to the newly created notes.
## Template Inheritance
Attributes can also be inherited from <a class="reference-link" href="../Templates.md">Templates</a>. When a new note is created using a template, it inherits the attributes defined in that template. This is particularly useful for maintaining consistency across notes that follow a similar structure or function.

File diff suppressed because one or more lines are too long

View File

@@ -1,7 +1,7 @@
# Promoted Attributes
Promoted attributes are [attributes](../Attributes.md) which are considered important and thus are "promoted" onto the main note UI. See example below:
![](../../Attachments/promoted-attributes.png)
![](Promoted%20Attributes_promot.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.

View File

@@ -0,0 +1,44 @@
# Relations
A relation is similar to a [label](Labels.md), but instead of having a text value it refers to another note.
## Common use cases
* **Metadata Relationships for personal use**: For example, linking a book note to an author note.
This can be combined with <a class="reference-link" href="Promoted%20Attributes.md">Promoted Attributes</a> to make their display more user-friendly.
* **Configuration**: For configuring some notes such as <a class="reference-link" href="../../Note%20Types/Render%20Note.md">Render Note</a>, or configuring <a class="reference-link" href="../Sharing.md">Sharing</a> or <a class="reference-link" href="../Templates.md">Templates</a> (see the list below).
* **Scripting**: Attaching scripts to events or conditions related to the note.
## Creating a relation using the visual editor
1. Go to the _Owned Attributes_ section in the <a class="reference-link" href="../../Basic%20Concepts%20and%20Features/UI%20Elements/Ribbon.md">Ribbon</a>.
2. Press the + button (_Add new attribute_) to the right.
3. Select _Add new relation_ for the relation.
> [!TIP]
> If you prefer keyboard shortcuts, press <kbd>Alt</kbd>+<kbd>L</kbd> while focused on a note or in the _Owned Attributes_ section to display the visual editor.
While in the visual editor:
* Set the desired name
* Set the Target note (the note to point to). Unlike labels, relations cannot exist with a target note.
* Check _Inheritable_ if the label should be inherited by the child notes as well. See <a class="reference-link" href="Attribute%20Inheritance.md">Attribute Inheritance</a> for more information.
## Creating a relation manually
In the _Owned Attributes_ section in the <a class="reference-link" href="../../Basic%20Concepts%20and%20Features/UI%20Elements/Ribbon.md">Ribbon</a>:
* To create a relation called `myRelation`:
* First type `~myRelation=@`.
* After this, an autocompletion box should appear.
* Type the title of the note to point to and press <kbd>Enter</kbd> to confirm (or click the desired note).
* Alternatively copy a note from the <a class="reference-link" href="../../Basic%20Concepts%20and%20Features/UI%20Elements/Note%20Tree.md">Note Tree</a> and paste it after the `=` sign (without the `@`, in this case).
* To create an inheritable relation, follow the same steps as previously described but instead of `~myRelation` write `~myRelation(inheritable)`.
## Predefined relations
These relations are supported and used internally by Trilium.
> [!TIP]
> Some relations presented here end with a `*`. That means that there are multiple relations with the same prefix, consult the specific page linked in the description of that relation for more information.
<figure class="table" style="width:100%;"><table class="ck-table-resized"><colgroup><col style="width:33.95%;"><col style="width:66.05%;"></colgroup><thead><tr><th>Label</th><th>Description</th></tr></thead><tbody><tr><td><code>runOn*</code></td><td>See&nbsp;<a class="reference-link" href="../../Scripting/Events.md">Events</a></td></tr><tr><td><code>template</code></td><td>note's attributes will be inherited even without a parent-child relationship, note's content and subtree will be added to instance notes if empty. See documentation for details.</td></tr><tr><td><code>inherit</code></td><td>note's attributes will be inherited even without a parent-child relationship. See&nbsp;<a class="reference-link" href="../Templates.md">Templates</a>&nbsp;for a similar concept. See&nbsp;<a class="reference-link" href="Attribute%20Inheritance.md">Attribute Inheritance</a>&nbsp;in the documentation.</td></tr><tr><td><code>renderNote</code></td><td>notes of type&nbsp;<a class="reference-link" href="../../Note%20Types/Render%20Note.md">Render Note</a>&nbsp;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</td></tr><tr><td><code>widget_relation</code></td><td>target of this relation will be executed and rendered as a widget in the sidebar</td></tr><tr><td><code>shareCss</code></td><td>CSS note which will be injected into the share page. CSS note must be in the shared sub-tree as well. Consider using <code>share_hidden_from_tree</code> and <code>share_omit_default_css</code> as well.</td></tr><tr><td><code>shareJs</code></td><td>JavaScript note which will be injected into the share page. JS note must be in the shared sub-tree as well. Consider using <code>share_hidden_from_tree</code>.</td></tr><tr><td><code>shareTemplate</code></td><td>Embedded JavaScript note that will be used as the template for displaying the shared note. Falls back to the default template. Consider using <code>share_hidden_from_tree</code>.</td></tr><tr><td><code>shareFavicon</code></td><td>Favicon note to be set in the shared page. Typically you want to set it to share root and make it inheritable. Favicon note must be in the shared sub-tree as well. Consider using <code>share_hidden_from_tree</code>.</td></tr></tbody></table></figure>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 32 KiB

View File

@@ -0,0 +1,87 @@
# Bulk Actions
<figure class="image"><img style="aspect-ratio:1425/654;" src="Bulk Actions_image.png" width="1425" height="654"></figure>
The _Bulk Actions_ dialog makes it easy to apply changes to multiple notes at once, ranging from simple actions such as adding or removing a label to being executing custom scripts.
## Interaction
* The first step is to select the notes in the <a class="reference-link" href="../Basic%20Concepts%20and%20Features/UI%20Elements/Note%20Tree.md">Note Tree</a>. It's possible to apply bulk actions to:
* A single note (and potentially its child notes) simply by clicking on it (with a left click or a right click).
* Multiple notes. See <a class="reference-link" href="../Basic%20Concepts%20and%20Features/UI%20Elements/Note%20Tree/Multiple%20selection.md">Multiple selection</a> on how to do so.
* Right click in the <a class="reference-link" href="../Basic%20Concepts%20and%20Features/UI%20Elements/Note%20Tree.md">Note Tree</a> and select _Advanced__Apply bulk actions_.
* By default, only the selected notes will be affected. To also include all the descendants of the notes, check _Include descendants of the selected notes_. The number of affected notes at the top of the dialog will update to reflect the change.
* Click on which action to apply from the _Available actions_ section. A detailed description of each is available in the next section.
* For each action selected, the _Chosen actions_ section will update to reveal the entry. Each action will have its own configuration.
* To remove an action, simply press the X button to the right of it.
* It is possible to apply multiple actions of the same type, such as adding multiple types.
* When all the actions are defined, press _Execute bulk actions_ to trigger all of them at once.
* For convenience, the last bulk action configuration is saved for further use and will be restored when entering the dialog again.
## Actions
### Labels
These actions operate the <a class="reference-link" href="Attributes/Labels.md">Labels</a> of a note:
* **Add label**
* For each note, if it doesn't already have a [label](Attributes/Labels.md) of the given name, it will create it. Keep the _New value_ field empty to create a label without a value, or complete it to assign a value.
* If a note already has this label, its value will be updated.
* **Update label value**
* For each note, if it has a [label](Attributes/Labels.md) of the given name, it will change its value to the specified one. Leave _New value_ field empty to create a label without a value.
* Notes without the label will not be affected.
* _**Rename label**_
* For each note, if it has a [label](Attributes/Labels.md) of the given name, it will be renamed/replaced with a label of the new name. The value of the label (if present) will be kept intact.
* Notes without the label will not be affected.
* **Delete label**
* For each note, if it has a label of a given name, it will be deleted (regardless of whether it has a value or not).
* Notes without the label will not be affected.
### Relations
These actions operate the <a class="reference-link" href="Attributes/Relations.md">Relations</a> of a note:
* **Add relation**
* For each note, it will create a relation pointing to the given note.
* Notes without this relation will not be affected.
* **Update relation target**
* For each note, it will modify a relation to point to the newly given note.
* Notes without this relation will not be affected.
* **Rename relation**
* For each note, if it has a relation of the given name, it will be renamed/replaced with a relation of the new name. The target note of the relation will be kept intact.
* Notes without this relation will not be affected.
* **Delete relation**
* For each note, if it has a relation of the given name, it will be deleted.
* Notes without this relation will not be affected.
### Notes
* **Rename note**
* For each note, it will change the title of the note to the given one.
* As a more advanced use case, the note can be a “template string” which allows for dynamic values with access to the note information via <a class="reference-link" href="../Scripting/Script%20API/Frontend%20API/FNote.md">FNote</a>, for example:
* `NEW: ${note.title}` will prefix all notes with `NEW:` .
* `${note.dateCreatedObj.format('MM-DD:')}: ${note.title}` will prefix the note titles with each note's creation date (in month-day format).
* **Move note**
* For each note, it will be moved to the specified parent note.
* As an alternative for less complex situations, the notes can be moved directly from within the <a class="reference-link" href="../Basic%20Concepts%20and%20Features/UI%20Elements/Note%20Tree.md">Note Tree</a> via cut → paste or via the contextual menu.
* **Delete note**
* For each note, it will be deleted.
* As an alternative for less complex situations, the notes can be removed directly from within the <a class="reference-link" href="../Basic%20Concepts%20and%20Features/UI%20Elements/Note%20Tree.md">Note Tree</a> by selecting them and pressing <kbd>Delete</kbd>.
* **Delete note revisions**
* This will delete all the <a class="reference-link" href="../Basic%20Concepts%20and%20Features/Notes/Note%20Revisions.md">Note Revisions</a> of the notes.
### Others
* **Execute script**
* For more complex scenarios, it is possible to type in a JavaScript expression in order to apply the necessary changes.
* Examples:
* To apply a suffix (`- suffix` in this example), to the note title:
```javascript
note.title = note.title + " - suffix";
```
* To alter attributes of a note based on another attribute, such as setting the `#shareAlias` label to the title of the note:
```javascript
note.setLabel("shareAlias", note.title)
```

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

View File

@@ -1,16 +0,0 @@
# Bulk actions
### 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:
```javascript
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:
```javascript
note.setLabel("shareAlias", note.title)
```

View File

@@ -0,0 +1,19 @@
# Trilium instance
A Trilium instance represents a server. If <a class="reference-link" href="../../Installation%20%26%20Setup/Synchronization.md">Synchronization</a> is set up, since multiple servers are involved (the one from the desktop client and the one the synchronisation is set up with), sometimes it can be useful to distinguish the instance you are running on.
## Setting the instance name
To set up a name for the instance, modify the `config.ini`:
```
[General]
instanceName=Hello
```
## Distinguishing the instance on back-end
Use `api.getInstanceName()` to obtain the instance name of the current server, as specified in the config file or in environment variables.
## Limiting script runs based on instance
For a script that is run periodically or on a certain event, it's possible to limit it to certain instances without having to change the code. Just add `runOnInstance` and set as the value the instance name where the script should run. To run on multiple named instances, simply add the label multiple times.

View File

@@ -1,5 +1,5 @@
# Custom Request Handler
Trilium provides a mechanism for [scripts](../Note%20Types/Code/Scripts.md) to open a public REST endpoint. This opens a way for various integrations with other services - a simple example would be creating new note from Slack by issuing a slash command (e.g. `/trilium buy milk`).
Trilium provides a mechanism for [scripts](../Scripting.md) to open a public REST endpoint. This opens a way for various integrations with other services - a simple example would be creating new note from Slack by issuing a slash command (e.g. `/trilium buy milk`).
## Create note from outside Trilium
@@ -53,7 +53,7 @@ Trilium will then find our code note created above and execute it. `api.req`, `a
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](../Note%20Types/Code/Script%20API.md).
Once we pass these checks we will just create the desired note using [Script API](../Scripting/Script%20API.md).
## Custom resource provider

View File

@@ -3,24 +3,9 @@ Your Trilium data is stored in a [SQLite](https://www.sqlite.org) database which
## Demo Notes
When you run Trilium for the first time, it will generate a new database containing demo notes. These notes showcase its many features, such as:
When first starting Trilium, it will provide a set of notes to showcase various features of the application.
* [Relation Map](../Note%20Types/Relation%20Map.md)
* [Day Notes](Advanced%20Showcases/Day%20Notes.md)
* [Weight Tracker](Advanced%20Showcases/Weight%20Tracker.md)
* [Task Manager](Advanced%20Showcases/Task%20Manager.md)
* [Custom CSS Themes](../Basic%20Concepts%20and%20Features/Themes.md)
### Restoring Demo Notes
There are some cases in which you may want to restore the original demo notes. For example, if you experimented with some of the more advanced features and want to see the original reference, or if you simply want to explore the latest version of the demo notes, which might showcase new features.
You can easily restore the demo notes by using Trilium's built-in import feature by importing them:
* Download [this .zip archive](https://github.com/TriliumNext/Notes/raw/develop/db/demo.zip) with the latest version of the demo notes
* Right click on any note in your tree under which you would like the demo notes to be imported
* Click "Import into note"
* Select the .zip archive to import it
For more information see <a class="reference-link" href="Database/Demo%20Notes.md">Demo Notes</a>.
## Manually Modifying the Database

View File

@@ -0,0 +1,19 @@
# Demo Notes
When you run Trilium for the first time, it will generate a new database containing demo notes. These notes showcase its many features, such as:
* <a class="reference-link" href="../../Note%20Types/Relation%20Map.md">Relation Map</a>
* <a class="reference-link" href="../Advanced%20Showcases/Day%20Notes.md">Day Notes</a>
* <a class="reference-link" href="../Advanced%20Showcases/Weight%20Tracker.md">Weight Tracker</a>
* <a class="reference-link" href="../Advanced%20Showcases/Task%20Manager.md">Task Manager</a>
* <a class="reference-link" href="../../Basic%20Concepts%20and%20Features/Themes.md">Themes</a>
### Restoring Demo Notes
There are some cases in which you may want to restore the original demo notes. For example, if you experimented with some of the more advanced features and want to see the original reference, or if you simply want to explore the latest version of the demo notes, which might showcase new features.
You can easily restore the demo notes by using Trilium's built-in import feature by importing them:
* Download [this .zip archive](https://github.com/TriliumNext/Notes/raw/develop/db/demo.zip) with the latest version of the demo notes
* Right click on any note in your tree under which you would like the demo notes to be imported
* Click "Import into note"
* Select the .zip archive to import it

View File

@@ -7,7 +7,7 @@ If you are doing any advanced development or troubleshooting where you manually
The SQL Console is Trilium's built-in database editor.
See [SQL Console](Manually%20altering%20the%20database/SQL%20Console.md).
See <a class="reference-link" href="Manually%20altering%20the%20database/SQL%20Console.md">SQL Console</a>.
## Externally modifying the database

View File

@@ -17,14 +17,16 @@ And all children of "2022 Books" will be created with initial title "\[Author na
The value of `#titleTemplate` is evaluated at the point of note's creation as a JavaScript string, which means it can be enriched with the help of JS string interpolation with dynamic data.
As an example, imagine you collect server outage incidents and write some notes. It looks like this:
Second variable injected is `parentNote` which gives access to the parent [`FNote`](../Scripting/Script%20API/Frontend%20API/FNote.md).
See also <a class="reference-link" href="Templates.md">Templates</a> which provides similar capabilities, including default note's content.
### Examples
* Imagine you collect server outage incidents and write some notes. It looks like this:
* Incidents
* 2022-05-09: System crash
* 2022-05-15: Backup delay
You can automatize the date assignment by assigning a label `#titleTemplate="${now.format('YYYY-MM-DD')}: "` to the parent note "Incidents". Whenever a new child note is created, the title template is evaluated with the injected [now](https://day.js.org/docs/en/display/format) object.
Second variable injected is [parentNote](https://triliumnext.github.io/Notes/backend_api/BNote.html), an example could be `#titleTemplate="${parentNote.getLabelValue('authorName')}'s literary works"`.
See also \[\[[template](Attributes/Template.md)\]\] which provides similar capabilities, including default note's content.
* You can automatize the date assignment by assigning a label `#titleTemplate="${now.format('YYYY-MM-DD')}: "` to the parent note "Incidents". Whenever a new child note is created, the title template is evaluated with the injected [now](https://day.js.org/docs/en/display/format) object.
* To use a parent's attribute in the title of new notes: `#titleTemplate="${parentNote.getLabelValue('authorName')}'s literary works"`
* To mirror the parent's note title: `${parentNote.title}`

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

View File

@@ -0,0 +1,16 @@
# Note ID
Whereas some applications use file names to uniquely identify notes, Trilium uses the concept of Note ID.
Generally, the Note ID is a 12-character long alphanumeric sequence (including both lower and upper case letter) that is randomly generated for each new note.
## How does the import/export affect the note IDs
When notes are exported, their note ID is kept in the metadata of the export. However when they are imported back in, a new note ID is generated for all the notes. This also includes other entities that are part of the import/export process such as <a class="reference-link" href="../Basic%20Concepts%20and%20Features/Notes/Attachments.md">Attachments</a>.
## Note collisions
Since the Note ID is a fixed-width randomly generated number, due to the [pigeonhole principle](https://en.wikipedia.org/wiki/Pigeonhole_principle), there is a possibility that a newly created note will have the same ID as an existing note.
Since the note ID is alphanumeric and the length is 12 we have $62^{12}$ unique IDs. However since we are generating them randomly, we can use a collision calculator such as the one for [Nano ID](https://alex7kom.github.io/nano-nanoid-cc/?alphabet=0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz&size=12&speed=1000&speedUnit=hour) to determine that we'd need to create 1000 notes per hour every hour for 9 centuries in order to have at least 1% probability of a note collision.
As such, Trilium does not take any explicit action against potential note collisions, similar to other software that makes uses of unique hashes such as [Git](https://stackoverflow.com/questions/10434326/hash-collision-in-git). If one would theoretically occur, what would most likely happen is that the existing note will be replaced by the new one.

View File

@@ -1,17 +1,17 @@
# Note source
## Understanding the source code of the different notes
Internally, the structure of the content of each note is different based on the [Note Types](../Note%20Types).
Internally, the structure of the content of each note is different based on the <a class="reference-link" href="../Note%20Types.md">Note Types</a>.
For example:
* [Text Notes](#root/_hidden/_options/_optionsTextNotes) are represented internally as HTML, using the [CKEditor](Technologies%20used/CKEditor.md) representation. Note that due to the custom plugins, some HTML elements are specific to Trilium only, for example the admonitions.
* [Code Notes](#root/_hidden/_options/_optionsCodeNotes) are plain text and are represented internally as-is.
* [Geo map](../Note%20Types/Geo%20map.md) notes contain only minimal information (viewport, zoom) as a JSON.
* [Canvas](../Note%20Types/Canvas.md) notes are represented as JSON, with Trilium's own information alongside with [Excalidraw](Technologies%20used/Excalidraw.md)'s internal JSON representation format.
* [Mind Map](../Note%20Types/Mind%20Map.md) notes are represented as JSON, with the internal format of [MindElixir](Technologies%20used/MindElixir.md).
* <a class="reference-link" href="../Note%20Types/Text.md">Text</a> notes are represented internally as HTML, using the <a class="reference-link" href="Technologies%20used/CKEditor.md">CKEditor</a> representation. Note that due to the custom plugins, some HTML elements are specific to Trilium only, for example the admonitions.
* <a class="reference-link" href="../Note%20Types/Code.md">Code</a> notes are plain text and are represented internally as-is.
* <a class="reference-link" href="../Note%20Types/Geo%20Map.md">Geo Map</a> notes contain only minimal information (viewport, zoom) as a JSON.
* <a class="reference-link" href="../Note%20Types/Canvas.md">Canvas</a> notes are represented as JSON, with Trilium's own information alongside with <a class="reference-link" href="Technologies%20used/Excalidraw.md">Excalidraw</a>'s internal JSON representation format.
* <a class="reference-link" href="../Note%20Types/Mind%20Map.md">Mind Map</a> notes are represented as JSON, with the internal format of <a class="reference-link" href="Technologies%20used/MindElixir.md">MindElixir</a>.
Note that some information is also stored as [Attachments](../Attachments). For example [Canvas](../Note%20Types/Canvas.md) notes use the attachments feature to store the custom libraries, and alongside with [Mind Map](../Note%20Types/Mind%20Map.md) and other similar note types it stores an SVG representation of the content for use in other features such as including in other notes, shared notes, etc.
Note that some information is also stored as <a class="reference-link" href="../Basic%20Concepts%20and%20Features/Notes/Attachments.md">Attachments</a>. For example <a class="reference-link" href="../Note%20Types/Canvas.md">Canvas</a> notes use the attachments feature to store the custom libraries, and alongside with <a class="reference-link" href="../Note%20Types/Mind%20Map.md">Mind Map</a> and other similar note types it stores an SVG representation of the content for use in other features such as including in other notes, shared notes, etc.
Here's part of the HTML representation of this note, as it's stored in the database (but prettified).
@@ -21,7 +21,7 @@ Here's part of the HTML representation of this note, as it's stored in the datab
</h2>
<p>
Internally, the structure of the content of each note is different based on the&nbsp;
<a class="reference-link" href="../Note%20Types">
<a class="reference-link" href="../Note%20Types.md">
Note Types
</a>
.
@@ -30,7 +30,7 @@ Here's part of the HTML representation of this note, as it's stored in the datab
## Viewing the source code
It is possible to view the source code of a note by pressing the contextual menu in [Note buttons](../Basic%20Concepts%20and%20Features/UI%20Elements/Note%20buttons.md) and selecting _Note source_.
It is possible to view the source code of a note by pressing the contextual menu in <a class="reference-link" href="../Basic%20Concepts%20and%20Features/UI%20Elements/Note%20buttons.md">Note buttons</a> and selecting _Note source_.
![](Note%20source_image.png)

View File

@@ -3,24 +3,24 @@ Trilium allows you to share selected notes as **publicly accessible** read-only
## Prerequisites
To use the sharing feature, you must have a [server installation](../Installation%20%26%20Setup/Server%20Installation.md) of Trilium. This is necessary because the notes will be hosted from the server.
To use the sharing feature, you must have a <a class="reference-link" href="../Installation%20%26%20Setup/Server%20Installation.md">Server Installation</a> of Trilium. This is necessary because the notes will be hosted from the server.
## How to Share a Note
1. **Enable Sharing**: To share a note, toggle the `Shared` switch within the note's interface. Once sharing is enabled, an URL will appear, which you can click to access the shared note.
![Share Note](../Attachments/share-single-note.png)
![Share Note](Sharing_share-single-note.png)
2. **Access the Shared Note**: The link provided will open the note in your browser. If your server is not configured with a public IP, the URL will refer to `localhost (127.0.0.1)`.
![Shared Note Example](../Attachments/share-single-note-web.png)
![Shared Note Example](Sharing_share-single-note-.png)
## Sharing a Note Subtree
When you share a note, you actually share the entire subtree of notes beneath it. If the note has child notes, they will also be included in the shared content. For example, sharing the "Formatting" subtree will display a page with basic navigation for exploring all the notes within that subtree.
![Shared Subtree Example](../Attachments/share-multiple-notes-web.png)
![Shared Subtree Example](Sharing_share-multiple-not.png)
## Viewing All Shared Notes
@@ -40,7 +40,7 @@ To protect shared notes with a username and password, you can use the `#shareCre
The default shared page is basic in design, but you can customize it using your own CSS:
* **Custom CSS**: Link a CSS [code note](../Note%20Types/Code.md) to the shared page by adding a `~shareCss` relation to the note. If you want this style to apply to the entire subtree, make the label inheritable. You can hide the CSS code note from the tree navigation by adding the `#shareHiddenFromTree` label.
* **Custom CSS**: Link a CSS <a class="reference-link" href="../Note%20Types/Code.md">Code</a> note to the shared page by adding a `~shareCss` relation to the note. If you want this style to apply to the entire subtree, make the label inheritable. You can hide the CSS code note from the tree navigation by adding the `#shareHiddenFromTree` label.
* **Omitting Default CSS**: For extensive styling changes, use the `#shareOmitDefaultCss` label to avoid conflicts with Trilium's [default stylesheet](../Basic%20Concepts%20and%20Features/Themes.md).
### Adding JavaScript
@@ -71,7 +71,7 @@ Shared notes typically have URLs like `http://domain.tld/share/knvU8aJy4dJ7`, wh
All shared notes are grouped under an automatically managed "Shared Notes" section. From here, you can view, share, or unshare notes by moving or cloning them within this section.
![Shared Notes List](../Attachments/shared-list.png)
![Shared Notes List](Sharing_shared-list.png)
### Setting a Custom Favicon
@@ -81,12 +81,6 @@ To customize the favicon for your shared pages, create a relation `~shareFavicon
You can designate a specific note or folder as the root of your shared content by adding the `#shareRoot` label. This note will be linked when visiting `[http://domain.tld/share](http://domain/share)`, making it easier to use Trilium as a fully-fledged website. Consider combining this with the `#shareIndex` label, which will display a list of all shared notes.
## Additional Options
* **Raw Note Sharing**: Use the `#shareRaw` label to share a note without any HTML wrapper.
* **Disallow Robot Indexing**: Add the `#shareDisallowRobotIndexing` label to prevent search engines from indexing the shared page by including a `noindex, follow` meta tag and `X-Robots-Tag: noindex` header.
* **Shared Notes Index**: For text notes with the `#shareIndex` label, the content will display a list of all shared note roots.
## Limitations
While the sharing feature is powerful, it has some limitations:
@@ -99,3 +93,7 @@ While the sharing feature is powerful, it has some limitations:
* **Include Notes**: Not supported.
Some of these limitations may be addressed in future updates.
## Attribute reference
<figure class="table"><table><thead><tr><th>Attribute</th><th>Description</th></tr></thead><tbody><tr><td><code>shareHiddenFromTree</code></td><td>this note is hidden from left navigation tree, but still accessible with its URL</td></tr><tr><td><code>shareExternalLink</code></td><td>note will act as a link to an external website in the share tree</td></tr><tr><td><code>shareAlias</code></td><td>define an alias using which the note will be available under <code>https://your_trilium_host/share/[your_alias]</code></td></tr><tr><td><code>shareOmitDefaultCss</code></td><td>default share page CSS will be omitted. Use when you make extensive styling changes.</td></tr><tr><td><code>shareRoot</code></td><td>marks note which is served on /share root.</td></tr><tr><td><code>shareDescription</code></td><td>define text to be added to the HTML meta tag for description</td></tr><tr><td><code>shareRaw</code></td><td>Note will be served in its raw format, without HTML wrapper. See also&nbsp;<a class="reference-link" href="Sharing/Serving%20directly%20the%20content%20o.md">Serving directly the content of a note</a>&nbsp;for an alternative method without setting an attribute.</td></tr><tr><td><code>shareDisallowRobotIndexing</code></td><td><p>Indicates to web crawlers that the page should not be indexed of this note by:</p><ul><li>Setting the <code>X-Robots-Tag: noindex</code> HTTP header.</li><li>Setting the <code>noindex, follow</code> meta tag.</li></ul></td></tr><tr><td><code>shareCredentials</code></td><td>require credentials to access this shared note. Value is expected to be in format <code>username:password</code>. Don't forget to make this inheritable to apply to child-notes/images.</td></tr><tr><td><code>shareIndex</code></td><td>Note with this label will list all roots of shared notes.</td></tr></tbody></table></figure>

View File

Before

Width:  |  Height:  |  Size: 116 KiB

After

Width:  |  Height:  |  Size: 116 KiB

View File

Before

Width:  |  Height:  |  Size: 89 KiB

After

Width:  |  Height:  |  Size: 89 KiB

View File

Before

Width:  |  Height:  |  Size: 136 KiB

After

Width:  |  Height:  |  Size: 136 KiB

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

@@ -1,4 +1,4 @@
# Technologies used
One core aspect of Trilium that allows it to have support for multiple [Note Types](../Note%20Types) is the fact that it makes use of various off-the-shelf or reusable libraries.
One core aspect of Trilium that allows it to have support for multiple [Note Types](../Note%20Types.md) is the fact that it makes use of various off-the-shelf or reusable libraries.
The sub-pages showcase some of the technologies used, for a better understanding of how Trilium works but also to credit the developers of that particular technology.

View File

@@ -1,5 +1,5 @@
# Leaflet
Leaflet is the library behind [Geo map](../../Note%20Types/Geo%20map.md) notes.
Leaflet is the library behind [Geo map](../../Note%20Types/Geo%20Map.md) notes.
## Plugins

View File

@@ -1,7 +1,7 @@
# Template
# Templates
A template in Trilium serves as a predefined structure for other notes, referred to as instance notes. Assigning a template to a note brings three main effects:
1. **Attribute Inheritance**: All attributes from the template note are [inherited](Attribute%20Inheritance.md) by the instance notes. Even attributes with `#isInheritable=false` are inherited by the instance notes, although only inheritable attributes are further inherited by the children of the instance notes.
1. **Attribute Inheritance**: All attributes from the template note are [inherited](Attributes/Attribute%20Inheritance.md) by the instance notes. Even attributes with `#isInheritable=false` are inherited by the instance notes, although only inheritable attributes are further inherited by the children of the instance notes.
2. **Content Duplication**: The content of the template note is copied to the instance note, provided the instance note is empty at the time of template assignment.
3. **Child Note Duplication**: All child notes of the template are deep-duplicated to the instance note.
@@ -9,11 +9,11 @@ A template in Trilium serves as a predefined structure for other notes, referred
A typical example would be a "Book" template note, which might include:
* **Promoted Attributes**: Such as publication year, author, etc. (see [promoted attributes](Promoted%20Attributes.md)).
* **Promoted Attributes**: Such as publication year, author, etc. (see [promoted attributes](Attributes/Promoted%20Attributes.md)).
* **Outline**: An outline for a book review, including sections like themes, conclusion, etc.
* **Child Notes**: Additional notes for highlights, summary, etc.
![Template Example](../../Attachments/template.png)
![Template Example](Templates_template.png)
## Instance Note
@@ -21,9 +21,9 @@ An instance note is a note related to a template note. This relationship means t
To create an instance note through the UI:
![show child note templates](../../Attachments/template-create-instance-n.png)
![show child note templates](Templates_template-create-.png)
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 the instance note to the template note. If you use [workspaces](../../Basic%20Concepts%20and%20Features/Navigation/Workspace.md), you can also mark templates with `#workspaceTemplate` to display them only in the workspace.
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 the instance note to the template note. If you use [workspaces](../Basic%20Concepts%20and%20Features/Navigation/Workspaces.md), you can also mark templates with `#workspaceTemplate` to display 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.
@@ -31,6 +31,6 @@ Templates can also be added or changed after note creation by creating a `~templ
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.
Explore the concept further in the [demo notes](../Database.md), including examples like the [Relation Map](../../Note%20Types/Relation%20Map.md), [Task Manager](../Advanced%20Showcases/Task%20Manager.md), and [Day Notes](../Advanced%20Showcases/Day%20Notes.md).
Explore the concept further in the [demo notes](Database.md), including examples like the [Relation Map](../Note%20Types/Relation%20Map.md), [Task Manager](Advanced%20Showcases/Task%20Manager.md), and [Day Notes](Advanced%20Showcases/Day%20Notes.md).
Additionally, see [default note title](../Default%20Note%20Title.md) for creating title templates. Note templates and title templates can be combined by creating a `#titleTemplate` for a template note.
Additionally, see [default note title](Default%20Note%20Title.md) for creating title templates. Note templates and title templates can be combined by creating a `#titleTemplate` for a template note.

View File

Before

Width:  |  Height:  |  Size: 92 KiB

After

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 128 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 533 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 179 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 148 KiB

View File

@@ -1,18 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="147px" height="32px" viewBox="0 0 147 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
<!-- Generator: Sketch 3.0.4 (8053) - http://www.bohemiancoding.com/sketch -->
<title>button</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
<g id="button" sketch:type="MSLayerGroup">
<rect id="Background" fill="#7056BF" sketch:type="MSShapeGroup" x="0" y="0" width="147" height="32" rx="4"></rect>
<g id="Icon" transform="translate(10.000000, 8.000000)" fill="#FFFFFF" sketch:type="MSShapeGroup">
<path d="M14.819,3.216 L9.103,0.25 C8.464,-0.082 7.536,-0.081 6.898,0.25 L1.181,3.216 C0.496,3.571 0,4.365 0,5.102 L0,11.035 C0,11.774 0.497,12.566 1.181,12.921 L4.039,14.404 C4.529,14.656 5.134,14.467 5.388,13.978 C5.642,13.487 5.451,12.884 4.961,12.629 L2.106,11.148 C2.068,11.124 2.008,11.039 2,11.035 L1.996,5.143 C2.008,5.098 2.068,5.013 2.103,4.991 L7.816,2.026 C7.897,1.991 8.106,1.992 8.181,2.025 L13.894,4.989 C13.932,5.013 13.992,5.098 14,5.102 L14.003,10.995 C13.992,11.039 13.932,11.124 13.898,11.146 L11.039,12.629 C10.549,12.884 10.358,13.487 10.612,13.978 C10.79,14.32 11.14,14.517 11.501,14.517 C11.656,14.517 11.814,14.481 11.961,14.404 L14.818,12.921 C15.503,12.566 16,11.774 16,11.035 L16,5.102 C16,4.365 15.504,3.571 14.819,3.216" id="App"></path>
<path d="M11.707,9.707 C12.098,9.316 12.098,8.684 11.707,8.293 L8.708,5.294 C8.616,5.201 8.505,5.128 8.382,5.077 C8.138,4.976 7.862,4.976 7.618,5.077 C7.495,5.128 7.385,5.201 7.292,5.294 L4.293,8.293 C3.902,8.684 3.902,9.316 4.293,9.707 C4.488,9.902 4.744,10 5,10 C5.256,10 5.512,9.902 5.707,9.707 L7,8.414 L7,15 C7,15.553 7.447,16 8,16 C8.553,16 9,15.553 9,15 L9,8.414 L10.293,9.707 C10.488,9.902 10.744,10 11,10 C11.256,10 11.512,9.902 11.707,9.707" id="Arrow"></path>
</g>
<path d="M81.393,21.091 C81.744,21.091 82.173,21.052 82.368,21.013 L82.368,20.09 C82.186,20.142 81.913,20.181 81.666,20.181 C80.834,20.181 80.6,19.817 80.6,19.089 L80.6,15.059 L82.381,15.059 L82.381,14.136 L80.6,14.136 L80.6,11.692 L79.482,11.692 L79.482,14.136 L78.286,14.136 L78.286,15.059 L79.482,15.059 L79.482,19.336 C79.482,20.532 79.95,21.091 81.393,21.091 Z M86.697,21.143 C88.374,21.143 89.882,19.921 89.882,17.568 C89.882,15.202 88.374,13.993 86.697,13.993 C85.007,13.993 83.499,15.202 83.499,17.568 C83.499,19.921 85.02,21.143 86.697,21.143 Z M86.697,20.194 C85.306,20.194 84.63,19.024 84.63,17.568 C84.63,16.021 85.384,14.955 86.697,14.955 C88.062,14.955 88.751,16.138 88.751,17.568 C88.751,19.141 87.997,20.194 86.697,20.194 Z M94.705,21 L95.849,21 L95.849,16.463 L100.802,16.463 L100.802,21 L101.946,21 L101.946,11.38 L100.802,11.38 L100.802,15.41 L95.849,15.41 L95.849,11.38 L94.705,11.38 L94.705,21 Z M106.834,21.143 C108.121,21.143 108.992,20.597 109.629,19.687 L108.979,19.115 C108.459,19.83 107.9,20.233 106.912,20.233 C105.781,20.233 104.884,19.401 104.845,17.854 L109.694,17.854 L109.694,17.62 C109.694,15.137 108.459,13.993 106.834,13.993 C105.391,13.993 103.727,15.072 103.727,17.568 C103.727,19.96 105.209,21.143 106.834,21.143 Z M104.871,16.983 C105.027,15.566 105.898,14.929 106.821,14.929 C107.952,14.929 108.537,15.761 108.628,16.983 L104.871,16.983 Z M111.293,21 L112.411,21 L112.411,16.567 C112.918,15.592 113.737,15.02 114.829,15.02 C114.868,15.02 115.115,15.02 115.154,15.033 L115.232,13.993 L115.089,13.993 C113.75,13.993 112.944,14.617 112.437,15.41 L112.411,15.41 L112.411,14.136 L111.293,14.136 L111.293,21 Z M119.301,21.143 C120.978,21.143 122.486,19.921 122.486,17.568 C122.486,15.202 120.978,13.993 119.301,13.993 C117.611,13.993 116.103,15.202 116.103,17.568 C116.103,19.921 117.624,21.143 119.301,21.143 Z M119.301,20.194 C117.91,20.194 117.234,19.024 117.234,17.568 C117.234,16.021 117.988,14.955 119.301,14.955 C120.666,14.955 121.355,16.138 121.355,17.568 C121.355,19.141 120.601,20.194 119.301,20.194 Z M124.072,21 L125.19,21 L125.19,18.894 L126.555,17.425 L128.583,21 L129.779,21 L127.283,16.593 L129.532,14.136 L128.258,14.136 L125.19,17.568 L125.19,11.38 L124.072,11.38 L124.072,21 Z M133.055,21.13 C134.173,21.13 135.031,20.558 135.629,19.973 L135.629,21 L136.76,21 L136.76,14.136 L135.629,14.136 L135.629,19.089 C134.914,19.765 134.238,20.194 133.406,20.194 C132.535,20.194 132.145,19.765 132.145,18.855 L132.145,14.136 L131.027,14.136 L131.027,19.089 C131.027,20.389 131.742,21.13 133.055,21.13 L133.055,21.13 Z" id="to-Heroku" fill="#B7A7D5" sketch:type="MSShapeGroup"></path>
<path d="M34.183,21 L36.718,21 C39.773,21 41.567,19.427 41.567,16.164 C41.567,12.94 39.812,11.38 36.718,11.38 L34.183,11.38 L34.183,21 Z M35.327,19.973 L35.327,12.433 L36.835,12.433 C39.175,12.433 40.423,13.577 40.423,16.164 C40.423,18.842 39.188,19.973 36.861,19.973 L35.327,19.973 Z M46,21.143 C47.287,21.143 48.158,20.597 48.795,19.687 L48.145,19.115 C47.625,19.83 47.066,20.233 46.078,20.233 C44.947,20.233 44.05,19.401 44.011,17.854 L48.86,17.854 L48.86,17.62 C48.86,15.137 47.625,13.993 46,13.993 C44.557,13.993 42.893,15.072 42.893,17.568 C42.893,19.96 44.375,21.143 46,21.143 Z M44.037,16.983 C44.193,15.566 45.064,14.929 45.987,14.929 C47.118,14.929 47.703,15.761 47.794,16.983 L44.037,16.983 Z M50.459,23.6 L51.577,23.6 L51.577,20.116 C52.162,20.727 52.877,21.104 53.722,21.104 C55.399,21.104 56.634,19.947 56.634,17.555 C56.634,15.163 55.412,13.993 53.839,13.993 C52.812,13.993 52.097,14.513 51.577,15.085 L51.577,14.136 L50.459,14.136 L50.459,23.6 Z M53.566,20.194 C52.838,20.194 52.175,19.83 51.577,19.154 L51.577,16.008 C52.149,15.384 52.786,14.955 53.579,14.955 C54.684,14.955 55.516,15.813 55.516,17.568 C55.516,19.388 54.762,20.194 53.566,20.194 Z M58.324,21 L59.442,21 L59.442,11.38 L58.324,11.38 L58.324,21 Z M64.304,21.143 C65.981,21.143 67.489,19.921 67.489,17.568 C67.489,15.202 65.981,13.993 64.304,13.993 C62.614,13.993 61.106,15.202 61.106,17.568 C61.106,19.921 62.627,21.143 64.304,21.143 Z M64.304,20.194 C62.913,20.194 62.237,19.024 62.237,17.568 C62.237,16.021 62.991,14.955 64.304,14.955 C65.669,14.955 66.358,16.138 66.358,17.568 C66.358,19.141 65.604,20.194 64.304,20.194 Z M69.465,23.639 C70.804,23.639 71.337,22.989 71.805,21.78 L74.743,14.136 L73.612,14.136 L71.597,19.687 L71.571,19.687 L69.556,14.136 L68.373,14.136 L71.025,21.039 L70.765,21.715 C70.492,22.391 70.154,22.69 69.452,22.69 C68.971,22.69 68.633,22.625 68.438,22.573 L68.178,23.47 C68.477,23.561 68.854,23.639 69.465,23.639 L69.465,23.639 Z" id="Deploy" fill="#FFFFFF" sketch:type="MSShapeGroup"></path>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 222 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 211 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

View File

@@ -1,5 +1,5 @@
# Markdown
Trilium Notes supports importing Markdown restricted to the [CommonMark specification](https://spec.commonmark.org/current/) (where [tables are not supported](https://github.com/TriliumNext/Notes/issues/2026))
Trilium supports Markdown for both import and export, while trying to keep compatibility as high as possible.
## Import
@@ -7,7 +7,7 @@ Trilium Notes supports importing Markdown restricted to the [CommonMark specific
If you want to import just a chunk of markdown from clipboard, you can do it from editor block menu:
![](../../Attachments/markdown-inline-import.gif)
![](Markdown_markdown-inline-i.gif)
### File import
@@ -20,7 +20,7 @@ You can also import Markdown files from files:
\[\[gifs/markdown-file-import.gif\]\]
![](../../Attachments/markdown-file-import.gif)
![](Markdown_markdown-file-imp.gif)
## Export
@@ -28,14 +28,23 @@ You can also import Markdown files from files:
You can export whole subtree to ZIP archive which will have directory structured modelled after subtree structure:
![](../../Attachments/markdown-export-subtree.gif)
![](Markdown_markdown-export-s.gif)
### Single note export
If you want to export just single note without its subtree, you can do it from Note actions menu:
![](../../Attachments/markdown-export-note.gif)
![](Markdown_markdown-export-n.gif)
### Exporting protected notes
If you want to export protected notes, enter a protected session first! This will export the notes in an unencrypted form, so if you reimport into Trilium, make sure to re-protect these notes.
## Supported syntax
* [GitHub-Flavored Markdown](https://github.github.com/gfm/) is the main syntax that Trilium is following.
* Images are supported. When exporting, images are usually kept in the basic Markdown syntax but will use the HTML syntax if the image has a custom width. Figures are always embedded as HTML.
* Tables are supported with the Markdown syntax. If the table is too complex or contains elements that would render as HTML, the table is also rendered as HTML.
* <a class="reference-link" href="../../Note%20Types/Text/Admonitions.md">Admonitions</a> are supported using GitHub's format.
* Links are supported. “Reference links” (internal links that mirror a note's title and display its icon) are embedded as HTML in order to preserve the information on import.
* Math equations are supported using `$` and `$$` syntaxes.

Binary file not shown.

After

Width:  |  Height:  |  Size: 729 B

View File

@@ -1,12 +1,12 @@
# Bookmarks
To easily access selected notes, you can bookmark them. See demo:
![](../../Attachments/bookmarks.gif)
![](Bookmarks_bookmarks.gif)
## 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:
![](../../Attachments/bookmark-folder.png)
![](Bookmarks_bookmark-folder.png)
To do this, you need to add a `#bookmarkFolder` label to the note.

View File

@@ -0,0 +1,25 @@
# Jump to Note
<figure class="image image-style-align-center"><img style="aspect-ratio:991/403;" src="Jump to Note_image.png" width="991" height="403"></figure>
The _Jump to Note_ function allows easy navigation between notes by searching for their title. In addition to that, it can also trigger a full search or create notes.
## Entering jump to note
* In the <a class="reference-link" href="../UI%20Elements/Launch%20Bar.md">Launch Bar</a>, press ![](1_Jump%20to%20Note_image.png) button.
* Using the keyboard, press <kbd>Ctrl</kbd> + <kbd>J</kbd>.
## Recent notes
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.
Alternatively you can click on the "time" icon on the right.
<img src="Jump to Note_recent-notes.gif" width="812" height="585">
## Interaction
* By default, when there is no text entered it will display the most recent notes.
* Using the keyboard, use the up or down arrow keys to navigate between items. Press <kbd>Enter</kbd> to open the desired note.
* If the note doesn't exist, it's possible to create it by typing the desired note title and selecting the _Create and link child note_ option.

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

View File

@@ -1,8 +1,8 @@
# Note Hoisting
Hoisting is a standard outliner feature which allows you to focus on (or "zoom into") a specific note and its subtree by hiding all parent and sibling notes. Demo:
![](../../Attachments/note-hoisting.gif)
![](Note%20Hoisting_note-hoistin.gif)
In addition to showing only this subtree, this also narrows both full text search and [“jump to note”](Note%20Navigation.md) to just notes present in hoisted subtree.
See also [Workspace](Workspace.md) which extends this feature.
See also [Workspace](Workspaces.md) which extends this feature.

View File

@@ -11,16 +11,6 @@ This works identically to browser backwards / forwards, it's actually using buil
## Jump to note
This is useful to quickly find and view arbitrary note - click on `Jump to` button on the top or press <kbd>Ctrl</kbd> + <kbd>J</kbd> . Then type part of the note name and autocomplete will help you pick the desired note.
This is useful to quickly find and view arbitrary notes - click on `Jump to` button on the top or press <kbd>Ctrl</kbd> + <kbd>J</kbd> . Then type part of the note name and autocomplete will help you pick the desired note.
![](../../Attachments/jump-to.gif)
### Recent notes
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.
Alternatively you can click on the "time" icon on the right.
![](../../Attachments/recent-notes.gif)
See <a class="reference-link" href="Jump%20to%20Note.md">Jump to Note</a> for more information.

View File

@@ -0,0 +1,15 @@
# Quick search
<figure class="image image-style-align-center"><img style="aspect-ratio:659/256;" src="Quick search_image.png" width="659" height="256"></figure>
The _Quick search_ function does a full-text search (that is, it searches through the content of notes and not just the title of a note) and displays the result in an easy-to-access manner.
The alternative to the quick search is the <a class="reference-link" href="Search.md">Search</a> function, which opens in a dedicated tab and has support for advanced queries.
For even faster navigation, it's possible to use <a class="reference-link" href="Jump%20to%20Note.md">Jump to Note</a> which will only search through the note titles instead of the content.
## Layout
Based on the <a class="reference-link" href="../UI%20Elements/Vertical%20and%20horizontal%20layout.md">Vertical and horizontal layout</a>, the quick search is placed:
* On the vertical layout, it is displayed right above the <a class="reference-link" href="../UI%20Elements/Note%20Tree.md">Note Tree</a>.
* On the horizontal layout, it is displayed in the <a class="reference-link" href="../UI%20Elements/Launch%20Bar.md">Launch Bar</a>, where it can be positioned just like any other icon.

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

View File

@@ -0,0 +1,29 @@
# Search in note
<figure class="image image_resized" style="width:100%;"><img style="aspect-ratio:898/93;" src="Search in note_image.png" width="898" height="93"></figure>
Local search allows you to search within the currently displayed note. 
## Alternatives
* Pressing Ctrl+F while in a browser while not focused in a <a class="reference-link" href="../../Note%20Types/Text.md">Text</a> or a <a class="reference-link" href="../../Note%20Types/Code.md">Code</a> note will trigger the browser's native search. This will also find text that is part of Trilium's UI.
* Pressing Ctrl+F in a <a class="reference-link" href="../../Note%20Types/Text.md">Text</a> note will reveal <a class="reference-link" href="../../Advanced%20Usage/Technologies%20used/CKEditor.md">CKEditor</a>'s search functionality.
## Accessing the search
* On desktop, press<kbd>Ctrl</kbd> + <kbd>F</kbd>
* From the <a class="reference-link" href="../UI%20Elements/Note%20buttons.md">Note buttons</a>, look for the context menu and select _Search in note_.
## Interaction
* Finding:
* Fill in the _Find in text…_ with the text to search for.
* The search will be executed automatically in the background.
* Use up and down arrows of the text box to navigate between results.
* Replacing:
* Fill in the _Find in text_… field with the text to replace.
* Fill in the _Replace with…_ field the text to replace it with.
* Press _Replace_ to replace only the current result.
* Press _Replace all_ to replace all of them at once.
* Options:
* _Case sensitive_ the search will distinguish upper case characters from lower case (e.g. searching for Hello will not match `hello`).
* _Match words_ - the search will find only exact word matches (e.g. searching for `Java` will not match `JavaScript`).

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

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