mirror of
https://github.com/zadam/trilium.git
synced 2025-10-29 01:06:36 +01:00
feat(docs): reorganize script notes & document render note
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# Advanced Showcases
|
||||
Trilium offers advanced functionality through [Scripts](../Note%20Types/Code/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):
|
||||
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)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Task Manager
|
||||
Task Manager is a [promoted attributes](../Attributes/Promoted%20Attributes.md) and [scripts](../../Note%20Types/Code/Scripting.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
|
||||
|
||||
@@ -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/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.
|
||||
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](../../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
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ By adding `weight` as a [promoted attribute](../Attributes/Promoted%20Attributes
|
||||
|
||||
## 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/Scripting.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.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Custom Request Handler
|
||||
Trilium provides a mechanism for [scripts](../Note%20Types/Code/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`).
|
||||
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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user