mirror of
https://github.com/zadam/trilium.git
synced 2025-11-08 22:35:50 +01:00
Merge remote-tracking branch 'origin/main'
This commit is contained in:
83
docs/User Guide/!!!meta.json
vendored
83
docs/User Guide/!!!meta.json
vendored
@@ -14150,6 +14150,82 @@
|
||||
"format": "markdown",
|
||||
"dataFileName": "Nightly release.md",
|
||||
"attachments": []
|
||||
},
|
||||
{
|
||||
"isClone": false,
|
||||
"noteId": "ZmT9ln8XJX2o",
|
||||
"notePath": [
|
||||
"pOsGYCXsbNQG",
|
||||
"tC7s2alapj8V",
|
||||
"ZmT9ln8XJX2o"
|
||||
],
|
||||
"title": "Read-only database",
|
||||
"notePosition": 270,
|
||||
"prefix": null,
|
||||
"isExpanded": false,
|
||||
"type": "text",
|
||||
"mime": "text/html",
|
||||
"attributes": [
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "Gzjqa934BdH4",
|
||||
"isInheritable": false,
|
||||
"position": 10
|
||||
},
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "wy8So3yZZlH9",
|
||||
"isInheritable": false,
|
||||
"position": 20
|
||||
},
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "R9pX4DGra2Vt",
|
||||
"isInheritable": false,
|
||||
"position": 30
|
||||
},
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "eIg8jdvaoNNd",
|
||||
"isInheritable": false,
|
||||
"position": 40
|
||||
},
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "GTwFsgaA0lCt",
|
||||
"isInheritable": false,
|
||||
"position": 50
|
||||
},
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "KSZ04uQ2D1St",
|
||||
"isInheritable": false,
|
||||
"position": 60
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "iconClass",
|
||||
"value": "bx bx-book-reader",
|
||||
"isInheritable": false,
|
||||
"position": 30
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "shareAlias",
|
||||
"value": "read-only-db",
|
||||
"isInheritable": false,
|
||||
"position": 40
|
||||
}
|
||||
],
|
||||
"format": "markdown",
|
||||
"dataFileName": "Read-only database.md",
|
||||
"attachments": []
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -14174,6 +14250,13 @@
|
||||
"isInheritable": false,
|
||||
"position": 10
|
||||
},
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "xYmIYSP6wE3F",
|
||||
"isInheritable": false,
|
||||
"position": 20
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "shareAlias",
|
||||
|
||||
4
docs/User Guide/User Guide/AI.md
vendored
4
docs/User Guide/User Guide/AI.md
vendored
@@ -80,10 +80,10 @@ You don't need to tell the LLM to execute a certain tool, it should “smartly
|
||||
|
||||
## Overview
|
||||
|
||||
Now that you know about embeddings and tools, you can just go ahead and use the “Chat with Notes” button, where you can go ahead and start chatting!:
|
||||
To start, simply press the _Chat with Notes_ button in the <a class="reference-link" href="Basic%20Concepts%20and%20Features/UI%20Elements/Launch%20Bar.md">Launch Bar</a>.
|
||||
|
||||
<figure class="image image_resized" style="width:60.77%;"><img style="aspect-ratio:1378/539;" src="2_AI_image.png" width="1378" height="539"></figure>
|
||||
|
||||
If you don't see the “Chat with Notes” button on your side launchbar, you might need to move it from the “Available Launchers” section to the “Visible Launchers” section:
|
||||
If you don't see the button in the <a class="reference-link" href="Basic%20Concepts%20and%20Features/UI%20Elements/Launch%20Bar.md">Launch Bar</a>, you might need to move it from the _Available Launchers_ section to the _Visible Launchers_ section:
|
||||
|
||||
<figure class="image image_resized" style="width:69.81%;"><img style="aspect-ratio:1765/1287;" src="9_AI_image.png" width="1765" height="1287"></figure>
|
||||
32
docs/User Guide/User Guide/Advanced Usage/Read-only database.md
vendored
Normal file
32
docs/User Guide/User Guide/Advanced Usage/Read-only database.md
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
# Read-only database
|
||||
> [!WARNING]
|
||||
> This functionality is still in preview, expect possible issues or even the feature disappearing completely.
|
||||
> Feel free to [report](../Troubleshooting/Reporting%20issues.md) any issues you might have.
|
||||
|
||||
The read-only database is an alternative to <a class="reference-link" href="Sharing.md">Sharing</a> notes. Although the share functionality works pretty well to publish pages to the Internet in a wiki, blog-like format it does not offer the full functionality behind Trilium (such as the advanced <a class="reference-link" href="../Basic%20Concepts%20and%20Features/Navigation/Search.md">Search</a> or the interactivity behind <a class="reference-link" href="../Collections.md">Collections</a> or the various <a class="reference-link" href="../Note%20Types.md">Note Types</a>).
|
||||
|
||||
When the database is in read-only mode, the Trilium application can be used as normal, but editing is disabled and changes are made in-memory only.
|
||||
|
||||
## What it does
|
||||
|
||||
* All notes are read-only, without the possibility of editing them.
|
||||
* Features that would normally alter the database such as the list of recent notes are disabled.
|
||||
|
||||
## Limitations
|
||||
|
||||
* Some features might “slip through” and still end up creating a note, for example.
|
||||
* However, the database is still read-only, so all modifications will be reset if the server is restarted.
|
||||
* Whenever this occurs, `ERROR: read-only DB ignored` will be shown in the logs.
|
||||
|
||||
## Setting a database as read-only
|
||||
|
||||
First, make sure the database is initialized (e.g. the first set up is complete). Then modify the [config.ini](Configuration%20\(config.ini%20or%20e.md) by looking for the `[General]` section and adding a new `readOnly` field:
|
||||
|
||||
```
|
||||
[General]
|
||||
readOnly=true
|
||||
```
|
||||
|
||||
If your server is already running, restart it to apply the changes.
|
||||
|
||||
Similarly, to disable read-only remove the line or set it to `false`.
|
||||
@@ -26,7 +26,17 @@ If you want to back up your Trilium data, just backup this single directory - it
|
||||
|
||||
### Changing the location of data directory
|
||||
|
||||
If you want to use some other location for the data directory than the default one, you may change it via TRILIUM\_DATA\_DIR environment variable to some other location:
|
||||
If you want to use some other location for the data directory than the default one, you may change it via `TRILIUM_DATA_DIR` environment variable to some other location:
|
||||
|
||||
### Windows
|
||||
|
||||
1. Press the Windows key on your keyboard.
|
||||
2. Search and select “Edit the system variables”.
|
||||
3. Press the “Environment Variables…” button in the bottom-right of the newly opened screen.
|
||||
4. On the top section ("User variables for \[user\]"), press the “New…” button.
|
||||
5. In the _Variable name_ field insert `TRILIUM_DATA_DIR`.
|
||||
6. Press the _Browse Directory…_ button and select the new directory where to store the database.
|
||||
7. Close all the windows by pressing the _OK_ button for each of them.
|
||||
|
||||
#### Linux
|
||||
|
||||
@@ -43,11 +53,6 @@ To load it manually, you need to use `launchctl setenv TRILIUM_DATA_DIR <yourpat
|
||||
Here is a pre-defined template, where you just need to add your path to:
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Label
|
||||
set.trilium.env
|
||||
RunAtLoad
|
||||
@@ -57,17 +62,14 @@ Here is a pre-defined template, where you just need to add your path to:
|
||||
launchctl
|
||||
setenv
|
||||
TRILIUM_DATA_DIR
|
||||
/Users/YourUserName/Library/Application Support/trilium-data
|
||||
|
||||
|
||||
|
||||
/Users/YourUserName/Library/Application Support/trilium-data
|
||||
```
|
||||
|
||||
### Create a script to run with specific data directory
|
||||
|
||||
An alternative to globally setting environment variable is to run only the Trilium Notes with this environment variable. This then allows for different setup styles like two [database](../Advanced%20Usage/Database.md) instances or "portable" installation.
|
||||
|
||||
To do this in unix based systems simply run trilium like this:
|
||||
To do this in Unix-based systems simply run `trilium` like this:
|
||||
|
||||
```
|
||||
TRILIUM_DATA_DIR=/home/myuser/data/my-trilium-data trilium
|
||||
|
||||
@@ -11,7 +11,7 @@ class MyWidget extends api.BasicWidget {
|
||||
get parentWidget() { return "left-pane"; }
|
||||
|
||||
doRender() {
|
||||
this.$widget = $("");
|
||||
this.$widget = $("<div id='my-widget'>");
|
||||
return this.$widget;
|
||||
}
|
||||
}
|
||||
@@ -25,14 +25,14 @@ To implement this widget:
|
||||
2. Assign the `#widget` [attribute](../../../Advanced%20Usage/Attributes.md) to the [note](../../../Basic%20Concepts%20and%20Features/Notes.md).
|
||||
3. Restart Trilium or reload the window.
|
||||
|
||||
To verify that the widget is working, open the developer tools (`Cmd` + `Shift` + `I`) and run `document.querySelector("#my-widget")`. If the element is found, the widget is functioning correctly. If `undefined` is returned, double-check that the [note](../../../Basic%20Concepts%20and%20Features/Notes.md) has the `#widget` [attribute](../../../Advanced%20Usage/Attributes.md).
|
||||
To verify that the widget is working, open the developer tools (<kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>I</kbd>) and run `document.querySelector("#my-widget")`. If the element is found, the widget is functioning correctly. If `undefined` is returned, double-check that the [note](../../../Basic%20Concepts%20and%20Features/Notes.md) has the `#widget` [attribute](../../../Advanced%20Usage/Attributes.md).
|
||||
|
||||
### Step 2: Adding an UI Element
|
||||
|
||||
Next, let's improve the widget by adding a button to it.
|
||||
|
||||
```
|
||||
const template = ``;
|
||||
const template = `<div id="my-widget"><button>Click Me!</button></div>`;
|
||||
|
||||
class MyWidget extends api.BasicWidget {
|
||||
get position() {return 1;}
|
||||
@@ -56,7 +56,7 @@ To make the button more visually appealing and position it correctly, we'll appl
|
||||
Here's the updated template:
|
||||
|
||||
```
|
||||
const template = ``;
|
||||
const template = `<div id="my-widget"><button class="tree-floating-button bx bxs-magic-wand tree-settings-button"></button></div>`;
|
||||
```
|
||||
|
||||
Next, we'll adjust the button's position using CSS:
|
||||
|
||||
Reference in New Issue
Block a user