SERVER with the correct protocol, host name and port to your
+
TOKEN with your ETAPI token.
+
SERVER with the correct protocol, host name and port to your
Trilium instance.
-
NOTE_ID with an existing note ID to download.
+
NOTE_ID with an existing note ID to download.
As another example, to obtain a .zip export of a note and place it in
a directory called out, simply replace the last statement in
diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Nightly release.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Nightly release.html
new file mode 100644
index 000000000..d3cdc2008
--- /dev/null
+++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Nightly release.html
@@ -0,0 +1,35 @@
+
Nightly releases are versions built every day, containing the latest improvements
+ and bugfixes, directly from the main development branch. These versions
+ are generally useful in preparation for a release, to ensure that there
+ are no significant bugs that need to be addressed first, or they can be
+ used to confirm whether a particular bug is fixed or feature is well implemented.
+
Regarding the stability
+
Despite being on a development branch, generally the main branch is pretty
+ stable since PRs are tested before they are merged. If you notice any issues,
+ feel free to report them either via a ticket or via the Matrix.
The source/preview can be laid out left-right or bottom-top via the Move editing pane to the left / bottom option.
-
Press Lock editing to automatically mark the note as read-only.
+
The source/preview can be laid out left-right or bottom-top via the Move editing pane to the left / bottom option.
+
Press Lock editing to automatically mark the note as read-only.
In this mode, the code pane is hidden and the diagram is displayed full-size.
Similarly, press Unlock editing to mark a read-only note as editable.
-
Press the Copy image reference to the clipboard to be able to insert
- the image representation of the diagram into a text note. See Image references for more information.
-
Press the Export diagram as SVG to download a scalable/vector rendering
- of the diagram. Can be used to present the diagram without degrading when
- zooming.
-
Press the Export diagram as PNG to download a normal image (at
+
Press the Copy image reference to the clipboard to be able to insert
+ the image representation of the diagram into a text note. See Image references for more information.
+
Press the Export diagram as SVG to download a scalable/vector rendering
+ of the diagram. Can be used to present the diagram without degrading when
+ zooming.
+
Press the Export diagram as PNG to download a normal image (at
1x scale, raster) of the diagram. Can be used to send the diagram in more
traditional channels such as e-mail.
-
-
+
+
Errors in the diagram
If there is an error in the source code, the error will be displayed in
diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Events.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Backend scripts/Events.html
similarity index 100%
rename from apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Events.html
rename to apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Backend scripts/Events.html
diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Backend scripts/Server-side imports.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Backend scripts/Server-side imports.html
new file mode 100644
index 000000000..7820ccfe2
--- /dev/null
+++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Backend scripts/Server-side imports.html
@@ -0,0 +1,7 @@
+
Older versions of Trilium Notes allowed the use of Common.js module imports
+ inside backend scripts, such as:
For newer versions, Node.js imports are not officially supported anymore,
+ since we've added a bundler which makes it more difficult to reuse dependencies.
+
Theoretically it's still possible to use imports by manually setting up
+ a node_modules in the server directory via npm or pnpm.
\ No newline at end of file
diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Custom Widgets.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Custom Widgets.html
similarity index 100%
rename from apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Custom Widgets.html
rename to apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Custom Widgets.html
diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Custom Widgets/CSS.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Custom Widgets/CSS.html
new file mode 100644
index 000000000..249da3ad3
--- /dev/null
+++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Custom Widgets/CSS.html
@@ -0,0 +1,9 @@
+
To verify that the widget is working, open the developer tools (Cmd + Shift + I)
and run document.querySelector("#my-widget"). If the element
@@ -87,5 +87,18 @@ module.exports = new MyWidget();
}
module.exports = new MyWidget();
-
Reload the application one last time. When you click the button, a "Hello
- World!" message should appear, confirming that your widget is fully functional.
\ No newline at end of file
+
parentWidget() can be given the following values:
+
+
left-pane - This renders the widget on the left side of the
+ screen where the note tree lives.
+
center-pane - This renders the widget in the center of the
+ layout in the same location that notes and splits appear.
+
note-detail-pane - This renders the widget with the
+ note in the center pane. This means it can appear multiple times with splits.
+
right-pane - This renders the widget to the right of any opened
+ notes.
+
+
Reload the application
+ one last time. When you click the button, a "Hello World!" message should
+ appear, confirming that your widget is fully functional.
\ No newline at end of file
diff --git a/docs/Developer Guide/Developer Guide/Architecture/Database structure/blobs.md b/docs/Developer Guide/Developer Guide/Architecture/Database structure/blobs.md
new file mode 100644
index 000000000..63bf8c24d
--- /dev/null
+++ b/docs/Developer Guide/Developer Guide/Architecture/Database structure/blobs.md
@@ -0,0 +1,2 @@
+# blobs
+
Column Name
Data Type
Nullity
Default value
Description
blobId
Text
Non-null
The unique ID of the blob (e.g. XXbfAJXqWrYnSXcelLFA).
content
Text
Nullable
null
The content of the blob, can be either:
text (for plain text notes or HTML notes).
binary (for images and other types of attachments)
dateModified
Text
Non-null
Creation date with timezone offset (e.g. 2023-11-08 18:43:44.204+0200)
utcDateModified
Text
Non-null
Creation date in UTC format (e.g. 2023-11-08 16:43:44.204Z).
Blobs cannot be modified, so this timestamp specifies when the blob was created.
\ No newline at end of file
diff --git a/docs/Developer Guide/Developer Guide/Development and architecture/Database/branches.md b/docs/Developer Guide/Developer Guide/Architecture/Database structure/branches.md
similarity index 100%
rename from docs/Developer Guide/Developer Guide/Development and architecture/Database/branches.md
rename to docs/Developer Guide/Developer Guide/Architecture/Database structure/branches.md
diff --git a/docs/Developer Guide/Developer Guide/Development and architecture/Database/entity_changes.md b/docs/Developer Guide/Developer Guide/Architecture/Database structure/entity_changes.md
similarity index 100%
rename from docs/Developer Guide/Developer Guide/Development and architecture/Database/entity_changes.md
rename to docs/Developer Guide/Developer Guide/Architecture/Database structure/entity_changes.md
diff --git a/docs/Developer Guide/Developer Guide/Development and architecture/Database/etapi_tokens.md b/docs/Developer Guide/Developer Guide/Architecture/Database structure/etapi_tokens.md
similarity index 100%
rename from docs/Developer Guide/Developer Guide/Development and architecture/Database/etapi_tokens.md
rename to docs/Developer Guide/Developer Guide/Architecture/Database structure/etapi_tokens.md
diff --git a/docs/Developer Guide/Developer Guide/Development and architecture/Database/notes.md b/docs/Developer Guide/Developer Guide/Architecture/Database structure/notes.md
similarity index 100%
rename from docs/Developer Guide/Developer Guide/Development and architecture/Database/notes.md
rename to docs/Developer Guide/Developer Guide/Architecture/Database structure/notes.md
diff --git a/docs/Developer Guide/Developer Guide/Development and architecture/Database/options.md b/docs/Developer Guide/Developer Guide/Architecture/Database structure/options.md
similarity index 100%
rename from docs/Developer Guide/Developer Guide/Development and architecture/Database/options.md
rename to docs/Developer Guide/Developer Guide/Architecture/Database structure/options.md
diff --git a/docs/Developer Guide/Developer Guide/Development and architecture/Database/recent_notes.md b/docs/Developer Guide/Developer Guide/Architecture/Database structure/recent_notes.md
similarity index 100%
rename from docs/Developer Guide/Developer Guide/Development and architecture/Database/recent_notes.md
rename to docs/Developer Guide/Developer Guide/Architecture/Database structure/recent_notes.md
diff --git a/docs/Developer Guide/Developer Guide/Development and architecture/Database/revisions.md b/docs/Developer Guide/Developer Guide/Architecture/Database structure/revisions.md
similarity index 100%
rename from docs/Developer Guide/Developer Guide/Development and architecture/Database/revisions.md
rename to docs/Developer Guide/Developer Guide/Architecture/Database structure/revisions.md
diff --git a/docs/Developer Guide/Developer Guide/Development and architecture/Deleted notes.md b/docs/Developer Guide/Developer Guide/Architecture/Deleted notes.md
similarity index 100%
rename from docs/Developer Guide/Developer Guide/Development and architecture/Deleted notes.md
rename to docs/Developer Guide/Developer Guide/Architecture/Deleted notes.md
diff --git a/docs/Developer Guide/Developer Guide/Architecture/Demo document.md b/docs/Developer Guide/Developer Guide/Architecture/Demo document.md
new file mode 100644
index 000000000..90429bdb1
--- /dev/null
+++ b/docs/Developer Guide/Developer Guide/Architecture/Demo document.md
@@ -0,0 +1,22 @@
+# Demo document
+The demo document is an exported .zip that resides in `apps/server/src/assets/db/demo.zip`.
+
+During on-boarding, if the user selects that they are a new user then the `demo.zip` is imported into the root note.
+
+## Modifying the document
+
+1. In the Git root, run `pnpm edit-docs:edit-demo`.
+2. Wait for the desktop application to show up with the docs.
+3. Simply make the needed modifications.
+4. Wait for a few seconds for the change to be processed in the background.
+5. Commit the change in Git.
+
+## Testing the changes
+
+1. Run:
+
+ ```
+ rm -r data
+ pnpm server:start
+ ```
+2. And then do the on-boarding again.
\ No newline at end of file
diff --git a/docs/Developer Guide/Developer Guide/Development and architecture/Hidden notes.md b/docs/Developer Guide/Developer Guide/Architecture/Hidden notes.md
similarity index 100%
rename from docs/Developer Guide/Developer Guide/Development and architecture/Hidden notes.md
rename to docs/Developer Guide/Developer Guide/Architecture/Hidden notes.md
diff --git a/docs/Developer Guide/Developer Guide/Development and architecture/Icons.md b/docs/Developer Guide/Developer Guide/Architecture/Icons.md
similarity index 59%
rename from docs/Developer Guide/Developer Guide/Development and architecture/Icons.md
rename to docs/Developer Guide/Developer Guide/Architecture/Icons.md
index 791e26f6c..826ebc9bb 100644
--- a/docs/Developer Guide/Developer Guide/Development and architecture/Icons.md
+++ b/docs/Developer Guide/Developer Guide/Architecture/Icons.md
@@ -21,7 +21,7 @@ These are stored in `images`:
## App icons
-
Name
Resolution
Description
ios/apple-touch-icon.png
180x180
Used as apple-touch-icon, but only in login.ejs and set_password.ejs for some reason.
mac/icon.icns
512x512
Provided as --icon to electron-packager for mac-arm64 and mac-x64builds.
Used by Squirrel Windows installer for: setup icon, app icon, control panel icon
Used as the favicon.
win/setup-banner.gif
640x480
Used by the Squirrel Windows installer during the installation process. Has only one frame.
## Additional locations where the branding is used
diff --git a/docs/Developer Guide/Developer Guide/Development and architecture/Internationalisation Translat.md b/docs/Developer Guide/Developer Guide/Architecture/Internationalisation Translat.md
similarity index 100%
rename from docs/Developer Guide/Developer Guide/Development and architecture/Internationalisation Translat.md
rename to docs/Developer Guide/Developer Guide/Architecture/Internationalisation Translat.md
diff --git a/docs/Developer Guide/Developer Guide/Development and architecture/Internationalisation Translations/Guidelines.md b/docs/Developer Guide/Developer Guide/Architecture/Internationalisation Translations/Guidelines.md
similarity index 100%
rename from docs/Developer Guide/Developer Guide/Development and architecture/Internationalisation Translations/Guidelines.md
rename to docs/Developer Guide/Developer Guide/Architecture/Internationalisation Translations/Guidelines.md
diff --git a/docs/Developer Guide/Developer Guide/Development and architecture/Internationalisation Translations/Server translations.md b/docs/Developer Guide/Developer Guide/Architecture/Internationalisation Translations/Server translations.md
similarity index 100%
rename from docs/Developer Guide/Developer Guide/Development and architecture/Internationalisation Translations/Server translations.md
rename to docs/Developer Guide/Developer Guide/Architecture/Internationalisation Translations/Server translations.md
diff --git a/docs/Developer Guide/Developer Guide/Development and architecture/Internationalisation Translations/i18n-ally.md b/docs/Developer Guide/Developer Guide/Architecture/Internationalisation Translations/i18n-ally.md
similarity index 100%
rename from docs/Developer Guide/Developer Guide/Development and architecture/Internationalisation Translations/i18n-ally.md
rename to docs/Developer Guide/Developer Guide/Architecture/Internationalisation Translations/i18n-ally.md
diff --git a/docs/Developer Guide/Developer Guide/Development and architecture/Launchers.md b/docs/Developer Guide/Developer Guide/Architecture/Launchers.md
similarity index 100%
rename from docs/Developer Guide/Developer Guide/Development and architecture/Launchers.md
rename to docs/Developer Guide/Developer Guide/Architecture/Launchers.md
diff --git a/docs/Developer Guide/Developer Guide/Development and architecture/Revisions.md b/docs/Developer Guide/Developer Guide/Architecture/Note Revisions.md
similarity index 100%
rename from docs/Developer Guide/Developer Guide/Development and architecture/Revisions.md
rename to docs/Developer Guide/Developer Guide/Architecture/Note Revisions.md
diff --git a/docs/Developer Guide/Developer Guide/Development and architecture/Adding a new note type/Copy image reference to the cl.md b/docs/Developer Guide/Developer Guide/Architecture/Note Types/Adding a new note type/Copy image reference to the cl.md
similarity index 100%
rename from docs/Developer Guide/Developer Guide/Development and architecture/Adding a new note type/Copy image reference to the cl.md
rename to docs/Developer Guide/Developer Guide/Architecture/Note Types/Adding a new note type/Copy image reference to the cl.md
diff --git a/docs/Developer Guide/Developer Guide/Development and architecture/Adding a new note type/Export diagram as SVG.md b/docs/Developer Guide/Developer Guide/Architecture/Note Types/Adding a new note type/Export diagram as SVG.md
similarity index 100%
rename from docs/Developer Guide/Developer Guide/Development and architecture/Adding a new note type/Export diagram as SVG.md
rename to docs/Developer Guide/Developer Guide/Architecture/Note Types/Adding a new note type/Export diagram as SVG.md
diff --git a/docs/Developer Guide/Developer Guide/Development and architecture/Adding a new note type/First steps.md b/docs/Developer Guide/Developer Guide/Architecture/Note Types/Adding a new note type/First steps.md
similarity index 95%
rename from docs/Developer Guide/Developer Guide/Development and architecture/Adding a new note type/First steps.md
rename to docs/Developer Guide/Developer Guide/Architecture/Note Types/Adding a new note type/First steps.md
index f60138817..fa860fe59 100644
--- a/docs/Developer Guide/Developer Guide/Development and architecture/Adding a new note type/First steps.md
+++ b/docs/Developer Guide/Developer Guide/Architecture/Note Types/Adding a new note type/First steps.md
@@ -41,7 +41,7 @@ Go to `src/becca/entities/rows.ts` and add the new note type to `ALLOWED_NOTE_TY
## Final steps
-* Update the Demo document to showcase the new note type.
+* Update the Demo document to showcase the new note type.
## Troubleshooting
diff --git a/docs/Developer Guide/Developer Guide/Development and architecture/Adding a new note type/First steps/mind_map.js b/docs/Developer Guide/Developer Guide/Architecture/Note Types/Adding a new note type/First steps/mind_map.js
similarity index 100%
rename from docs/Developer Guide/Developer Guide/Development and architecture/Adding a new note type/First steps/mind_map.js
rename to docs/Developer Guide/Developer Guide/Architecture/Note Types/Adding a new note type/First steps/mind_map.js
diff --git a/docs/Developer Guide/Developer Guide/Development and architecture/Adding a new note type/Loading data.md b/docs/Developer Guide/Developer Guide/Architecture/Note Types/Adding a new note type/Loading data.md
similarity index 100%
rename from docs/Developer Guide/Developer Guide/Development and architecture/Adding a new note type/Loading data.md
rename to docs/Developer Guide/Developer Guide/Architecture/Note Types/Adding a new note type/Loading data.md
diff --git a/docs/Developer Guide/Developer Guide/Development and architecture/Adding a new note type/Note type checklist.md b/docs/Developer Guide/Developer Guide/Architecture/Note Types/Adding a new note type/Note type checklist.md
similarity index 100%
rename from docs/Developer Guide/Developer Guide/Development and architecture/Adding a new note type/Note type checklist.md
rename to docs/Developer Guide/Developer Guide/Architecture/Note Types/Adding a new note type/Note type checklist.md
diff --git a/docs/Developer Guide/Developer Guide/Development and architecture/Adding a new note type/SVG rendering.md b/docs/Developer Guide/Developer Guide/Architecture/Note Types/Adding a new note type/SVG rendering.md
similarity index 100%
rename from docs/Developer Guide/Developer Guide/Development and architecture/Adding a new note type/SVG rendering.md
rename to docs/Developer Guide/Developer Guide/Architecture/Note Types/Adding a new note type/SVG rendering.md
diff --git a/docs/Developer Guide/Developer Guide/Development and architecture/Adding a new note type/Saving data via spaced update.md b/docs/Developer Guide/Developer Guide/Architecture/Note Types/Adding a new note type/Saving data via spaced update.md
similarity index 100%
rename from docs/Developer Guide/Developer Guide/Development and architecture/Adding a new note type/Saving data via spaced update.md
rename to docs/Developer Guide/Developer Guide/Architecture/Note Types/Adding a new note type/Saving data via spaced update.md
diff --git a/docs/Developer Guide/Developer Guide/Architecture/Options.md b/docs/Developer Guide/Developer Guide/Architecture/Options.md
new file mode 100644
index 000000000..ce0d348f5
--- /dev/null
+++ b/docs/Developer Guide/Developer Guide/Architecture/Options.md
@@ -0,0 +1,43 @@
+# Options
+## Read an option
+
+Add the import to the service (make sure the relative path is correct):
+
+```javascript
+import options from "../../services/options.js";
+```
+
+Them simply read the option:
+
+```javascript
+this.firstDayOfWeek = options.getInt("firstDayOfWeek");
+```
+
+## Adding new options
+
+### Checkbox option
+
+Refer to this example in `backup.tsx`:
+
+```javascript
+export function AutomaticBackup() {
+ const [ dailyBackupEnabled, setDailyBackupEnabled ] = useTriliumOptionBool("dailyBackupEnabled");
+
+ return (
+
+
+
+
+
+ {t("backup.backup_recommendation")}
+
+ )
+}
+```
+
+> [!TIP]
+> To trigger a UI refresh (e.g. `utils#reloadFrontendApp`), simply pass a `true` as the second argument to `useTriliumOption` methods.
\ No newline at end of file
diff --git a/docs/Developer Guide/Developer Guide/Development and architecture/Options/Creating a new option.md b/docs/Developer Guide/Developer Guide/Architecture/Options/Creating a new option.md
similarity index 100%
rename from docs/Developer Guide/Developer Guide/Development and architecture/Options/Creating a new option.md
rename to docs/Developer Guide/Developer Guide/Architecture/Options/Creating a new option.md
diff --git a/docs/Developer Guide/Developer Guide/Architecture/Printing and exporting to PDF.md b/docs/Developer Guide/Developer Guide/Architecture/Printing and exporting to PDF.md
new file mode 100644
index 000000000..ad057206b
--- /dev/null
+++ b/docs/Developer Guide/Developer Guide/Architecture/Printing and exporting to PDF.md
@@ -0,0 +1,18 @@
+# Printing and exporting to PDF
+Note printing is handled by `note_detail.js`, in the `printActiveNoteEvent` method. Exporting to PDF works similarly.
+
+## How it works
+
+Both printing and exporting as PDF use the same mechanism: a note is rendered individually in a separate webpage that is then sent to the browser or the Electron application either for printing or exporting as PDF.
+
+The webpage that renders a single note can actually be accessed in a web browser. For example `http://localhost:8080/#root/WWRGzqHUfRln/RRZsE9Al8AIZ?ntxId=0o4fzk` becomes `http://localhost:8080/?print#root/WWRGzqHUfRln/RRZsE9Al8AIZ`.
+
+Accessing the print note in a web browser allows for easy debugging to understand why a particular note doesn't render well. The mechanism for rendering is similar to the one used in Note List.
+
+## Syntax highlighting
+
+Syntax highlighting for code blocks is supported as well:
+
+* It works by injecting a Highlight.js stylesheet into the print.
+* The theme used is hard-coded (the _Visual Studio Light theme_, at the time of writing) in order not to have a dark background in print.
+* Syntax highlighting is handled by the content renderer.
\ No newline at end of file
diff --git a/docs/Developer Guide/Developer Guide/Architecture/Protected entities.md b/docs/Developer Guide/Developer Guide/Architecture/Protected entities.md
new file mode 100644
index 000000000..f7d4e5b2e
--- /dev/null
+++ b/docs/Developer Guide/Developer Guide/Architecture/Protected entities.md
@@ -0,0 +1,6 @@
+# Protected entities
+The following entities can be made protected, via their `isProtected` flag:
+
+* attachments
+* notes
+* revisions
\ No newline at end of file
diff --git a/docs/Developer Guide/Developer Guide/Development and architecture/Share.md b/docs/Developer Guide/Developer Guide/Architecture/Share.md
similarity index 100%
rename from docs/Developer Guide/Developer Guide/Development and architecture/Share.md
rename to docs/Developer Guide/Developer Guide/Architecture/Share.md
diff --git a/docs/Developer Guide/Developer Guide/Development and architecture/Synchronisation/Content hashing.md b/docs/Developer Guide/Developer Guide/Architecture/Synchronisation/Content hashing.md
similarity index 100%
rename from docs/Developer Guide/Developer Guide/Development and architecture/Synchronisation/Content hashing.md
rename to docs/Developer Guide/Developer Guide/Architecture/Synchronisation/Content hashing.md
diff --git a/docs/Developer Guide/Developer Guide/Development and architecture/Syntax highlighting.md b/docs/Developer Guide/Developer Guide/Architecture/Syntax highlighting.md
similarity index 100%
rename from docs/Developer Guide/Developer Guide/Development and architecture/Syntax highlighting.md
rename to docs/Developer Guide/Developer Guide/Architecture/Syntax highlighting.md
diff --git a/docs/Developer Guide/Developer Guide/Development and architecture/Themes.md b/docs/Developer Guide/Developer Guide/Architecture/Themes.md
similarity index 100%
rename from docs/Developer Guide/Developer Guide/Development and architecture/Themes.md
rename to docs/Developer Guide/Developer Guide/Architecture/Themes.md
diff --git a/docs/Developer Guide/Developer Guide/Building/Build deliveries locally.md b/docs/Developer Guide/Developer Guide/Building/Build deliveries locally.md
new file mode 100644
index 000000000..3c78ae4aa
--- /dev/null
+++ b/docs/Developer Guide/Developer Guide/Building/Build deliveries locally.md
@@ -0,0 +1,34 @@
+# Build deliveries locally
+## Building the desktop
+
+Go to `apps/desktop`, and:
+
+* To generate the packages, run `pnpm electron-forge:make`.
+* To only build the Flatpak, run `pnpm electron-forge:make-flatpak`.
+* To only build without packaging it, run `pnpm electron-forge:package`.
+
+## Building the server
+
+Go to `apps/server` and run `pnpm package` to run the build script. The built artifacts will appear in `apps/server/dist`, whereas the packaged build will be available in `apps/server/out`.
+
+## On NixOS
+
+Under NixOS the following `nix-shell` is needed:
+
+```
+nix-shell -p jq
+```
+
+For Linux builds:
+
+```
+nix-shell -p jq fakeroot dpkg
+```
+
+To test the Linux builds, use `steam-run`:
+
+```javascript
+$ NIXPKGS_ALLOW_UNFREE=1 nix-shell -p steam-run
+[nix-shell] cd dist/trilium-linux-x64
+[nix-shell] steam-run ./trilium
+```
\ No newline at end of file
diff --git a/docs/Developer Guide/Developer Guide/Building/Build information.md b/docs/Developer Guide/Developer Guide/Building/Build information.md
new file mode 100644
index 000000000..b1fd0437b
--- /dev/null
+++ b/docs/Developer Guide/Developer Guide/Building/Build information.md
@@ -0,0 +1,4 @@
+# Build information
+* Provides context about when the build was made and the corresponding Git revision.
+* The information is displayed to the client when going in the about dialog.
+* The build information is hard-coded in `apps/server/src/services/build.ts`. This file is generated automatically via `chore:update-build-info` which itself is run automatically whenever making a build in the CI.
\ No newline at end of file
diff --git a/docs/Developer Guide/Developer Guide/Building/Docker.md b/docs/Developer Guide/Developer Guide/Building/Docker.md
new file mode 100644
index 000000000..ea5782ad2
--- /dev/null
+++ b/docs/Developer Guide/Developer Guide/Building/Docker.md
@@ -0,0 +1,8 @@
+# Docker
+To build the server for Docker:
+
+* Go to `apps/server` and run:
+ * `pnpm docker-build-debian` or
+ * `pnpm docker-build-alpine`.
+* Similarly, to build the rootless versions: `pnpm docker-build-rootless-debian` or `pnpm docker-build-rootless-alpine`.
+* To not only build but also run the Docker container, simply replace `docker-build` with `docker-start` (e.g. `pnpm docker-start-debian`).
\ No newline at end of file
diff --git a/docs/Developer Guide/Developer Guide/Building/Live reload (HMR).md b/docs/Developer Guide/Developer Guide/Building/Live reload (HMR).md
new file mode 100644
index 000000000..8ae38f99a
--- /dev/null
+++ b/docs/Developer Guide/Developer Guide/Building/Live reload (HMR).md
@@ -0,0 +1,10 @@
+# Live reload (HMR)
+Trilium uses Vite's HMR (hot module reloading) mechanism.
+
+## Server live reload
+
+If running the server using `pnpm server:start`, the server will watch for changes. For React components, they will be hot-reloaded without requiring a refresh. For other services, it will reload the page.
+
+## Desktop live reload
+
+`pnpm desktop:start` acts the same as `pnpm server:start` with hot-reloading for client-side changes. Changes on the desktop side require a complete re-run of the `pnpm desktop:start` command.
\ No newline at end of file
diff --git a/docs/Developer Guide/Developer Guide/Building/Releasing a new version.md b/docs/Developer Guide/Developer Guide/Building/Releasing a new version.md
new file mode 100644
index 000000000..19e3427ec
--- /dev/null
+++ b/docs/Developer Guide/Developer Guide/Building/Releasing a new version.md
@@ -0,0 +1,19 @@
+# Releasing a new version
+Releasing is mostly handled by the CI:
+
+* The version on GitHub is published automatically, including the description with the change log which is taken from the documentation.
+* A PR is created automatically on the Winget repository to update to the new version.
+
+Releases are usually made directly from the `main` branch.
+
+The process is as follows:
+
+1. Edit the Documentation to add a corresponding entry in the _Release notes_ section.
+2. In the root `package.json`, set `version` to the new version to be released.
+3. Run `chore:update-version` to automatically update the version of the rest of the `package.json` files.
+4. Run `pnpm i` to update the package lock as well.
+5. Commit the changes to the `package.json` files and the `package-lock.json`. The commit message is usually `chore(release): prepare for v1.2.3`.
+6. Tag the newly created commit: `git tag v1.2.3`
+7. Push the commit and the newly created tag: `git push; git push --tags`.
+8. Wait for the CI to finish.
+9. When the release is automatically created in GitHub, download it to make sure it works OK.
\ No newline at end of file
diff --git a/docs/Developer Guide/Developer Guide/Building/Running a development build.md b/docs/Developer Guide/Developer Guide/Building/Running a development build.md
new file mode 100644
index 000000000..c69e19d50
--- /dev/null
+++ b/docs/Developer Guide/Developer Guide/Building/Running a development build.md
@@ -0,0 +1,33 @@
+# Running a development build
+First, follow the Environment Setup.
+
+## Client
+
+The client is not meant to be run by itself, despite being described as an app. See the documentation on the server instead.
+
+## Server
+
+* To run the server in development mode, run `server:start`. The dev port is `8080`.
+* To run the server in production mode (with its own copy of the assets), run `server:start-prod`.
+* To build for Docker, see Docker.
+
+To run with a custom port, change the `TRILIUM_PORT` environment variable from the `package.json`.
+
+## Desktop
+
+* To run in development mode, use `pnpm desktop:start`.
+* To run in production mode, use `pnpm desktop:start-prod`.
+
+## Safe mode
+
+Safe mode is off by default, to enable it temporarily on a Unix shell, prepend the environment variable setting:
+
+```
+pnpm cross-env TRILIUM_SAFE_MODE=1 pnpm server:start
+```
+
+## Running on NixOS
+
+When doing development, the Electron binary retrieved from NPM is not going to be compatible with NixOS, resulting in errors when trying to run it. However Trilium handles it automatically when running `pnpm desktop:start`.
+
+If there's no `electron` the system path it will attempt to use `nix-shell` to obtain it.
\ No newline at end of file
diff --git a/docs/Developer Guide/Developer Guide/Project Structure/CKEditor.md b/docs/Developer Guide/Developer Guide/Dependencies/CKEditor.md
similarity index 100%
rename from docs/Developer Guide/Developer Guide/Project Structure/CKEditor.md
rename to docs/Developer Guide/Developer Guide/Dependencies/CKEditor.md
diff --git a/docs/Developer Guide/Developer Guide/Old documentation/Sub-projects/CKEditor/Differences from upstream.md b/docs/Developer Guide/Developer Guide/Dependencies/CKEditor/Differences from upstream.md
similarity index 81%
rename from docs/Developer Guide/Developer Guide/Old documentation/Sub-projects/CKEditor/Differences from upstream.md
rename to docs/Developer Guide/Developer Guide/Dependencies/CKEditor/Differences from upstream.md
index a5230d8f7..d8e2db46b 100644
--- a/docs/Developer Guide/Developer Guide/Old documentation/Sub-projects/CKEditor/Differences from upstream.md
+++ b/docs/Developer Guide/Developer Guide/Dependencies/CKEditor/Differences from upstream.md
@@ -1,5 +1,5 @@
# Differences from upstream
-* Embeds [`~~isaul32/ckeditor5-math~~`](https://github.com/isaul32/ckeditor5-math) ckeditor5-math, which is a third-party plugin for adding math support. CKEditor itself also has a [math plugin](https://ckeditor.com/docs/ckeditor5/latest/features/math-equations.html) with MathType and ChemType but it's premium-only.
+* Embeds [`~~isaul32/ckeditor5-math~~`](https://github.com/isaul32/ckeditor5-math) ckeditor5-math, which is a third-party plugin for adding math support. CKEditor itself also has a [math plugin](https://ckeditor.com/docs/ckeditor5/latest/features/math-equations.html) with MathType and ChemType but it's premium-only.
* Zadam left a TODO in `findandreplaceUI`: `// FIXME: keyboard shortcut doesn't work:` [`https://github.com/ckeditor/ckeditor5/issues/10645`](https://github.com/ckeditor/ckeditor5/issues/10645)
* `packages\ckeditor5-build-balloon-block\src\mention_customization.js` introduces note insertion via `@` character.
diff --git a/docs/Developer Guide/Developer Guide/Project Structure/CKEditor/Plugin migration guide.md b/docs/Developer Guide/Developer Guide/Dependencies/CKEditor/Plugin migration guide.md
similarity index 98%
rename from docs/Developer Guide/Developer Guide/Project Structure/CKEditor/Plugin migration guide.md
rename to docs/Developer Guide/Developer Guide/Dependencies/CKEditor/Plugin migration guide.md
index 8b87f2721..47a4b5e83 100644
--- a/docs/Developer Guide/Developer Guide/Project Structure/CKEditor/Plugin migration guide.md
+++ b/docs/Developer Guide/Developer Guide/Dependencies/CKEditor/Plugin migration guide.md
@@ -34,7 +34,7 @@ In the newly copied package, go to `package.json` and edit:
2. In `peerDependencies`, change `ckeditor5` to the same version as from the previous step.
3. Similarly, update `vitest` dependencies to match the monorepo one.
4. Remove the `prepare` entry from the `scripts` section.
-5. Change `build:dist` to simply `build` in order to integrate it with NX.
+5. Change `build:dist` to simply `build`.
6. In `tsconfig.dist.json`, change `typings/types` to `../typings/types.d.ts` to be compatible with the latest TypeScript version.
## Step 4. Install missing dependencies and build errors
diff --git a/docs/Developer Guide/Developer Guide/Dependencies/CKEditor/ckeditor5-math.md b/docs/Developer Guide/Developer Guide/Dependencies/CKEditor/ckeditor5-math.md
new file mode 100644
index 000000000..e47a59f12
--- /dev/null
+++ b/docs/Developer Guide/Developer Guide/Dependencies/CKEditor/ckeditor5-math.md
@@ -0,0 +1,16 @@
+# ckeditor5-math
+ckeditor5-math in action.
+
+A fork of [isaul32/ckeditor5-math](https://github.com/isaul32/ckeditor5-math), which is the CKEditor5 plugin which adds the math functionality. We keep our own version to be able to use it on the latest version of CKEditor, alongside some custom improvements.
+
+## Development environment
+
+* Tested on Node.js 20.
+* The package manager is yarn 1 (v1.22.22 is known to be working fine for it at the time of writing).
+
+Important commands:
+
+* To check if the code has any formatting issues: `yarn lint`
+* To start a live preview: `yarn start`
+* To run the tests: `yarn test`
+ * Note that this requires Chromium, on NixOS this can be achieved by running a `nix-shell -p chromium`, and running `CHROME_BIN=$(which chromium) yarn test` inside it.
\ No newline at end of file
diff --git a/docs/Developer Guide/Developer Guide/Old documentation/Sub-projects/ckeditor5-math_image.png b/docs/Developer Guide/Developer Guide/Dependencies/CKEditor/ckeditor5-math_image.png
similarity index 100%
rename from docs/Developer Guide/Developer Guide/Old documentation/Sub-projects/ckeditor5-math_image.png
rename to docs/Developer Guide/Developer Guide/Dependencies/CKEditor/ckeditor5-math_image.png
diff --git a/docs/Developer Guide/Developer Guide/Old documentation/Project maintenance/Updating dependencies.md b/docs/Developer Guide/Developer Guide/Dependencies/Per-dependency checks.md
similarity index 96%
rename from docs/Developer Guide/Developer Guide/Old documentation/Project maintenance/Updating dependencies.md
rename to docs/Developer Guide/Developer Guide/Dependencies/Per-dependency checks.md
index fb27cb6bf..309042ffc 100644
--- a/docs/Developer Guide/Developer Guide/Old documentation/Project maintenance/Updating dependencies.md
+++ b/docs/Developer Guide/Developer Guide/Dependencies/Per-dependency checks.md
@@ -1,2 +1,2 @@
-# Updating dependencies
-
Protected by typings, should catch any potential changes in API.
Yes
async-mutex
Sync
axios
Can't be directly tested, as it's exposed only via the backend script API.
sax
EverNote imports
ws
debounce
Check any action is reported from server to client (e.g. delete a note).
ejs
Onboarding / first setup
dayjs
Day notes
semver
Application should start.
https-proxy-agent
???
sax
EverNote import
ini
Affects config, generally if the application starts then it should be OK.
jsplumb
RELATION_MAP
Relation map note type
jquery.mark.es6
MARKJS
In search, when highlighting the text that matched.
In search in HTML, which might not actually be used since it seems to have been replaced by CKEditor's own find & replace dialog.
knockout.js
Used in rendering the login and main layout of the application.
normalize.min.css
Used in shared notes.
wheel-zoom.min.js
WHEEL_ZOOM
When opening a image that is in attachment.
When opening a stand-alone image note.
When zooming in a mermaid chart.
fancytree
The note tree should be fully functional.
bootstrap
Check mostly the on-boarding pages, when there is no database.
electron-debug
Run electron using npm run start-electron and check that the debug hotkeys are still working (Ctrl+Shift+I on Windows/Linux, Cmd+Alt+I for dev tools, Cmd/Ctrl+R for reload).
electron-dl
eslint
marked
Importing a markdown note.
Yes
force-graph
Note map
\ No newline at end of file
+# Per-dependency checks
+
Protected by typings, should catch any potential changes in API.
Yes
async-mutex
Sync
axios
Can't be directly tested, as it's exposed only via the backend script API.
sax
EverNote imports
ws
debounce
Check any action is reported from server to client (e.g. delete a note).
ejs
Onboarding / first setup
dayjs
Day notes
semver
Application should start.
https-proxy-agent
???
sax
EverNote import
ini
Affects config, generally if the application starts then it should be OK.
jsplumb
RELATION_MAP
Relation map note type
jquery.mark.es6
MARKJS
In search, when highlighting the text that matched.
In search in HTML, which might not actually be used since it seems to have been replaced by CKEditor's own find & replace dialog.
knockout.js
Used in rendering the login and main layout of the application.
normalize.min.css
Used in shared notes.
wheel-zoom.min.js
WHEEL_ZOOM
When opening a image that is in attachment.
When opening a stand-alone image note.
When zooming in a mermaid chart.
fancytree
The note tree should be fully functional.
bootstrap
Check mostly the on-boarding pages, when there is no database.
electron-debug
Run electron using npm run start-electron and check that the debug hotkeys are still working (Ctrl+Shift+I on Windows/Linux, Cmd+Alt+I for dev tools, Cmd/Ctrl+R for reload).
electron-dl
eslint
marked
Importing a markdown note.
Yes
force-graph
Note map
\ No newline at end of file
diff --git a/docs/Developer Guide/Developer Guide/Dependencies/Per-dependency checks/bettersqlite binaries.md b/docs/Developer Guide/Developer Guide/Dependencies/Per-dependency checks/bettersqlite binaries.md
new file mode 100644
index 000000000..5a473b5e5
--- /dev/null
+++ b/docs/Developer Guide/Developer Guide/Dependencies/Per-dependency checks/bettersqlite binaries.md
@@ -0,0 +1,25 @@
+# bettersqlite binaries
+### The native node bindings
+
+`better-sqlite3` has native Node bindings. With updates of `better-sqlite3`, but also of Electron and Node.js versions, these bindings need to be updated.
+
+Note that Electron and Node.js versions need different versions of these bindings, since Electron usually packs a different version of Node.js.
+
+During development, `pnpm install` tries to build or reuse prebuilt natives for the current Node.js version. This makes `npm run start-server` work out of the box. Trying to run `npm run start-electron` with these versions generally causes an error such as this:
+
+```
+Uncaught Exception:
+Error: The module '/Users/elian/Projects/Notes/node_modules/better-sqlite3/build/Release/better_sqlite3.node'
+was compiled against a different Node.js version using
+NODE_MODULE_VERSION 108. This version of Node.js requires
+NODE_MODULE_VERSION 116. Please try re-compiling or re-installing
+the module (for instance, using `npm rebuild` or `npm install`).
+```
+
+### How the natives are handled
+
+To avoid issues between the `server` and the `desktop`, the `desktop` build gets its own copy of the `bettersqlite3` dependency in its `node_module`. This copy is then rebuilt automatically to match the Electron version.
+
+This process of rebuilding is handled by `scripts/electron-rebuild.mts` which runs automatically after `pnpm install` (via `postinstall`).
+
+If needed, the script can be run manually again via `pnpm postinstall`.
\ No newline at end of file
diff --git a/docs/Developer Guide/Developer Guide/Development and architecture/Build information.md b/docs/Developer Guide/Developer Guide/Development and architecture/Build information.md
deleted file mode 100644
index 475d902f5..000000000
--- a/docs/Developer Guide/Developer Guide/Development and architecture/Build information.md
+++ /dev/null
@@ -1,4 +0,0 @@
-# Build information
-* Provides context about when the build was made and the corresponding Git revision.
-* The information is displayed to the client when going in the about dialog.
-* The build information is hard-coded in `src/services/build.ts`. This file is generated automatically via `npm run update-build-info` which itself is run automatically whenever making a build in the CI, or a [local delivery](../Old%20documentation/Build%20deliveries%20locally.md).
\ No newline at end of file
diff --git a/docs/Developer Guide/Developer Guide/Development and architecture/Database/attributes.md b/docs/Developer Guide/Developer Guide/Development and architecture/Database/attributes.md
deleted file mode 100644
index 4e7ca6a4c..000000000
--- a/docs/Developer Guide/Developer Guide/Development and architecture/Database/attributes.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# attributes
-
Column Name
Data Type
Nullity
Default value
Description
attributeId
Text
Non-null
Unique Id of the attribute (e.g. qhC1vzU4nwSE), can also have a special unique ID for Special notes (e.g. _lbToday_liconClass).
\ No newline at end of file
diff --git a/docs/Developer Guide/Developer Guide/Development and architecture/Database/blobs.md b/docs/Developer Guide/Developer Guide/Development and architecture/Database/blobs.md
deleted file mode 100644
index d0efc5434..000000000
--- a/docs/Developer Guide/Developer Guide/Development and architecture/Database/blobs.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# blobs
-
Column Name
Data Type
Nullity
Default value
Description
blobId
Text
Non-null
The unique ID of the blob (e.g. XXbfAJXqWrYnSXcelLFA).
Important: this ID is actually a hash of the content, see AbstractBeccaEntity#saveBlob! It is a logic error to modify an existing blob.
content
Text
Nullable
null
The content of the blob, can be either:
text (for plain text notes or HTML notes).
binary (for images and other types of attachments)
dateModified
Text
Non-null
Creation date with timezone offset (e.g. 2023-11-08 18:43:44.204+0200)
utcDateModified
Text
Non-null
Creation date in UTC format (e.g. 2023-11-08 16:43:44.204Z).
Blobs cannot be modified, so this timestamp specifies when the blob was created.
\ No newline at end of file
diff --git a/docs/Developer Guide/Developer Guide/Development and architecture/Demo document.md b/docs/Developer Guide/Developer Guide/Development and architecture/Demo document.md
deleted file mode 100644
index 5987385de..000000000
--- a/docs/Developer Guide/Developer Guide/Development and architecture/Demo document.md
+++ /dev/null
@@ -1,19 +0,0 @@
-# Demo document
-The demo document is an exported .zip that resides in `db/demo.zip`.
-
-During on-boarding, if the user selects that they are a new user then the `demo.zip` is imported into the root note.
-
-## Modifying the document
-
-On a dev server, remove all your existing notes in order to ensure a clean setup. Right click → Import to note and select the .zip file in `db/demo.zip`. Make sure to disable “Safe import”.
-
-After making the necessary modifications, simply export the “Trilium Demo” note as “HTML in ZIP archive” and replace `db/demo.zip` with the newly exported one.
-
-## Testing the changes
-
-```
-rm -r data
-npm run start-server
-```
-
-And then do the on-boarding again.
\ No newline at end of file
diff --git a/docs/Developer Guide/Developer Guide/Development and architecture/Docker.md b/docs/Developer Guide/Developer Guide/Development and architecture/Docker.md
deleted file mode 100644
index a39be7526..000000000
--- a/docs/Developer Guide/Developer Guide/Development and architecture/Docker.md
+++ /dev/null
@@ -1,18 +0,0 @@
-# Docker
-To run a Docker build:
-
-```
-./bin/builder-docker.sh
-```
-
-To run the built Docker image:
-
-```
-sudo docker run -p 8081:8080 triliumnext/trilium:v0.90.6-beta
-```
-
-To enter a shell in the Docker container:
-
-```
-sudo docker run -it --entrypoint=/bin/sh zadam/trilium:0.63-latest
-```
\ No newline at end of file
diff --git a/docs/Developer Guide/Developer Guide/Development and architecture/Icons/1_Icons on Mac_image.png b/docs/Developer Guide/Developer Guide/Development and architecture/Icons/1_Icons on Mac_image.png
deleted file mode 100644
index 4fa4deed1..000000000
Binary files a/docs/Developer Guide/Developer Guide/Development and architecture/Icons/1_Icons on Mac_image.png and /dev/null differ
diff --git a/docs/Developer Guide/Developer Guide/Development and architecture/Icons/Icons on Mac.md b/docs/Developer Guide/Developer Guide/Development and architecture/Icons/Icons on Mac.md
deleted file mode 100644
index 0921f7476..000000000
--- a/docs/Developer Guide/Developer Guide/Development and architecture/Icons/Icons on Mac.md
+++ /dev/null
@@ -1,8 +0,0 @@
-# Icons on Mac
-Looks great in Finder:
-
-
-
-Looks great in Dock:
-
-
\ No newline at end of file
diff --git a/docs/Developer Guide/Developer Guide/Development and architecture/Icons/Icons on Mac/1_Adaptive icon_image.png b/docs/Developer Guide/Developer Guide/Development and architecture/Icons/Icons on Mac/1_Adaptive icon_image.png
deleted file mode 100644
index 4fa4deed1..000000000
Binary files a/docs/Developer Guide/Developer Guide/Development and architecture/Icons/Icons on Mac/1_Adaptive icon_image.png and /dev/null differ
diff --git a/docs/Developer Guide/Developer Guide/Development and architecture/Icons/Icons on Mac/1_Slightly blurry icon on Ma.png b/docs/Developer Guide/Developer Guide/Development and architecture/Icons/Icons on Mac/1_Slightly blurry icon on Ma.png
deleted file mode 100644
index 1a0232adf..000000000
Binary files a/docs/Developer Guide/Developer Guide/Development and architecture/Icons/Icons on Mac/1_Slightly blurry icon on Ma.png and /dev/null differ
diff --git a/docs/Developer Guide/Developer Guide/Development and architecture/Icons/Icons on Mac/2_Adaptive icon_image.png b/docs/Developer Guide/Developer Guide/Development and architecture/Icons/Icons on Mac/2_Adaptive icon_image.png
deleted file mode 100644
index e42926852..000000000
Binary files a/docs/Developer Guide/Developer Guide/Development and architecture/Icons/Icons on Mac/2_Adaptive icon_image.png and /dev/null differ
diff --git a/docs/Developer Guide/Developer Guide/Development and architecture/Icons/Icons on Mac/2_Slightly blurry icon on Ma.png b/docs/Developer Guide/Developer Guide/Development and architecture/Icons/Icons on Mac/2_Slightly blurry icon on Ma.png
deleted file mode 100644
index c30743ece..000000000
Binary files a/docs/Developer Guide/Developer Guide/Development and architecture/Icons/Icons on Mac/2_Slightly blurry icon on Ma.png and /dev/null differ
diff --git a/docs/Developer Guide/Developer Guide/Development and architecture/Icons/Icons on Mac/3_Adaptive icon_image.png b/docs/Developer Guide/Developer Guide/Development and architecture/Icons/Icons on Mac/3_Adaptive icon_image.png
deleted file mode 100644
index 99b0ce3d4..000000000
Binary files a/docs/Developer Guide/Developer Guide/Development and architecture/Icons/Icons on Mac/3_Adaptive icon_image.png and /dev/null differ
diff --git a/docs/Developer Guide/Developer Guide/Development and architecture/Icons/Icons on Mac/4_Adaptive icon_image.png b/docs/Developer Guide/Developer Guide/Development and architecture/Icons/Icons on Mac/4_Adaptive icon_image.png
deleted file mode 100644
index afcfacc11..000000000
Binary files a/docs/Developer Guide/Developer Guide/Development and architecture/Icons/Icons on Mac/4_Adaptive icon_image.png and /dev/null differ
diff --git a/docs/Developer Guide/Developer Guide/Development and architecture/Icons/Icons on Mac/5_Adaptive icon_image.png b/docs/Developer Guide/Developer Guide/Development and architecture/Icons/Icons on Mac/5_Adaptive icon_image.png
deleted file mode 100644
index e99523df8..000000000
Binary files a/docs/Developer Guide/Developer Guide/Development and architecture/Icons/Icons on Mac/5_Adaptive icon_image.png and /dev/null differ
diff --git a/docs/Developer Guide/Developer Guide/Development and architecture/Icons/Icons on Mac/6_Adaptive icon_image.png b/docs/Developer Guide/Developer Guide/Development and architecture/Icons/Icons on Mac/6_Adaptive icon_image.png
deleted file mode 100644
index eacecb265..000000000
Binary files a/docs/Developer Guide/Developer Guide/Development and architecture/Icons/Icons on Mac/6_Adaptive icon_image.png and /dev/null differ
diff --git a/docs/Developer Guide/Developer Guide/Development and architecture/Icons/Icons on Mac/Adaptive icon.md b/docs/Developer Guide/Developer Guide/Development and architecture/Icons/Icons on Mac/Adaptive icon.md
deleted file mode 100644
index f3947eb0e..000000000
--- a/docs/Developer Guide/Developer Guide/Development and architecture/Icons/Icons on Mac/Adaptive icon.md
+++ /dev/null
@@ -1,15 +0,0 @@
-# Adaptive icon
-| | |
-| --- | --- |
-| Before | |
-| After | |
-| With new scale | |
-
-## Scale
-
-| | |
-| --- | --- |
-| 0.9 | |
-| 0.85 | |
-| 0.8 | |
-| 0.75 | |
\ No newline at end of file
diff --git a/docs/Developer Guide/Developer Guide/Development and architecture/Icons/Icons on Mac/Adaptive icon_image.png b/docs/Developer Guide/Developer Guide/Development and architecture/Icons/Icons on Mac/Adaptive icon_image.png
deleted file mode 100644
index eeec79a01..000000000
Binary files a/docs/Developer Guide/Developer Guide/Development and architecture/Icons/Icons on Mac/Adaptive icon_image.png and /dev/null differ
diff --git a/docs/Developer Guide/Developer Guide/Development and architecture/Icons/Icons on Mac/Slightly blurry icon on Ma.png b/docs/Developer Guide/Developer Guide/Development and architecture/Icons/Icons on Mac/Slightly blurry icon on Ma.png
deleted file mode 100644
index c32a45801..000000000
Binary files a/docs/Developer Guide/Developer Guide/Development and architecture/Icons/Icons on Mac/Slightly blurry icon on Ma.png and /dev/null differ
diff --git a/docs/Developer Guide/Developer Guide/Development and architecture/Icons/Icons on Mac/Slightly blurry icon on Mac.md b/docs/Developer Guide/Developer Guide/Development and architecture/Icons/Icons on Mac/Slightly blurry icon on Mac.md
deleted file mode 100644
index a59a8abfe..000000000
--- a/docs/Developer Guide/Developer Guide/Development and architecture/Icons/Icons on Mac/Slightly blurry icon on Mac.md
+++ /dev/null
@@ -1,50 +0,0 @@
-# Slightly blurry icon on Mac
-Slightly blurry in extended preview on Mac
-
-
-
-In the screenshot, the icon is around 650px whereas the closest image we have is 512px, so that might explain the blur. Adding an `ic10` (`1024x1024`, aka `512x512@2x` to see what happens).
-
-Before:
-
-```
-File: ../images/app-icons/mac/icon.icns
- ic09: 62069 bytes, png: 512x512
-```
-
-After:
-
-```
-File: ../images/app-icons/mac/icon.icns
- icp4: 1140 bytes, png: 16x16
- icp5: 1868 bytes, png: 32x32
- ic07: 9520 bytes, png: 128x128
- ic09: 62069 bytes, png: 512x512
- ic10: 180442 bytes, png: 512x512@2x
-```
-
-Even with a 1024x1024 icon, the image is still blurry.
-
-Comparing the `.icns` file from the Electron build reveals that the `.icns` file has been tampered with:
-
-
-
-The bluriness might come from the image itself: [https://stackoverflow.com/questions/54030521/convert-svg-to-png-with-sharp-edges](https://stackoverflow.com/questions/54030521/convert-svg-to-png-with-sharp-edges)
-
-Rendering with Inkscape (left) vs ImageMagick (right):
-
-
-
-Now in macOS it's also rendering quite nicely:
-
-
\ No newline at end of file
diff --git a/docs/Developer Guide/Developer Guide/Development and architecture/Icons/Icons on Mac_image.png b/docs/Developer Guide/Developer Guide/Development and architecture/Icons/Icons on Mac_image.png
deleted file mode 100644
index f587c31cf..000000000
Binary files a/docs/Developer Guide/Developer Guide/Development and architecture/Icons/Icons on Mac_image.png and /dev/null differ
diff --git a/docs/Developer Guide/Developer Guide/Development and architecture/Icons/Removed icons.md b/docs/Developer Guide/Developer Guide/Development and architecture/Icons/Removed icons.md
deleted file mode 100644
index 97b126515..000000000
--- a/docs/Developer Guide/Developer Guide/Development and architecture/Icons/Removed icons.md
+++ /dev/null
@@ -1,27 +0,0 @@
-# Removed icons
-The following icons were removed:
-
-## Main images
-
-These are stored in `images`:
-
-| Name | Resolution | Description |
-| --- | --- | --- |
-| `icon-black.png` | 36x36 | Does not appear to be used. |
-| `icon-color.png` | 36x36 | Used only by some tests in `test-etapi`. |
-| `icon-grey.png` | 36x36 | Does not appear to be used. |
-| `icon.svg` | 210x297 | Does not appear to be used. |
-
-## App icons
-
-| Name | Resolution | Description |
-| --- | --- | --- |
-| `png/16x16-bw.png` | 16x16 | Do not appear to be used. |
-| `png/16x16.png` | | |
-| `png/24x24.png` | 24x24 | |
-| `png/32x32.png` | 32x32 | |
-| `png/48x48.png` | 48x48 | |
-| `png/64x64.png` | 64x64 | |
-| `png/96x96.png` | 96x96 | |
-| `png/512x512.png` | 512x512 | Does not appear to be used. |
-| `win/setup-banner.xcf` | | GIMP source for `win/setup-banner.gif`. Provided only for future editing. |
\ No newline at end of file
diff --git a/docs/Developer Guide/Developer Guide/Development and architecture/Live reload.md b/docs/Developer Guide/Developer Guide/Development and architecture/Live reload.md
deleted file mode 100644
index 0efebd014..000000000
--- a/docs/Developer Guide/Developer Guide/Development and architecture/Live reload.md
+++ /dev/null
@@ -1,20 +0,0 @@
-# Live reload
-## Server live reload
-
-If running the server using `npm run start-server`, the server will watch for changes in `src/public` and trigger a frontend reload if that occurs.
-
-## Electron live reload
-
-Similarly, `npm run start-electron` supports live refresh as well.
-
-However, a core difference is that Electron watches `dist/src/public` instead of `src/public` since Electron runs on its own copy of the files.
-
-To ameliorate that, a separate watch script has been implemented which automatically copies files from `src/public` to `dist/src/public` whenever a change is detected. To run it:
-
-```
-npm run
-```
-
-## Technical details
-
-* This mechanism is managed at server level by watching for changes in`services/ws.ts`.
\ No newline at end of file
diff --git a/docs/Developer Guide/Developer Guide/Development and architecture/Note types.md b/docs/Developer Guide/Developer Guide/Development and architecture/Note types.md
deleted file mode 100644
index e8b9c6a3c..000000000
--- a/docs/Developer Guide/Developer Guide/Development and architecture/Note types.md
+++ /dev/null
@@ -1,30 +0,0 @@
-# Note types
-The note type is defined by the `type` column in notes.
-
-Possible types:
-
-
both options are shown to the user via the “Book Properties” ribbon widget.
Web View
webView
blank
An empty blob.
#webViewSrc pointing to an URL to render.
Code
code
Depends on the language (e.g. text/plain, text/x-markdown, text/x-c++src).
The plain text content.
\ No newline at end of file
diff --git a/docs/Developer Guide/Developer Guide/Development and architecture/Options.md b/docs/Developer Guide/Developer Guide/Development and architecture/Options.md
deleted file mode 100644
index a56f2bbed..000000000
--- a/docs/Developer Guide/Developer Guide/Development and architecture/Options.md
+++ /dev/null
@@ -1,14 +0,0 @@
-# Options
-## Read an option
-
-Add the import to the service (make sure the relative path is correct):
-
-```javascript
-import options from "../../services/options.js";
-```
-
-Them simply read the option:
-
-```javascript
-this.firstDayOfWeek = options.getInt("firstDayOfWeek");
-```
\ No newline at end of file
diff --git a/docs/Developer Guide/Developer Guide/Development and architecture/Options/Check box option.md b/docs/Developer Guide/Developer Guide/Development and architecture/Options/Check box option.md
deleted file mode 100644
index fa2258336..000000000
--- a/docs/Developer Guide/Developer Guide/Development and architecture/Options/Check box option.md
+++ /dev/null
@@ -1,37 +0,0 @@
-# Check box option
-In the TPL:
-
-```
-
-
Background effects
-
-
On the desktop application, it's possible to use a semi-transparent background tinted in the colors of the user's wallpaper to add a touch of color.
-
-
-
-
-
-```
-
-In `doRender()`:
-
-```
-doRender() {
- this.$backgroundEffects = this.$widget.find("input.background-effects");
-
- this.$backgroundEffects.on("change", () => this.updateCheckboxOption("backgroundEffects", this.$backgroundEffects));
-}
-```
-
-In `optionsLoaded(options)`:
-
-```
-async optionsLoaded(options) {
-
- this.setCheckboxState(this.$backgroundEffects, options.backgroundEffects);
-
-}
-```
\ No newline at end of file
diff --git a/docs/Developer Guide/Developer Guide/Development and architecture/Options/Displaying the option in setti.md b/docs/Developer Guide/Developer Guide/Development and architecture/Options/Displaying the option in setti.md
deleted file mode 100644
index b135025e0..000000000
--- a/docs/Developer Guide/Developer Guide/Development and architecture/Options/Displaying the option in setti.md
+++ /dev/null
@@ -1,36 +0,0 @@
-# Displaying the option in settings
-Go to `src/public/app/widgets/type_widgets/options` and select a corresponding category, such as `appearance` and edit one of the JS files.
-
-For example, to create a select:
-
-First, modify the template (`TPL`), to add the new widget:
-
-```
-
-
-
-
-```
-
-Secondly, create a reference to the new element in `doRender()`:
-
-```
-this.$firstDayOfWeek = this.$widget.find(".first-day-of-week-select");
-```
-
-Then in `optionsLoaded` adjust the value to the one set in the database:
-
-```
-this.$firstDayOfWeek.val(options.firstDayOfWeek);
-```
-
-To actually update the option, add a listener in `doRender`:
-
-```
-this.$firstDayOfWeek.on("change", () => {
- this.updateOption("firstDayOfWeek", this.$firstDayOfWeek.val());
-});
-```
\ No newline at end of file
diff --git a/docs/Developer Guide/Developer Guide/Development and architecture/Options/Refresh widget with option cha.md b/docs/Developer Guide/Developer Guide/Development and architecture/Options/Refresh widget with option cha.md
deleted file mode 100644
index a79f1ac1d..000000000
--- a/docs/Developer Guide/Developer Guide/Development and architecture/Options/Refresh widget with option cha.md
+++ /dev/null
@@ -1,10 +0,0 @@
-# Refresh widget with option change
-To make a widget react to a change of a given option, simply add the following to the widget:
-
-```javascript
-async entitiesReloadedEvent({loadResults}) {
- if (loadResults.getOptionNames().includes("firstDayOfWeek")) {
- // Do something.
- }
-}
-```
\ No newline at end of file
diff --git a/docs/Developer Guide/Developer Guide/Development and architecture/Options/Trigger UI refresh.md b/docs/Developer Guide/Developer Guide/Development and architecture/Options/Trigger UI refresh.md
deleted file mode 100644
index d8cf12f2a..000000000
--- a/docs/Developer Guide/Developer Guide/Development and architecture/Options/Trigger UI refresh.md
+++ /dev/null
@@ -1,12 +0,0 @@
-# Trigger UI refresh
-Call `utils.reloadFrontendApp`, but make sure to wait for the option to be saved first.
-
-```
-this.$backgroundEffects.on("change", async () => {
-
- await this.updateCheckboxOption("backgroundEffects", this.$backgroundEffects);
-
- utils.reloadFrontendApp("background effect change");
-
-});
-```
\ No newline at end of file
diff --git a/docs/Developer Guide/Developer Guide/Development and architecture/Printing.md b/docs/Developer Guide/Developer Guide/Development and architecture/Printing.md
deleted file mode 100644
index 9614ee786..000000000
--- a/docs/Developer Guide/Developer Guide/Development and architecture/Printing.md
+++ /dev/null
@@ -1,15 +0,0 @@
-# Printing
-Note printing is handled by `note_detail.js`, in the `printActiveNoteEvent` method.
-
-The application uses the [`print-this`](https://www.npmjs.com/package/print-this) library to isolate `.note-detail-printable:visible` and prepare it for printing.
-
-Some scripts like KaTeX are manually injected in the footer, and the CSS to be used is manually defined. The most important one is `print.css`.
-
-## Syntax highlighting
-
-Syntax highlighting for code blocks is supported as well:
-
-* It works by injecting a Highlight.js stylesheet into the print.
-* The theme used is hard-coded (the _Visual Studio Light theme_, at the time of writing) in order not to have a dark background in print.
-* The Highlight.js library is not needed since the `.note-detail-printable` which is rendered already has the `.hljs` classes added to it in order to achieve the syntax highlighting.
-* The user's choice of whether to enable syntax highlighting is also respected.
\ No newline at end of file
diff --git a/docs/Developer Guide/Developer Guide/Development and architecture/Protected entities.md b/docs/Developer Guide/Developer Guide/Development and architecture/Protected entities.md
deleted file mode 100644
index 225c740e7..000000000
--- a/docs/Developer Guide/Developer Guide/Development and architecture/Protected entities.md
+++ /dev/null
@@ -1,6 +0,0 @@
-# Protected entities
-The following entities can be made protected, via their `isProtected` flag:
-
-* attachments
-* notes
-* revisions
\ No newline at end of file
diff --git a/docs/Developer Guide/Developer Guide/Old documentation/Documentation.md b/docs/Developer Guide/Developer Guide/Documentation.md
similarity index 66%
rename from docs/Developer Guide/Developer Guide/Old documentation/Documentation.md
rename to docs/Developer Guide/Developer Guide/Documentation.md
index 987582cac..4874aaa1d 100644
--- a/docs/Developer Guide/Developer Guide/Old documentation/Documentation.md
+++ b/docs/Developer Guide/Developer Guide/Documentation.md
@@ -1,29 +1,32 @@
# Documentation
-
-
-There are multiple types of documentation for Trilium:
+There are multiple types of documentation for Trilium:
* The _User Guide_ represents the user-facing documentation. This documentation can be browsed by users directly from within Trilium, by pressing F1.
* The _Developer's Guide_ represents a set of Markdown documents that present the internals of Trilium, for developers.
* _Release Notes_, this contains the change log for each released or soon-to-be-released version. The release notes are used automatically by the CI when releasing a version.
* The _Script API_, which is an automatically generated documentation for the front-end and back-end APIs for scripts.
-## Editing documentation
+## Location of the documentation
+
+All documentation is stored in the [Trilium](https://github.com/TriliumNext/Trilium) repository:
+
+* `docs/Developer Guide` contains Markdown documentation that can be modified either externally (using a Markdown editor, or internally using Trilium).
+* `docs/Release Notes` is also stored in Markdown format and can be freely edited.
+* `docs/Script API` contains auto-generated files and thus must not be modified.
+* `docs/User Guide` contains also Markdown-only documentation but must generally not be edited externally.
+ * The reason is that the `pnpm edit-docs:edit-docs` feature will not only import/export this documentation, but also generate the corresponding HTML documentation and meta structure in `src/public/app/doc_notes/en/User Guide`.
+ * It's theoretically possible to edit the Markdown files externally and then run `docs:edit` and trigger a change in order to build the documentation, but that would not be a very productive workflow.
+
+## Editing the documentation
There are two ways to modify documentation:
* Using a special mode of Trilium.
* By manually editing the files.
-### Using `docs:edit`
+### Using the `edit-docs` app
-To edit the documentation using Trilium, set up a working development environment and run the following commands:
-
-* On most operating systems, `npm run electron:switch` followed by `npm run docs:edit`
-* On NixOS, `npm run docs:edit-nix`.
-
-> [!NOTE]
-> `npm run docs:edit` acts very similar to `npm run electron:start` in the sense that you cannot both be editing documentation and starting a server. Using both `npm run electron:start` and `docs:edit` is possible, since they are using the same Electron instance.
+To edit the documentation using Trilium, set up a working development environment via Environment Setup and run the following command: `pnpm edit-docs:edit-docs`.
How it works:
@@ -50,24 +53,30 @@ Important aspects to consider:
* The Trilium import/export mechanism is not perfect, so if you make some modifications to the documentation using `docs:edit`, at the next import/export/import cycle some whitespace might get thrown in. It's generally safe to commit the changes as-is.
* Since we are importing Markdown, editing HTML and then exporting the HTML back to Markdown there might be some edge cases where the formatting is not properly preserved. Try to identify such cases and report them in order to get them fixed (this will benefit also the users).
-## Location of the documentation
+## Automation
-All documentation is stored in the [Notes](https://github.com/TriliumNext/Trilium) repository:
+The documentation is built via `apps/build-docs`:
-* `docs/Developer Guide` contains Markdown documentation that can be modified either externally (using a Markdown editor, or internally using Trilium).
-* `docs/Release Notes` is also stored in Markdown format and can be freely edited.
-* `docs/Script API` contains auto-generated files and thus must not be modified.
-* `docs/User Guide` contains also Markdown-only documentation but must generally not be edited externally.
- * The reason is that the `docs:edit` feature will not only import/export this documentation, but also generate the corresponding HTML documentation and meta structure in `src/public/app/doc_notes/en/User Guide`.
- * It's theoretically possible to edit the Markdown files externally and then run `docs:edit` and trigger a change in order to build the documentation, but that would not be a very productive workflow.
+1. The output directory is cleared.
+2. The User Guide and the Developer Guide are built.
+ 1. The documentation from the repo is archived and imported into an in-memory instance.
+ 2. The documentation is exported using the shared theme.
+3. The API docs (internal and ETAPI) are statically rendered via Redocly.
+4. The script API is generated via `typedoc`
+
+The `deploy-docs` workflow triggers the documentation build and uploads it to CloudFlare Pages.
## Updating the Script API
As mentioned previously, the Script API is not manually editable since it is auto-generated using TypeDoc.
-To update the API documentation, simply run `npm run docs:build`. Compare the changes (if any) and commit them.
+To update the API documentation, simply run `pnpm docs:build`. Compare the changes (if any) and commit them.
-Note that in order to simulate the environment a script would have, some fake source files (in the sense that they are only used for documentation) are being used as entrypoints for the documentation:
+Note that in order to simulate the environment a script would have, some fake source files (in the sense that they are only used for documentation) are being used as entrypoints for the documentation. Look for `backend_script_entrypoint` and `frontend_script_entrypoint` in `apps/build-docs/src`.
-* For back-end scripts, the script is located in `src/services/backend_script_entrypoint.ts`.
-* For front-end scripts, the script is located in `src/public/app/services/frontend_script_entrypoint.ts`.
\ No newline at end of file
+## Building locally
+
+In the Git root:
+
+* Run `pnpm docs:build`. The built documentation will be available in `site` at Git root.
+* To also run a webserver to test it, run `pnpm docs:preview` (this will not build the documentation) and navigate to `localhost:9000`.
\ No newline at end of file
diff --git a/docs/Developer Guide/Developer Guide/Old documentation/Documentation/Documentation references in th.md b/docs/Developer Guide/Developer Guide/Documentation/Documentation references in th.md
similarity index 69%
rename from docs/Developer Guide/Developer Guide/Old documentation/Documentation/Documentation references in th.md
rename to docs/Developer Guide/Developer Guide/Documentation/Documentation references in th.md
index 1c9a9fea9..79c1bd80e 100644
--- a/docs/Developer Guide/Developer Guide/Old documentation/Documentation/Documentation references in th.md
+++ b/docs/Developer Guide/Developer Guide/Documentation/Documentation references in th.md
@@ -13,6 +13,8 @@ https://triliumnext.github.io/Docs/Wiki/
There is a pattern of “?” buttons throughout the application which make use of the `data-help-page` attribute. Whenever these buttons are pressed, the user is redirected to the corresponding wiki page by prepending the wiki root URL to the `data-help-page` attribute.
+### Deprecated `help-page` attribute
+
Since the current wiki has a different structure than the original, for example to link to [https://github.com/TriliumNext/Docs/blob/main/Wiki/tree-concepts.md](https://github.com/TriliumNext/Docs/blob/main/Wiki/tree-concepts.md) the `data-help-page` attribute must be set to `tree-concepts.md`.
For links to headings, simply add the heading after the `.md`: `tree-concepts.md#prefix`
@@ -20,4 +22,12 @@ For links to headings, simply add the heading after the `.md`: `tree-concepts.md
You can identify those by looking for:
* `.attr("data-help-page"`
-* `data-help-page="`
\ No newline at end of file
+* `data-help-page="`
+
+### More modern `data-in-app-help` attribute
+
+Instead of opening in a web browser, this opens the help directly in the application in a split view. This is handled via the `data-in-app-help` attribute, where the value is the note ID of the help page without the `_help_` prefix.
+
+### React
+
+Use the `HelpButton` component in the same fashion as the `data-in-app-help` attribute.
\ No newline at end of file
diff --git a/docs/Developer Guide/Developer Guide/Environment Setup.md b/docs/Developer Guide/Developer Guide/Environment Setup.md
index f1d706429..95d14cd50 100644
--- a/docs/Developer Guide/Developer Guide/Environment Setup.md
+++ b/docs/Developer Guide/Developer Guide/Environment Setup.md
@@ -26,8 +26,11 @@ As a quick heads-up of some differences when compared to `npm`:
Run `pnpm i` at the top of the `Notes` repository to install the dependencies.
+> [!NOTE]
+> Dependencies are kept up to date periodically in the project. Generally it's a good rule to do `pnpm i` after each `git pull` on the main branch.
+
## IDE
-Our recommended IDE for working on TriliumNext is Visual Studio Code (or VSCodium if you are looking for a fully open-source alternative).
+Our recommended IDE for working on Trilium is Visual Studio Code (or VSCodium if you are looking for a fully open-source alternative).
-By default we include a number of suggested extensions which should appear when opening the repository in VS Code. Most of the extensions are for integrating various technologies we are using such as Playwright and Vitest for testing and NX for mono-repo management.
\ No newline at end of file
+By default we include a number of suggested extensions which should appear when opening the repository in VS Code. Most of the extensions are for integrating various technologies we are using such as Playwright and Vitest for testing or for Internationalisation / Translations.
\ No newline at end of file
diff --git a/docs/Developer Guide/Developer Guide/Old documentation/Build deliveries locally.md b/docs/Developer Guide/Developer Guide/Old documentation/Build deliveries locally.md
deleted file mode 100644
index 31a6ee0e2..000000000
--- a/docs/Developer Guide/Developer Guide/Old documentation/Build deliveries locally.md
+++ /dev/null
@@ -1,32 +0,0 @@
-# Build deliveries locally
-In the project root:
-
-| Platform | Architecture | Application | Build command |
-| --- | --- | --- | --- |
-| macOS | x86\_64 | Desktop / Electron app | `./bin/build-mac-x64.sh` |
-| ARM 64 | Desktop / Electron app | `./bin/build-mac-arm64.sh` | |
-| Linux | x86\_64 | Desktop / Electron app | `./bin/build-linux-x64.sh` |
-| Server | `./bin/build-server.sh` | | |
-| Windows | x86\_64 | Desktop / Electron app | `./bin/build-win-x64.sh` |
-
-Under NixOS the following `nix-shell` is needed:
-
-```
-nix-shell -p jq
-```
-
-For Linux builds:
-
-```
-nix-shell -p jq fakeroot dpkg
-```
-
-The resulting build will be in the `dist` directory under the project root.
-
-### Testing the Linux builds under NixOS
-
-
\ No newline at end of file
diff --git a/docs/Developer Guide/Developer Guide/Old documentation/Building and deployment/Build deliveries locally.clone.md b/docs/Developer Guide/Developer Guide/Old documentation/Building and deployment/Build deliveries locally.clone.md
deleted file mode 100644
index 3ee7c825b..000000000
--- a/docs/Developer Guide/Developer Guide/Old documentation/Building and deployment/Build deliveries locally.clone.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# Build deliveries locally
-This is a clone of a note. Go to its [primary location](../Build%20deliveries%20locally.md).
\ No newline at end of file
diff --git a/docs/Developer Guide/Developer Guide/Old documentation/Building and deployment/Documentation.md b/docs/Developer Guide/Developer Guide/Old documentation/Building and deployment/Documentation.md
deleted file mode 100644
index 672b64f7c..000000000
--- a/docs/Developer Guide/Developer Guide/Old documentation/Building and deployment/Documentation.md
+++ /dev/null
@@ -1,34 +0,0 @@
-# Documentation
-Development notes are published on [triliumnext.github.io/Notes](https://triliumnext.github.io/Notes) by the CI using GitHub Pages.
-
-The GitHub Pages deployment works by taking the files from the Notes repository, in the `docs` directory.
-
-## How it works
-
-There is a script that uses `wget` to download all the files from a share, that means:
-
-1. You must have a local instance of Trilium Notes server.
-2. You must have the documentation imported, up to date and shared.
-
-Note that currently the documentation source file is not distributed (the note export), until a way is found to automate this process. Contact `eliandoran` should you require to obtain a copy of the documentation.
-
-## Setting up `.env` file
-
-Go to `bin/docs` and copy `.env.example` to `.env` and edit it:
-
-1. Change the `SHARE_PROTOCOL` to either `http` or `https` depending on your setup.
-2. Change `SHARE_HOST` to match the domain name or the URL to the host (without the protocol or any slashes).
-
-Generally `ROOT_NOTE_ID` should not be changed since the note ID must match if the files were imported correctly.
-
-## Triggering a build
-
-Run:
-
-```
-./bin/docs/prepare.sh
-```
-
-This will attempt to download all the notes from the share URL and put them in `docs`, rewritten for GitHub Pages.
-
-Commit the results and follow the normal development process to push them.
\ No newline at end of file
diff --git a/docs/Developer Guide/Developer Guide/Old documentation/Building and deployment/Releasing a version.clone.md b/docs/Developer Guide/Developer Guide/Old documentation/Building and deployment/Releasing a version.clone.md
deleted file mode 100644
index 3e2019da0..000000000
--- a/docs/Developer Guide/Developer Guide/Old documentation/Building and deployment/Releasing a version.clone.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# Releasing a version
-This is a clone of a note. Go to its [primary location](../Releasing%20a%20version.md).
\ No newline at end of file
diff --git a/docs/Developer Guide/Developer Guide/Old documentation/Building and deployment/Running a development build.clone.md b/docs/Developer Guide/Developer Guide/Old documentation/Building and deployment/Running a development build.clone.md
deleted file mode 100644
index d56a46aea..000000000
--- a/docs/Developer Guide/Developer Guide/Old documentation/Building and deployment/Running a development build.clone.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# Running a development build
-This is a clone of a note. Go to its [primary location](../Running%20a%20development%20build.md).
\ No newline at end of file
diff --git a/docs/Developer Guide/Developer Guide/Old documentation/Dependency Management/Adding a new client library.md b/docs/Developer Guide/Developer Guide/Old documentation/Dependency Management/Adding a new client library.md
deleted file mode 100644
index 64ffcf528..000000000
--- a/docs/Developer Guide/Developer Guide/Old documentation/Dependency Management/Adding a new client library.md
+++ /dev/null
@@ -1,116 +0,0 @@
-# Adding a new client library
-In the past some libraries have been copy-pasted (and adapted if needed) to the repository. However, new libraries must be obtained exclusively through npm.
-
-The first step is to install the desired library. As an example we are going to install `i18next`:
-
-```
-npm i i18next
-```
-
-### Step 1. Understanding the structure of the import
-
-After installing the dependency, it's important to know how it's structured. You can do this by looking at the directory structure of the newly imported dependency:
-
-```
-$ tree node_modules/i18next
-node_modules/i18next
-├── dist
-│ ├── cjs
-│ │ └── i18next.js
-│ ├── esm
-│ │ ├── i18next.bundled.js
-│ │ ├── i18next.js
-│ │ └── package.json
-│ └── umd
-│ ├── i18next.js
-│ └── i18next.min.js
-├── i18next.js
-├── i18next.min.js
-├── index.d.mts
-├── index.d.ts
-├── index.js
-├── index.v4.d.ts
-├── LICENSE
-├── package.json
-├── README.md
-└── typescript
- ├── helpers.d.ts
- ├── options.d.ts
- ├── t.d.ts
- └── t.v4.d.ts
-```
-
-Generally you should be looking for a `.min.js` file. Note that the `esm` and `cjs` variants generally don't work, we are looking for the classic, no module dependency.
-
-### Step 2. Exposing the library from the server
-
-The library must be delivered by the server and this is done via `src/routes/assets.ts`. In the `register` function, add a new entry near the bottom of the function:
-
-```javascript
-app.use(`/${assetPath}/node_modules/i18next/`, persistentCacheStatic(path.join(srcRoot, "..", 'node_modules/i18next/')));
-```
-
-### Step 3. Adding it to the library loader
-
-The library loader is a client module which is in charge of downloading the library from the server and importing it. The loader is located in `src/public/app/services/library_loader.js`.
-
-To add a new library, start by creating a constant for it, with the value pointing to the minified JS identified at the first step:
-
-```javascript
-const I18NEXT = {
- js: [
- "node_modules/i18next/i18next.min.js"
- ]
-};
-```
-
-Then add it to the `export default` section:
-
-```diff
- export default {
- requireCss,
- requireLibrary,
- CKEDITOR,
- CODE_MIRROR,
- ESLINT,
- RELATION_MAP,
- PRINT_THIS,
- CALENDAR_WIDGET,
- KATEX,
- WHEEL_ZOOM,
- FORCE_GRAPH,
- MERMAID,
- EXCALIDRAW,
-- MARKJS
-+ MARKJS,
-+ I18NEXT
- }
-```
-
-### Step 4. Using the library
-
-To import the library, simply use the following mechanism:
-
-```diff
-import library_loader from "./library_loader.js";
-
-await library_loader.requireLibrary(library_loader.I18NEXT);
-```
-
-Make sure to replace `I18NEXT` with the library that was created at the previous steps.
-
-Note that because we are not using a module management mechanism such as ES Modules or Common.js modules, the `requireLibrary` method does not actually return anything.
-
-To benefit from the library, it must export on its own an object in `window`.
-
-In the case of `i18next`, it sets `window.i18next` and that can be used directly:
-
-```diff
-i18next.init({});
-```
-
-### Step 5. Adding Electron support
-
-For Electron, the `node_modules` are copied as a separate step by `bin/copy-dist.ts`.
-
-Scroll all the way down to the `nodeModulesFolder` and append an entry for the newly added libraries.
\ No newline at end of file
diff --git a/docs/Developer Guide/Developer Guide/Old documentation/Dependency Management/Having a simpler packaging sys.md b/docs/Developer Guide/Developer Guide/Old documentation/Dependency Management/Having a simpler packaging sys.md
deleted file mode 100644
index 05271e390..000000000
--- a/docs/Developer Guide/Developer Guide/Old documentation/Dependency Management/Having a simpler packaging sys.md
+++ /dev/null
@@ -1,8 +0,0 @@
-# Having a simpler packaging system
-The current build scripts are a bit complicated and maintaining them is not easy.
-
-[Electron Forge](https://www.electronforge.io/) seems more mature and has a boatload of features, including Flatpak, snaps, Windows installers & more.
-
-Have a look also at the [Plugins](https://www.electronforge.io/config/plugins) section since there are quite a few interesting things there as well.
-
-Afterwards consider running a new round of Reducing binary size, especially taking into consideration removing of the unnecessary locales.
\ No newline at end of file
diff --git a/docs/Developer Guide/Developer Guide/Old documentation/Documentation_image.png b/docs/Developer Guide/Developer Guide/Old documentation/Documentation_image.png
deleted file mode 100644
index 542bb7858..000000000
Binary files a/docs/Developer Guide/Developer Guide/Old documentation/Documentation_image.png and /dev/null differ
diff --git a/docs/Developer Guide/Developer Guide/Old documentation/Installation/Download latest nightly and in.md b/docs/Developer Guide/Developer Guide/Old documentation/Installation/Download latest nightly and in.md
deleted file mode 100644
index 0d5f2a2e4..000000000
--- a/docs/Developer Guide/Developer Guide/Old documentation/Installation/Download latest nightly and in.md
+++ /dev/null
@@ -1,12 +0,0 @@
-# Download latest nightly and install it
-On Ubuntu:
-
-```
-#!/usr/bin/env bash
-
-name=TriliumNotes-linux-x64-nightly.deb
-rm -f $name*
-wget https://github.com/TriliumNext/Trilium/releases/download/nightly/$name
-sudo apt-get install ./$name
-rm $name
-```
\ No newline at end of file
diff --git a/docs/Developer Guide/Developer Guide/Old documentation/Project maintenance/Updating dependencies/Node.js, Electron and `better-.md b/docs/Developer Guide/Developer Guide/Old documentation/Project maintenance/Updating dependencies/Node.js, Electron and `better-.md
deleted file mode 100644
index 93b94ab72..000000000
--- a/docs/Developer Guide/Developer Guide/Old documentation/Project maintenance/Updating dependencies/Node.js, Electron and `better-.md
+++ /dev/null
@@ -1,36 +0,0 @@
-# Node.js, Electron and `better-sqlite3`
-## Node.js, Electron and `better-sqlite3`
-
-`better-sqlite3` requires a native module in order to work. In order to ease the installation process, prebuilt binaries are provided by the library developers.
-
-Trilium Next started with version [8.4.0](https://github.com/WiseLibs/better-sqlite3/releases/tag/v8.4.0) for `better-sqlite3`
-
-| | | | |
-| --- | --- | --- | --- |
-| `better-sqlite3` version | SQLite version | Node.js prebuilds | Electron.js prebuilds |
-| 8.4.0 | <3.43.0 | v20 | ??? |
-| 8.5.0 | v20 | v25 | |
-| 8.5.1 | | v26 | |
-| 8.5.2 | v20 (macOS + arm64) | | |
-| 8.6.0 | 3.43.0 | | |
-| 8.7.0 | 3.43.1 | | |
-| 9.0.0 | 3.43.2 | | v27 |
-| 9.1.0 | 3.44.0 | | |
-| 9.1.1 | macOS + Alpine | | |
-| 9.2.0 | 3.44.2 | | |
-| 9.2.1 / 9.2.2 | | v28 | |
-| 9.3.0 | 3.45.0 | | |
-| 9.4.0 | 3.45.1 | | |
-| 9.4.1 | Windows arm, arm64 | | |
-| 9.4.2 | | 21 | | |
-| 11.1.0 (prerelease) | | | v31 |
-| 11.1.1 | | | |
-| 11.1.2 | | | |
\ No newline at end of file
diff --git a/docs/Developer Guide/Developer Guide/Old documentation/Project maintenance/Updating dependencies/Testing compatibility.md b/docs/Developer Guide/Developer Guide/Old documentation/Project maintenance/Updating dependencies/Testing compatibility.md
deleted file mode 100644
index 381326055..000000000
--- a/docs/Developer Guide/Developer Guide/Old documentation/Project maintenance/Updating dependencies/Testing compatibility.md
+++ /dev/null
@@ -1,15 +0,0 @@
-# Testing compatibility
-| `better-sqlite3` version [Change log](https://github.com/WiseLibs/better-sqlite3/releases) | SQLite version [Change log](https://www.sqlite.org/changes.html) | Compatibility with upstream Trilium |
-| --- | --- | --- |
-| 8.4.0 | <3.43.0 | Compatible, same version. |
-| 8.6.0 | 3.43.0 | |
-| 8.7.0 | 3.43.1 | |
-| 9.0.0 | 3.43.2 | |
-| 9.1.0 + 9.1.1 | 3.44.0 | |
-| 9.2.0 + 9.2.1 + 9.2.2 | 3.44.2 | |
-| 9.3.0 | 3.45.0 | |
-| 9.4.0, 9.4.1, 9.4.2, 9.4.3, 9.4.4, 9.4.5 | 3.45.1 | |
-| 9.5.0 | 3.45.2 | |
-| 9.6.0 / 10.0.0 | 3.45.3 | |
-| 10.1.0 / 11.0.0 / 11.1.1 / 11.1.2 / 11.2.0 / 11.2.1 | 3.46.0 | |
-| 11.3.0 | 3.46.1 | |
\ No newline at end of file
diff --git a/docs/Developer Guide/Developer Guide/Old documentation/Project maintenance/Updating dependencies/bettersqlite binaries.md b/docs/Developer Guide/Developer Guide/Old documentation/Project maintenance/Updating dependencies/bettersqlite binaries.md
deleted file mode 100644
index 12fdd7e70..000000000
--- a/docs/Developer Guide/Developer Guide/Old documentation/Project maintenance/Updating dependencies/bettersqlite binaries.md
+++ /dev/null
@@ -1,41 +0,0 @@
-# bettersqlite binaries
-### The native node bindings
-
-`better-sqlite3` has native Node bindings. With updates of `better-sqlite3`, but also of Electron and Node.js versions, these bindings need to be updated.
-
-Note that Electron and Node.js versions need different versions of these bindings, since Electron usually packs a different version of Node.js.
-
-During development, `npm install` tries to build or reuse prebuilt natives for the current Node.js version. This makes `npm run start-server` work out of the box. Trying to run `npm run start-electron` with these versions generally causes an error such as this:
-
-```
-Uncaught Exception:
-Error: The module '/Users/elian/Projects/Notes/node_modules/better-sqlite3/build/Release/better_sqlite3.node'
-was compiled against a different Node.js version using
-NODE_MODULE_VERSION 108. This version of Node.js requires
-NODE_MODULE_VERSION 116. Please try re-compiling or re-installing
-the module (for instance, using `npm rebuild` or `npm install`).
-```
-
-### How the natives are handled
-
-Locally, this can be fixed by rebuilding the binaries, which is what `npm run switch-electron` does, which uses `electron-rebuild` under the hood.
-
-When the deliveries are built (see Build deliveries locally), it is not feasible to rebuild the dependencies since we are building for multiple platforms. Luckily, `better-sqlite3` provides these prebuilt binaries from us, available as artifacts on [their GitHub releases page](https://github.com/WiseLibs/better-sqlite3/releases/).
-
-The build script manages the natives for `better-sqlite3` by keeping a copy of the `.node` file for every platform in `bin/better-sqlite3`.
-
-Whenever the version of `better-sqlite3` changes, the `.node` files must also be renewed based on their releases page. To simplify this process, a script was created in `bin/better-sqlite3/update.sh`.
-
-## How to update the natives
-
-The update script needs to know the version of Electron or Node.js for which to download the prebuilt binaries.
-
-If you get errors during download, check on the [releases page](https://github.com/WiseLibs/better-sqlite3/releases/) to ensure that this particular combination of Electron/Node actually exists for the given release.
-
-To determine the `NODE_MODULE_VERSION` that is required, look for `This version of Node.js requires`
-`NODE_MODULE_VERSION` in the error when starting Trilium via:
-
-* `npm run start-electron` (or run any Electron [delivery](../../Build%20deliveries%20locally.md)), case in which the `ELECTRON_VERSION` variable needs to be changed.
-* `npm run start-server` (or run the Linux server delivery), case in which the `NODE_VERSION` variable needs to be changed.
-
-Check which files got changed after running the update script and for each platform that got changed, test it locally via Build deliveries locally or via the CI.
\ No newline at end of file
diff --git a/docs/Developer Guide/Developer Guide/Old documentation/Releasing a version.md b/docs/Developer Guide/Developer Guide/Old documentation/Releasing a version.md
deleted file mode 100644
index 63b75ddec..000000000
--- a/docs/Developer Guide/Developer Guide/Old documentation/Releasing a version.md
+++ /dev/null
@@ -1,22 +0,0 @@
-# Releasing a version
-On NixOS:
-
-```
-nix-shell -p dpkg fakeroot jq nodejs_20
-```
-
-Then simply run from project root:
-
-```
-./bin/release.sh 1.2.3
-```
-
-where `1.2.3` is the desired release version.
-
-If a version ends with `-beta`, it will automatically be marked as pre-release in GitHub.
-
-This will automatically generate a release in GitHub if everything goes according to plan.
-
-Note that the Windows installer is not automatically uploaded yet, it has to be taken from the [main workflow of the CI from the `develop` branch](Building%20and%20deployment/CI/Main.md).
-
-Make sure to check test the artifacts of the release.
\ No newline at end of file
diff --git a/docs/Developer Guide/Developer Guide/Old documentation/Running a development build.md b/docs/Developer Guide/Developer Guide/Old documentation/Running a development build.md
deleted file mode 100644
index 539dc3d03..000000000
--- a/docs/Developer Guide/Developer Guide/Old documentation/Running a development build.md
+++ /dev/null
@@ -1,89 +0,0 @@
-# Running a development build
-As always, install the dependencies for the first time (and re-run whenever there are errors about missing dependencies):
-
-```
-npm install
-```
-
-## Run server
-
-Run with default settings:
-
-```
-npm run start-server
-```
-
-Run with custom port:
-
-```
-TRILIUM_PORT=8082 npm run start-server
-```
-
-## Run Electron
-
-Rebuild `better-sqlite3` dependency:
-
-```
-npm run switch-electron
-```
-
-Then run Electron:
-
-```
-npm run start-electron
-```
-
-To run Electron using the same data directory as the production version:
-
-```
-npm run start-electron-no-dir
-```
-
-When done, switch back the `better-sqlite3` dependency:
-
-```
-npm run switch-server
-```
-
-## Quick switch
-
-To start Electron without running `switch-electron` first:
-
-```
-npm run qstart-electron
-```
-
-Similarly, to start the server without running `switch-server` first:
-
-```
-npm run qstart-server
-```
-
-## Safe mode
-
-Safe mode is off by default, to enable it temporarily on a Unix shell, prepend the environment variable setting:
-
-```
-TRILIUM_SAFE_MODE=1 npm run start-server
-```
-
-To have the same behaviour on Windows, we would need to alter `package.json`:
-
-```diff
--"start-electron": "npm run prepare-dist && cross-env TRILIUM_DATA_DIR=./data TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 TRILIUM_ENV=dev electron ./dist/electron-main.js --inspect=5858 .",
-+"start-electron": "npm run prepare-dist && cross-env TRILIUM_SAFE_MODE=1 TRILIUM_DATA_DIR=./data TRILIUM_SYNC_SERVER_HOST=http://tsyncserver:4000 TRILIUM_ENV=dev electron ./dist/electron-main.js --inspect=5858 .",
-```
-
-## Running on NixOS
-
-When doing development, the Electron binary retrieved from NPM is not going to be compatible with NixOS, resulting in errors when trying to run it. To bypass this, there is a special command to run electron using `nix-shell`:
-
-```
-npm run start-electron-nix
-```
-
-Similarly to the original command, to use the same data directory as the production version:
-
-```
-npm run start-electron-no-dir-nix
-```
\ No newline at end of file
diff --git a/docs/Developer Guide/Developer Guide/Old documentation/Scripting/Server-side imports.md b/docs/Developer Guide/Developer Guide/Old documentation/Scripting/Server-side imports.md
deleted file mode 100644
index c19366cee..000000000
--- a/docs/Developer Guide/Developer Guide/Old documentation/Scripting/Server-side imports.md
+++ /dev/null
@@ -1,16 +0,0 @@
-# Server-side imports
-Trilium Notes allowed the use of Common.js module imports inside backend scripts, such as:
-
-```
-const isBetween = require('dayjs/plugin/isBetween')
-api.dayjs.extend(isBetween)
-```
-
-For TriliumNext, the backend has been switched to use ESM which has a slightly more complicated syntax. Instead of `require` we now have `import` but which is asynchronous so it will require an `await`:
-
-```
-const isBetween = (await import("dayjs/plugin/isBetween")).default;
-api.dayjs.extend(isBetween);
-```
-
-Note that `.default` is also usually needed to obtain the same behaviour as a CJS import. When in doubt, use `console.log` to see the output of the value returned by `await import`.
\ No newline at end of file
diff --git a/docs/Developer Guide/Developer Guide/Old documentation/Scripting/Widgets.md b/docs/Developer Guide/Developer Guide/Old documentation/Scripting/Widgets.md
deleted file mode 100644
index 57de0ad15..000000000
--- a/docs/Developer Guide/Developer Guide/Old documentation/Scripting/Widgets.md
+++ /dev/null
@@ -1,33 +0,0 @@
-# Widgets
-To create a basic widget, simply create a code note with type “JS frontend”. Add the `#widget` label in order for it to be loaded at startup.
-
-```
-const template = ``;
-
-class MyWidget extends api.BasicWidget {
- get position() { return 1; }
- get parentWidget() { return "left-pane" }
-
- doRender() {
- this.$widget = $(template);
- return this.$widget;
- }
-}
-
-module.exports = new MyWidget();
-```
-
-`parentWidget()` can be given the following values:
-
-* `left-pane` - This renders the widget on the left side of the screen where the note tree lives.
-* `center-pane` - This renders the widget in the center of the layout in the same location that notes and splits appear.
-* `note-detail-pane` - This renders the widget _with_ the note in the center pane. This means it can appear multiple times with splits.
-* `right-pane` - This renders the widget to the right of any opened notes.
-
-* * *
-
-Reference:
-
-* [https://trilium.rocks/X7pxYpiu0lgU](https://trilium.rocks/X7pxYpiu0lgU)
-* [https://github.com/zadam/trilium/wiki/Widget-Basics](https://github.com/zadam/trilium/wiki/Widget-Basics)
-* [https://github.com/zadam/trilium/wiki/Frontend-Basics](https://github.com/zadam/trilium/wiki/Frontend-Basics)
\ No newline at end of file
diff --git a/docs/Developer Guide/Developer Guide/Old documentation/Sub-projects/CKEditor/Building the editor.md b/docs/Developer Guide/Developer Guide/Old documentation/Sub-projects/CKEditor/Building the editor.md
deleted file mode 100644
index 940617026..000000000
--- a/docs/Developer Guide/Developer Guide/Old documentation/Sub-projects/CKEditor/Building the editor.md
+++ /dev/null
@@ -1,21 +0,0 @@
-# Building the editor
-First, make sure Environment setup is set up.
-
-## Trigger the build
-
-```
-cd packages/ckeditor5-build-trilium
-yarn build
-```
-
-This will trigger a change in the `build` directory.
-
-## Copy the build artifact to the main repo
-
-Go to `packages/ckeditor5-build-balloon-trilium/build` and copy `ckeditor.js` and `ckeditor.js.map` to `libraries/ckeditor` in the `Notes` repository.
-
-An example shell command to copy it:
-
-```
-cp build/ckeditor.* ~/Projects/TriliumNext/Notes/libraries/ckeditor/
-```
\ No newline at end of file
diff --git a/docs/Developer Guide/Developer Guide/Old documentation/Sub-projects/CKEditor/Environment setup.md b/docs/Developer Guide/Developer Guide/Old documentation/Sub-projects/CKEditor/Environment setup.md
deleted file mode 100644
index 76819a12b..000000000
--- a/docs/Developer Guide/Developer Guide/Old documentation/Sub-projects/CKEditor/Environment setup.md
+++ /dev/null
@@ -1,26 +0,0 @@
-# Environment setup
-## Clone the repository
-
-To set up the repository:
-
-```
-git clone https://github.com/TriliumNext/trilium-ckeditor5.git
-```
-
-## Install dependencies
-
-First, install root dependencies:
-
-```
-cd trilium-ckeditor5
-yarn install
-```
-
-Secondly, install the Trilium build dependencies:
-
-```
-cd packages/ckeditor5-build-trilium
-yarn install
-```
-
-To trigger the build, see Building the editor.
\ No newline at end of file
diff --git a/docs/Developer Guide/Developer Guide/Old documentation/Sub-projects/CKEditor/Updating to a newer version of.md b/docs/Developer Guide/Developer Guide/Old documentation/Sub-projects/CKEditor/Updating to a newer version of.md
deleted file mode 100644
index 6e7808f67..000000000
--- a/docs/Developer Guide/Developer Guide/Old documentation/Sub-projects/CKEditor/Updating to a newer version of.md
+++ /dev/null
@@ -1,65 +0,0 @@
-# Updating to a newer version of CKEditor
-## Before updating
-
-Make sure that all the plugins are compatible with this version: Versions and external plugins. If not, they will need to be updated to the same version as the one you are updating, by altering their `package.json`.
-
-If the plugin is external to the Trilium organisation, it needs to be forked first.
-
-## Environment setup
-
-The first step is to add the CKEditor source as a remote. This only needs to be done once.
-
-```
-git remote add upstream ssh://git@github.com/ckeditor/ckeditor5.git
-git fetch upstream
-```
-
-## Update steps
-
-Due to how the repository is structured, updates to the CKEditor are a bit difficult.
-
-1. `git fetch upstream`
-2. Pick a version and merge with it: `git merge -X theirs v99.2.0`
-3. When there are complicated conflicts, sometimes it's easier to take everything from the target version instead, for a given path: `git checkout v99.2.0 -- "packages/ckeditor5-list/**"`.
-4. Go in `packages/ckeditor5-build-trilium/package.json` and run `node sync-version.js` to update the `package.json` with the new versions. Review and commit the change.
-5. Follow again the dependency setup in Environment setup, as they have changed.
-6. [Run the build](Building%20the%20editor.md) and check that it works.
-
-## Final steps
-
-1. Start the TriliumNext server
-2. If updated to a newer version of CKEditor, check type `CKEDITOR_VERSION` in the browser/Electron console to ensure that the correct version is used.
-3. Do a basic sanity check as well.
-4. Commit and push the change on both sides (in the `trilium-ckeditor5` repo and in the `Notes` repo).
-
-## Troubleshooting client side errors
-
-These errors might show up when testing the Trilium app:
-
-```
-ReferenceError: CKEditor is not defined
-```
-
-Usually this is a side effect of another error, check the logs carefully to see if there is any other related error (perhaps a `CKEditorError`).
-
-* * *
-
-```
-Uncaught error: Message: CKEditorError: ckeditor-duplicated-modules
-```
-
-Most likely cause is one of the external plugins is incompatible with this version.
-
-For example, to disable the Math plugin, go to `packages/ckeditor5-build-trilium/src/config.ts` and modify:
-
-```diff
--import Math from '@triliumnext/ckeditor5-math/src/math';
--import AutoformatMath from '@triliumnext/ckeditor5-math/src/autoformatmath';
-
-export const COMMON_PLUGINS = [
-- Math,
-- AutoformatMath,
-]
-```
-
-In this case, make sure to align the version of all the external plugins with the one you are updating to, usually by forking the external plugin and updating its versions.
\ No newline at end of file
diff --git a/docs/Developer Guide/Developer Guide/Old documentation/Sub-projects/CKEditor/Versions and external plugins.md b/docs/Developer Guide/Developer Guide/Old documentation/Sub-projects/CKEditor/Versions and external plugins.md
deleted file mode 100644
index 2fe124c31..000000000
--- a/docs/Developer Guide/Developer Guide/Old documentation/Sub-projects/CKEditor/Versions and external plugins.md
+++ /dev/null
@@ -1,8 +0,0 @@
-# Versions and external plugins
-## External plugins
-
-| | | |
-| --- | --- | --- |
-| trilium-ckeditor5 | 43.2.0 | |
-| `ckeditor5-math` | | See ckeditor5-math. |
-| | | |
\ No newline at end of file
diff --git a/docs/Developer Guide/Developer Guide/Old documentation/Sub-projects/ckeditor5-math.md b/docs/Developer Guide/Developer Guide/Old documentation/Sub-projects/ckeditor5-math.md
deleted file mode 100644
index 91b6b265f..000000000
--- a/docs/Developer Guide/Developer Guide/Old documentation/Sub-projects/ckeditor5-math.md
+++ /dev/null
@@ -1,29 +0,0 @@
-# ckeditor5-math
-ckeditor5-math in action.
-
-A fork of [isaul32/ckeditor5-math](https://github.com/isaul32/ckeditor5-math), which is the CKEditor5 plugin which adds the math functionality. The fork was created to handle #297: Insert Math appears to be broken.
-
-## Development environment
-
-* Tested on Node.js 20.
-* The package manager is yarn 1 (v1.22.22 is known to be working fine for it at the time of writing).
-
-Important commands:
-
-* To check if the code has any formatting issues: `yarn lint`
-* To start a live preview: `yarn start`
-* To run the tests: `yarn test`
- * Note that this requires Chromium, on NixOS this can be achieved by running a `nix-shell -p chromium`, and running `CHROME_BIN=$(which chromium) yarn test` inside it.
-
-## 📦 Packages
-
-The built artifact of the plugin is released by the CI and available on the [GitHub NPM registry](https://github.com/TriliumNext/ckeditor5-math/pkgs/npm/ckeditor5-math).
-
-Note that due to limitations on GitHub's registry, it is not possible to install this package without setting up a personal access token (even though the package itself is public). See [missing note] for more information.
-
-## ⬆️ Integrating with CKEditor
-
-1. Release a new version: Release management & continuous integration
-2. In `trilium-ckeditor5`, go to `packages/ckeditor5-build-trilium/package.json` in the CKEditor repository and change the dependency of `@triliumnext/ckeditor5-math` to the newly released version.
-3. Run `yarn install`.
-4. Proceed with Building the editor to integrate everything into TriliumNext and then commit the change.
\ No newline at end of file
diff --git a/docs/Developer Guide/Developer Guide/Old documentation/Sub-projects/ckeditor5-math/Release management & continuou.md b/docs/Developer Guide/Developer Guide/Old documentation/Sub-projects/ckeditor5-math/Release management & continuou.md
deleted file mode 100644
index 1511f4bfc..000000000
--- a/docs/Developer Guide/Developer Guide/Old documentation/Sub-projects/ckeditor5-math/Release management & continuou.md
+++ /dev/null
@@ -1,16 +0,0 @@
-# Release management & continuous integration
-To automate the release process, a GitHub workflow has been added which builds the package and releases it over to GitHub NPM registry.
-
-The workflow publishes a release whenever a tag with the correct format is pushed.
-
-The steps are as follows:
-
-1. Ensure that the source code is clean and ready for a release.
-2. Go to `package.json` and bump the `version` field.
-3. Commit the changes.
-4. Tag the commit with `v1.2.3`, with the correct version number.
-5. Push the changes.
-
-Then follow the CI and it should indicate success. Afterwards, check the [package](https://github.com/TriliumNext/ckeditor5-math/pkgs/npm/ckeditor5-math)section to ensure that the package is in the “Recent Versions” section.
-
-If the changes could benefit upstream, consider opening a pull request with the changes there as well.
\ No newline at end of file
diff --git a/docs/Developer Guide/Developer Guide/Old documentation/Sub-projects/ckeditor5-math/Updating with upstream.md b/docs/Developer Guide/Developer Guide/Old documentation/Sub-projects/ckeditor5-math/Updating with upstream.md
deleted file mode 100644
index b69003358..000000000
--- a/docs/Developer Guide/Developer Guide/Old documentation/Sub-projects/ckeditor5-math/Updating with upstream.md
+++ /dev/null
@@ -1,21 +0,0 @@
-# Updating with upstream
-If there was a change in the upstream repository ([isaul32/ckeditor5-math](https://github.com/isaul32/ckeditor5-math)), it can be integrated as follows:
-
-1. Add the upstream as remote (`git remote add upstream ssh://git@github.com/isaul32/ckeditor5-math.git`).
-2. Fetch the changes: `git fetch upstream`
-3. Merge with a tag: `git merge v43.1.2`
-4. Solve the conflict in `package.json` by:
- 1. Taking the same version as the upcoming one and appending `-hotfix1`.
- 2. Keeping the `@triliumnext/ckeditor5-math` name.
-5. Install dependencies: `yarn install`
-6. Check that the build works via `yarn prepublishOnly`.
-7. Commit the changes, push them.
-8. Release a version with Release management & continuous integration.
-
-## CI job not triggered after pushing all the upstream tags
-
-If the CI job was not triggered, you might have accidentally pushed a lot of tags using `git push --tags`. Manually delete the tag and push it again:
-
-```diff
-git push -d origin v43.1.2-hotfix1 && git push --tags
-```
\ No newline at end of file
diff --git a/docs/Developer Guide/Developer Guide/Old documentation/Testing/Integration testing/1_Setting up authentication_.png b/docs/Developer Guide/Developer Guide/Old documentation/Testing/Integration testing/1_Setting up authentication_.png
deleted file mode 100644
index 020472c6d..000000000
Binary files a/docs/Developer Guide/Developer Guide/Old documentation/Testing/Integration testing/1_Setting up authentication_.png and /dev/null differ
diff --git a/docs/Developer Guide/Developer Guide/Old documentation/Testing/Integration testing/Running tests.md b/docs/Developer Guide/Developer Guide/Old documentation/Testing/Integration testing/Running tests.md
deleted file mode 100644
index 3ab98a39c..000000000
--- a/docs/Developer Guide/Developer Guide/Old documentation/Testing/Integration testing/Running tests.md
+++ /dev/null
@@ -1,38 +0,0 @@
-# Running tests
-## First-time run
-
-Before starting Playwright, it has to be installed locally via:
-
-```
-npx playwright install
-```
-
-## Starting the integration test server
-
-There are two types of integration test servers:
-
-* `npm run integration-mem-db` will run a server with dev mode disabled.
- * This is usually what the end user will see when accessing a server instance.
- * It will not test the Electron/desktop side of the application.
- * Changes to the public scripts will not take effect until running `npm run webpack`.
-* `npm run integration-mem-db-dev` will run a server with dev mode enabled.
- * This is usually what a dev sees when running `npm run start-server`.
- * The difference with the production one is that the assets are loaded directly from files and as such it does not require `npm run webpack` to see changes.
-
-Either options will open up a server on [localhost:8082](http://localhost:8082) that can be accessed either manually via the browser or via Playwright.
-
-When asked for a password, the password is `demo1234`.
-
-## Starting the interactive test runner
-
-After starting the integration test server, to run the Playwright UI, run in the terminal:
-
-```
-npx playwright test --ui
-```
-
-It is also possible to run the interactive code generator instead:
-
-```
-npx playwright codegen
-```
\ No newline at end of file
diff --git a/docs/Developer Guide/Developer Guide/Old documentation/Testing/Integration testing/Setting up authentication.md b/docs/Developer Guide/Developer Guide/Old documentation/Testing/Integration testing/Setting up authentication.md
deleted file mode 100644
index 4df7880fe..000000000
--- a/docs/Developer Guide/Developer Guide/Old documentation/Testing/Integration testing/Setting up authentication.md
+++ /dev/null
@@ -1,12 +0,0 @@
-# Setting up authentication
-There is a setup test that stores the authentication token so that it can be reused throughout all the tests.
-
-If tests fail due to being stuck on login, then it must be run.
-
-To run it manually press “all” near the “Status:” text on top-left of the window
-
-
-
-Then check “setup” and look for `auth.setup.ts` and press its corresponding Run button:
-
-
\ No newline at end of file
diff --git a/docs/Developer Guide/Developer Guide/Old documentation/Testing/Integration testing/Setting up authentication_.png b/docs/Developer Guide/Developer Guide/Old documentation/Testing/Integration testing/Setting up authentication_.png
deleted file mode 100644
index 4b260dfbc..000000000
Binary files a/docs/Developer Guide/Developer Guide/Old documentation/Testing/Integration testing/Setting up authentication_.png and /dev/null differ
diff --git a/docs/Developer Guide/Developer Guide/Project Structure.md b/docs/Developer Guide/Developer Guide/Project Structure.md
index ff0c954a2..82688cf2a 100644
--- a/docs/Developer Guide/Developer Guide/Project Structure.md
+++ b/docs/Developer Guide/Developer Guide/Project Structure.md
@@ -1,5 +1,5 @@
# Project Structure
-As the application grew in complexity, our build system was growing even more difficult to maintain and was spread across multiple repositories. As such we have decided to use a mono-repo approach, and to do so we chose to have NX manage our mono-repo.
+As the application grew in complexity, we decided to switch to a monorepo based on `pnpm`. Our initial monorepo implementation used NX, but we've switched to pure `pnpm` workspaces and our own build scripts.
## Project structure
@@ -12,45 +12,18 @@ The mono-repo is mainly structured in:
* `packages`, containing dependencies used by one or more `apps`.
* `commons`, containing shared code for all the apps.
-## Working with NX
-
-### Running tasks via the CLI
+## Working with the project
For example to run the server instance:
```
-pnpm exec nx run server:serve
+pnpm server:start
```
-NX has built-in cache support which should make development much faster. Sometimes, it can get in the way; to skip the cache simply append `--skip-nx-cache` to the command you are running.
+## Running and building
-### Running tasks using Visual Studio Code
-
-If you are using Visual Studio Code as your development tool for Trilium, consider using the NX Console. It allows running tasks/targets much easier via the dedicated tab. Right-click a target in the list for more options, such as bypassing the cache.
-
-## Important tasks
-
-Each application has a number of tasks (called _targets_ by NX). Here's a non-exhaustive list of the tasks that are useful during development.
-
-To run any of the task use `pnpm exec nx run project:task`, or use the Visual Studio Code integration as described above.
-
-* `client`:
- * The client is not meant to be run by itself, despite being described as an app. See the documentation on the server instead.
-* `server`:
- * To run the server in development mode, run `client:serve` (which will only serve the public assets), followed by `server:serve` (which will proxy the assets of the client as well). The dev port remains the same as always, `8080`.
- * To run the server in production mode (with its own copy of the assets), run `server:start-prod`.
- * To build the server for Docker, run `docker-build` which will automatically build and tag the image if Docker is installed locally.
- * Similarly, run `docker-start` to build and run the Docker image.
-* `desktop`:
- * To run the desktop, run `desktop:serve`.
- * Unlike the server, this one does not require the client since it will automatically get a production copy of it. The only downside is that modifications to the code will only take effect after restarting the task.
-
-## Building packages
-
-Generally, the building process of a project generates a `dist` folder containing everything needed for production. To trigger a build run `pnpm nx build project` where `project` is the name of a project from either `apps` or `packages`.
+Each application has a number of tasks. Here's a non-exhaustive list of the tasks that are useful during development. See Building.
## Managing dependencies across the mono-repo
-We are using [pnpm workspaces](https://pnpm.io/workspaces) to manage the project structure, further augmented by NX which is described in a different section.
-
-The workspace configuration is in `pnpm-workspace.yaml` at project level but it generally should not be modified.
\ No newline at end of file
+We are using [pnpm workspaces](https://pnpm.io/workspaces) to manage the project structure. The workspace configuration is in `pnpm-workspace.yaml` at project level but it generally should not be modified.
\ No newline at end of file
diff --git a/docs/Developer Guide/Developer Guide/Old documentation/Testing.md b/docs/Developer Guide/Developer Guide/Testing.md
similarity index 77%
rename from docs/Developer Guide/Developer Guide/Old documentation/Testing.md
rename to docs/Developer Guide/Developer Guide/Testing.md
index 95efd9919..a1f8a1983 100644
--- a/docs/Developer Guide/Developer Guide/Old documentation/Testing.md
+++ b/docs/Developer Guide/Developer Guide/Testing.md
@@ -17,17 +17,14 @@ Note that some integration tests rely on an in-memory database in order to funct
### REST API testing for the server
-Some original work was done by Zadam in `/test-etapi`, using `.http` files.
-
-New effort using `vitest` and `supertest` to initialize the Express server and run assertions without having to make actual requests to the server.
+API tests are handled via `vitest` and `supertest` to initialize the Express server and run assertions without having to make actual requests to the server.
An important aspect is that we have access to the Express `app` which allows for interesting assertions such as checking the state of the server, registering debug middleware and so on.
-One example is `src/share/routes.spec.ts`.
+One example is `src/share/routes.spec.ts`, or for the ETAPI in `apps/server/spec/etapi`.
These integration tests are run alongside unit tests.
## End-to-end testing
-* This tests both the client and the server, by running the server and then using Playwright to query the state of the page.
-* These can be found in `/e2e`.
\ No newline at end of file
+See e2e tests.
\ No newline at end of file
diff --git a/docs/Developer Guide/Developer Guide/Testing/End-to-end tests.md b/docs/Developer Guide/Developer Guide/Testing/End-to-end tests.md
new file mode 100644
index 000000000..387940158
--- /dev/null
+++ b/docs/Developer Guide/Developer Guide/Testing/End-to-end tests.md
@@ -0,0 +1,31 @@
+# End-to-end tests
+* This tests both the client and the server, by running the server and then using Playwright to query the state of the page.
+* These can be found in `apps/server-e2e` and `apps/desktop/e2e`.
+
+## First-time run
+
+Before starting Playwright, it has to be installed locally via:
+
+```
+pnpm playwright install
+```
+
+## Starting the integration test server
+
+Simply run `pnpm e2e` in one of the e2e projects.
+
+The integration server doesn't have authentication enabled to avoid login issues.
+
+## Starting the interactive test runner
+
+After starting the integration test server, to run the Playwright UI, run in the terminal:
+
+```
+pnpm playwright test --ui
+```
+
+It is also possible to run the interactive code generator instead:
+
+```
+pnpm playwright codegen
+```
\ No newline at end of file
diff --git a/docs/Developer Guide/Developer Guide/Development and architecture/Special notes.md b/docs/Developer Guide/Developer Guide/Testing/Integration testing.md
similarity index 100%
rename from docs/Developer Guide/Developer Guide/Development and architecture/Special notes.md
rename to docs/Developer Guide/Developer Guide/Testing/Integration testing.md
diff --git a/docs/Developer Guide/Developer Guide/Old documentation/Testing/Integration testing/Test database.md b/docs/Developer Guide/Developer Guide/Testing/Test database.md
similarity index 100%
rename from docs/Developer Guide/Developer Guide/Old documentation/Testing/Integration testing/Test database.md
rename to docs/Developer Guide/Developer Guide/Testing/Test database.md
diff --git a/docs/Developer Guide/Developer Guide/Old documentation/Troubleshooting/Error [TransformError] The pac.md b/docs/Developer Guide/Developer Guide/Troubleshooting/Error [TransformError] The pac.md
similarity index 99%
rename from docs/Developer Guide/Developer Guide/Old documentation/Troubleshooting/Error [TransformError] The pac.md
rename to docs/Developer Guide/Developer Guide/Troubleshooting/Error [TransformError] The pac.md
index 8a93a52be..82a5d93a8 100644
--- a/docs/Developer Guide/Developer Guide/Old documentation/Troubleshooting/Error [TransformError] The pac.md
+++ b/docs/Developer Guide/Developer Guide/Troubleshooting/Error [TransformError] The pac.md
@@ -36,5 +36,5 @@ The solution is to remove `node_modules` and reinstall all dependencies:
```
rm -r node_modules
-npm install
+pnpm install
```
\ No newline at end of file
diff --git a/docs/Developer Guide/Developer Guide/Troubleshooting/better-sqlite3 was compiled ag.md b/docs/Developer Guide/Developer Guide/Troubleshooting/better-sqlite3 was compiled ag.md
index af8d7c70a..a048e3b4e 100644
--- a/docs/Developer Guide/Developer Guide/Troubleshooting/better-sqlite3 was compiled ag.md
+++ b/docs/Developer Guide/Developer Guide/Troubleshooting/better-sqlite3 was compiled ag.md
@@ -1,6 +1,6 @@
# better-sqlite3 was compiled against a different Node.js version
This generally can happen when running the development version of either the `desktop` or `server`, but it should not happen as often as it used to. The reason is that `better-sqlite3` is a native dependency and has different builds for either the system's Node.js (as used by the `server`), or Electron's one (as used by the `desktop`).
-To solve this, go to `apps/server` and run `pnpm rebuild`. For Electron this step is not necessary as it's already handled by the `rebuild-deps` NX target.
+To solve this, go to `apps/server` and run `pnpm rebuild`. For Electron (`desktop`) this step generally not necessary, however `pnpm postinstall` should solve it.
If you can reproduce this issue consistently, please open a bug report.
\ No newline at end of file
diff --git a/docs/User Guide/!!!meta.json b/docs/User Guide/!!!meta.json
index 7c23b54d6..a38998354 100644
--- a/docs/User Guide/!!!meta.json
+++ b/docs/User Guide/!!!meta.json
@@ -55,7 +55,7 @@
"name": "iconClass",
"value": "bx bx-help-circle",
"isInheritable": false,
- "position": 40
+ "position": 30
}
],
"format": "markdown",
@@ -366,6 +366,41 @@
"format": "markdown",
"dataFileName": "System Requirements.md",
"attachments": []
+ },
+ {
+ "isClone": false,
+ "noteId": "Un4wj2Mak2Ky",
+ "notePath": [
+ "pOsGYCXsbNQG",
+ "Otzi9La2YAUX",
+ "poXkQfguuA0U",
+ "Un4wj2Mak2Ky"
+ ],
+ "title": "Nix flake",
+ "notePosition": 30,
+ "prefix": null,
+ "isExpanded": false,
+ "type": "text",
+ "mime": "text/html",
+ "attributes": [
+ {
+ "type": "label",
+ "name": "shareAlias",
+ "value": "nix-flake",
+ "isInheritable": false,
+ "position": 20
+ },
+ {
+ "type": "label",
+ "name": "iconClass",
+ "value": "bx bxl-tux",
+ "isInheritable": false,
+ "position": 30
+ }
+ ],
+ "format": "markdown",
+ "dataFileName": "Nix flake.md",
+ "attachments": []
}
]
},
@@ -1131,6 +1166,22 @@
"dataFileName": "Multi-Factor Authentication.md",
"attachments": []
},
+ {
+ "isClone": true,
+ "noteId": "Un4wj2Mak2Ky",
+ "notePath": [
+ "pOsGYCXsbNQG",
+ "Otzi9La2YAUX",
+ "WOcw2SLH6tbX",
+ "Un4wj2Mak2Ky"
+ ],
+ "title": "Nix flake",
+ "prefix": null,
+ "dataFileName": "Nix flake.clone.md",
+ "type": "text",
+ "format": "markdown",
+ "isExpanded": false
+ },
{
"isClone": false,
"noteId": "yeEaYqosGLSh",
@@ -8814,17 +8865,24 @@
{
"type": "relation",
"name": "internalLink",
- "value": "XpOYSgsLkTJy",
+ "value": "WWgeUaBb7UfC",
"isInheritable": false,
"position": 10
},
{
"type": "relation",
"name": "internalLink",
- "value": "0Ofbk1aSuVRu",
+ "value": "XpOYSgsLkTJy",
"isInheritable": false,
"position": 20
},
+ {
+ "type": "relation",
+ "name": "internalLink",
+ "value": "0Ofbk1aSuVRu",
+ "isInheritable": false,
+ "position": 30
+ },
{
"type": "label",
"name": "shareAlias",
@@ -8838,13 +8896,6 @@
"value": "bx bx-selection",
"isInheritable": false,
"position": 20
- },
- {
- "type": "relation",
- "name": "internalLink",
- "value": "WWgeUaBb7UfC",
- "isInheritable": false,
- "position": 30
}
],
"format": "markdown",
@@ -12589,6 +12640,13 @@
"type": "text",
"mime": "text/markdown",
"attributes": [
+ {
+ "type": "relation",
+ "name": "internalLink",
+ "value": "9qPsTWBorUhQ",
+ "isInheritable": false,
+ "position": 10
+ },
{
"type": "label",
"name": "shareAlias",
@@ -12602,13 +12660,6 @@
"value": "bx bx-extension",
"isInheritable": false,
"position": 30
- },
- {
- "type": "relation",
- "name": "internalLink",
- "value": "9qPsTWBorUhQ",
- "isInheritable": false,
- "position": 40
}
],
"format": "markdown",
@@ -13996,6 +14047,67 @@
"attachments": []
}
]
+ },
+ {
+ "isClone": false,
+ "noteId": "64ZTlUPgEPtW",
+ "notePath": [
+ "pOsGYCXsbNQG",
+ "tC7s2alapj8V",
+ "64ZTlUPgEPtW"
+ ],
+ "title": "Safe mode",
+ "notePosition": 250,
+ "prefix": null,
+ "isExpanded": false,
+ "type": "text",
+ "mime": "text/html",
+ "attributes": [
+ {
+ "type": "label",
+ "name": "shareAlias",
+ "value": "safe-mode",
+ "isInheritable": false,
+ "position": 20
+ },
+ {
+ "type": "label",
+ "name": "iconClass",
+ "value": "bx bxs-virus-block",
+ "isInheritable": false,
+ "position": 30
+ }
+ ],
+ "format": "markdown",
+ "dataFileName": "Safe mode.md",
+ "attachments": []
+ },
+ {
+ "isClone": false,
+ "noteId": "HAIOFBoYIIdO",
+ "notePath": [
+ "pOsGYCXsbNQG",
+ "tC7s2alapj8V",
+ "HAIOFBoYIIdO"
+ ],
+ "title": "Nightly release",
+ "notePosition": 260,
+ "prefix": null,
+ "isExpanded": false,
+ "type": "text",
+ "mime": "text/html",
+ "attributes": [
+ {
+ "type": "label",
+ "name": "iconClass",
+ "value": "bx bx-moon",
+ "isInheritable": false,
+ "position": 30
+ }
+ ],
+ "format": "markdown",
+ "dataFileName": "Nightly release.md",
+ "attachments": []
}
]
},
@@ -14532,152 +14644,238 @@
{
"type": "label",
"name": "iconClass",
- "value": "bx bx-info-circle",
+ "value": "bx bx-window",
"isInheritable": false,
"position": 40
}
],
"format": "markdown",
"dataFileName": "Frontend Basics.md",
- "attachments": []
- },
- {
- "isClone": false,
- "noteId": "es8OU2GuguFU",
- "notePath": [
- "pOsGYCXsbNQG",
- "CdNpE2pqjmI6",
- "es8OU2GuguFU"
- ],
- "title": "Examples",
- "notePosition": 50,
- "prefix": null,
- "isExpanded": false,
- "type": "text",
- "mime": "text/html",
- "attributes": [
- {
- "type": "label",
- "name": "shareAlias",
- "value": "examples",
- "isInheritable": false,
- "position": 20
- },
- {
- "type": "label",
- "name": "iconClass",
- "value": "bx bx-code-alt",
- "isInheritable": false,
- "position": 30
- }
- ],
- "format": "markdown",
"attachments": [],
- "dirFileName": "Examples",
+ "dirFileName": "Frontend Basics",
"children": [
{
"isClone": false,
- "noteId": "TjLYAo3JMO8X",
+ "noteId": "MgibgPcfeuGz",
"notePath": [
"pOsGYCXsbNQG",
"CdNpE2pqjmI6",
- "es8OU2GuguFU",
- "TjLYAo3JMO8X"
+ "yIhgI5H7A2Sm",
+ "MgibgPcfeuGz"
],
- "title": "\"New Task\" launcher button",
+ "title": "Custom Widgets",
"notePosition": 10,
"prefix": null,
"isExpanded": false,
"type": "text",
- "mime": "text/html",
+ "mime": "text/markdown",
"attributes": [
{
- "type": "relation",
- "name": "internalLink",
- "value": "xYjQUYhpbUEW",
- "isInheritable": false,
- "position": 10
- },
- {
- "type": "relation",
- "name": "internalLink",
- "value": "xYmIYSP6wE3F",
+ "type": "label",
+ "name": "shareAlias",
+ "value": "custom-widget",
"isInheritable": false,
"position": 20
},
- {
- "type": "relation",
- "name": "internalLink",
- "value": "6f9hih2hXXZk",
- "isInheritable": false,
- "position": 30
- },
- {
- "type": "relation",
- "name": "internalLink",
- "value": "zEY4DaJG4YT5",
- "isInheritable": false,
- "position": 40
- },
- {
- "type": "relation",
- "name": "internalLink",
- "value": "m1lbrzyKDaRB",
- "isInheritable": false,
- "position": 50
- },
- {
- "type": "relation",
- "name": "internalLink",
- "value": "s8alTXmpFR61",
- "isInheritable": false,
- "position": 60
- },
- {
- "type": "relation",
- "name": "internalLink",
- "value": "yIhgI5H7A2Sm",
- "isInheritable": false,
- "position": 70
- },
{
"type": "label",
"name": "iconClass",
- "value": "bx bx-task",
+ "value": "bx bxs-widget",
"isInheritable": false,
- "position": 80
- },
- {
- "type": "label",
- "name": "shareAlias",
- "value": "new-task-button",
- "isInheritable": false,
- "position": 90
+ "position": 30
}
],
"format": "markdown",
- "dataFileName": "New Task launcher button.md",
- "attachments": [
+ "dataFileName": "Custom Widgets.md",
+ "attachments": [],
+ "dirFileName": "Custom Widgets",
+ "children": [
{
- "attachmentId": "9C2JA6tdtRpN",
- "title": "image.png",
- "role": "image",
- "mime": "image/png",
- "position": 10,
- "dataFileName": "New Task launcher button_i.png"
+ "isClone": false,
+ "noteId": "YNxAqkI5Kg1M",
+ "notePath": [
+ "pOsGYCXsbNQG",
+ "CdNpE2pqjmI6",
+ "yIhgI5H7A2Sm",
+ "MgibgPcfeuGz",
+ "YNxAqkI5Kg1M"
+ ],
+ "title": "Word count widget",
+ "notePosition": 10,
+ "prefix": null,
+ "isExpanded": false,
+ "type": "text",
+ "mime": "text/html",
+ "attributes": [
+ {
+ "type": "relation",
+ "name": "internalLink",
+ "value": "6tZeKvSHEUiB",
+ "isInheritable": false,
+ "position": 10
+ },
+ {
+ "type": "relation",
+ "name": "internalLink",
+ "value": "6f9hih2hXXZk",
+ "isInheritable": false,
+ "position": 20
+ },
+ {
+ "type": "relation",
+ "name": "internalLink",
+ "value": "s8alTXmpFR61",
+ "isInheritable": false,
+ "position": 30
+ },
+ {
+ "type": "label",
+ "name": "shareAlias",
+ "value": "word-count",
+ "isInheritable": false,
+ "position": 40
+ }
+ ],
+ "format": "markdown",
+ "dataFileName": "Word count widget.md",
+ "attachments": [
+ {
+ "attachmentId": "JhM9NWfebzPi",
+ "title": "image.png",
+ "role": "image",
+ "mime": "image/png",
+ "position": 10,
+ "dataFileName": "Word count widget_image.png"
+ }
+ ]
+ },
+ {
+ "isClone": false,
+ "noteId": "SynTBQiBsdYJ",
+ "notePath": [
+ "pOsGYCXsbNQG",
+ "CdNpE2pqjmI6",
+ "yIhgI5H7A2Sm",
+ "MgibgPcfeuGz",
+ "SynTBQiBsdYJ"
+ ],
+ "title": "Widget Basics",
+ "notePosition": 20,
+ "prefix": null,
+ "isExpanded": false,
+ "type": "text",
+ "mime": "text/markdown",
+ "attributes": [
+ {
+ "type": "relation",
+ "name": "internalLink",
+ "value": "zEY4DaJG4YT5",
+ "isInheritable": false,
+ "position": 10
+ },
+ {
+ "type": "relation",
+ "name": "internalLink",
+ "value": "BFs8mudNFgCS",
+ "isInheritable": false,
+ "position": 20
+ },
+ {
+ "type": "relation",
+ "name": "internalLink",
+ "value": "GLks18SNjxmC",
+ "isInheritable": false,
+ "position": 30
+ },
+ {
+ "type": "label",
+ "name": "shareAlias",
+ "value": "widget-basics",
+ "isInheritable": false,
+ "position": 20
+ },
+ {
+ "type": "relation",
+ "name": "internalLink",
+ "value": "s8alTXmpFR61",
+ "isInheritable": false,
+ "position": 40
+ }
+ ],
+ "format": "markdown",
+ "dataFileName": "Widget Basics.md",
+ "attachments": []
+ },
+ {
+ "isClone": false,
+ "noteId": "M8IppdwVHSjG",
+ "notePath": [
+ "pOsGYCXsbNQG",
+ "CdNpE2pqjmI6",
+ "yIhgI5H7A2Sm",
+ "MgibgPcfeuGz",
+ "M8IppdwVHSjG"
+ ],
+ "title": "Right pane widget",
+ "notePosition": 30,
+ "prefix": null,
+ "isExpanded": false,
+ "type": "text",
+ "mime": "text/html",
+ "attributes": [
+ {
+ "type": "label",
+ "name": "shareAlias",
+ "value": "right-pane-widget",
+ "isInheritable": false,
+ "position": 20
+ }
+ ],
+ "format": "markdown",
+ "dataFileName": "Right pane widget.md",
+ "attachments": []
+ },
+ {
+ "isClone": false,
+ "noteId": "VqGQnnPGnqAU",
+ "notePath": [
+ "pOsGYCXsbNQG",
+ "CdNpE2pqjmI6",
+ "yIhgI5H7A2Sm",
+ "MgibgPcfeuGz",
+ "VqGQnnPGnqAU"
+ ],
+ "title": "CSS",
+ "notePosition": 40,
+ "prefix": null,
+ "isExpanded": false,
+ "type": "text",
+ "mime": "text/html",
+ "attributes": [
+ {
+ "type": "label",
+ "name": "shareAlias",
+ "value": "css",
+ "isInheritable": false,
+ "position": 20
+ }
+ ],
+ "format": "markdown",
+ "dataFileName": "CSS.md",
+ "attachments": []
}
]
},
{
"isClone": false,
- "noteId": "7kZPMD0uFwkH",
+ "noteId": "es8OU2GuguFU",
"notePath": [
"pOsGYCXsbNQG",
"CdNpE2pqjmI6",
- "es8OU2GuguFU",
- "7kZPMD0uFwkH"
+ "yIhgI5H7A2Sm",
+ "es8OU2GuguFU"
],
- "title": "Downloading responses from Google Forms",
+ "title": "Examples",
"notePosition": 20,
"prefix": null,
"isExpanded": false,
@@ -14687,49 +14885,182 @@
{
"type": "label",
"name": "shareAlias",
- "value": "responses-from-google-forms",
+ "value": "examples",
"isInheritable": false,
"position": 20
- }
- ],
- "format": "markdown",
- "dataFileName": "Downloading responses from Goo.md",
- "attachments": []
- },
- {
- "isClone": false,
- "noteId": "DL92EjAaXT26",
- "notePath": [
- "pOsGYCXsbNQG",
- "CdNpE2pqjmI6",
- "es8OU2GuguFU",
- "DL92EjAaXT26"
- ],
- "title": "Using promoted attributes to configure scripts",
- "notePosition": 30,
- "prefix": null,
- "isExpanded": false,
- "type": "text",
- "mime": "text/html",
- "attributes": [
+ },
{
"type": "label",
- "name": "shareAlias",
- "value": "promoted-attributes-config",
+ "name": "iconClass",
+ "value": "bx bx-code-alt",
"isInheritable": false,
- "position": 20
+ "position": 30
}
],
"format": "markdown",
- "dataFileName": "Using promoted attributes to c.md",
- "attachments": [
+ "attachments": [],
+ "dirFileName": "Examples",
+ "children": [
{
- "attachmentId": "7P3jzVEa1mk7",
- "title": "image.png",
- "role": "image",
- "mime": "image/png",
- "position": 10,
- "dataFileName": "Using promoted attributes .png"
+ "isClone": false,
+ "noteId": "TjLYAo3JMO8X",
+ "notePath": [
+ "pOsGYCXsbNQG",
+ "CdNpE2pqjmI6",
+ "yIhgI5H7A2Sm",
+ "es8OU2GuguFU",
+ "TjLYAo3JMO8X"
+ ],
+ "title": "\"New Task\" launcher button",
+ "notePosition": 10,
+ "prefix": null,
+ "isExpanded": false,
+ "type": "text",
+ "mime": "text/html",
+ "attributes": [
+ {
+ "type": "relation",
+ "name": "internalLink",
+ "value": "xYjQUYhpbUEW",
+ "isInheritable": false,
+ "position": 10
+ },
+ {
+ "type": "relation",
+ "name": "internalLink",
+ "value": "xYmIYSP6wE3F",
+ "isInheritable": false,
+ "position": 20
+ },
+ {
+ "type": "relation",
+ "name": "internalLink",
+ "value": "6f9hih2hXXZk",
+ "isInheritable": false,
+ "position": 30
+ },
+ {
+ "type": "relation",
+ "name": "internalLink",
+ "value": "zEY4DaJG4YT5",
+ "isInheritable": false,
+ "position": 40
+ },
+ {
+ "type": "relation",
+ "name": "internalLink",
+ "value": "m1lbrzyKDaRB",
+ "isInheritable": false,
+ "position": 50
+ },
+ {
+ "type": "relation",
+ "name": "internalLink",
+ "value": "s8alTXmpFR61",
+ "isInheritable": false,
+ "position": 60
+ },
+ {
+ "type": "relation",
+ "name": "internalLink",
+ "value": "yIhgI5H7A2Sm",
+ "isInheritable": false,
+ "position": 70
+ },
+ {
+ "type": "label",
+ "name": "iconClass",
+ "value": "bx bx-task",
+ "isInheritable": false,
+ "position": 80
+ },
+ {
+ "type": "label",
+ "name": "shareAlias",
+ "value": "new-task-button",
+ "isInheritable": false,
+ "position": 90
+ }
+ ],
+ "format": "markdown",
+ "dataFileName": "New Task launcher button.md",
+ "attachments": [
+ {
+ "attachmentId": "9C2JA6tdtRpN",
+ "title": "image.png",
+ "role": "image",
+ "mime": "image/png",
+ "position": 10,
+ "dataFileName": "New Task launcher button_i.png"
+ }
+ ]
+ },
+ {
+ "isClone": false,
+ "noteId": "7kZPMD0uFwkH",
+ "notePath": [
+ "pOsGYCXsbNQG",
+ "CdNpE2pqjmI6",
+ "yIhgI5H7A2Sm",
+ "es8OU2GuguFU",
+ "7kZPMD0uFwkH"
+ ],
+ "title": "Downloading responses from Google Forms",
+ "notePosition": 20,
+ "prefix": null,
+ "isExpanded": false,
+ "type": "text",
+ "mime": "text/html",
+ "attributes": [
+ {
+ "type": "label",
+ "name": "shareAlias",
+ "value": "responses-from-google-forms",
+ "isInheritable": false,
+ "position": 20
+ }
+ ],
+ "format": "markdown",
+ "dataFileName": "Downloading responses from Goo.md",
+ "attachments": []
+ },
+ {
+ "isClone": false,
+ "noteId": "DL92EjAaXT26",
+ "notePath": [
+ "pOsGYCXsbNQG",
+ "CdNpE2pqjmI6",
+ "yIhgI5H7A2Sm",
+ "es8OU2GuguFU",
+ "DL92EjAaXT26"
+ ],
+ "title": "Using promoted attributes to configure scripts",
+ "notePosition": 30,
+ "prefix": null,
+ "isExpanded": false,
+ "type": "text",
+ "mime": "text/html",
+ "attributes": [
+ {
+ "type": "label",
+ "name": "shareAlias",
+ "value": "promoted-attributes-config",
+ "isInheritable": false,
+ "position": 20
+ }
+ ],
+ "format": "markdown",
+ "dataFileName": "Using promoted attributes to c.md",
+ "attachments": [
+ {
+ "attachmentId": "7P3jzVEa1mk7",
+ "title": "image.png",
+ "role": "image",
+ "mime": "image/png",
+ "position": 10,
+ "dataFileName": "Using promoted attributes .png"
+ }
+ ]
}
]
}
@@ -14737,162 +15068,76 @@
},
{
"isClone": false,
- "noteId": "GPERMystNGTB",
+ "noteId": "SPirpZypehBG",
"notePath": [
"pOsGYCXsbNQG",
"CdNpE2pqjmI6",
- "GPERMystNGTB"
+ "SPirpZypehBG"
],
- "title": "Events",
- "notePosition": 70,
+ "title": "Backend scripts",
+ "notePosition": 30,
"prefix": null,
"isExpanded": false,
"type": "text",
- "mime": "text/markdown",
+ "mime": "text/html",
"attributes": [
{
- "type": "relation",
- "name": "internalLink",
- "value": "CdNpE2pqjmI6",
- "isInheritable": false,
- "position": 10
- },
- {
- "type": "relation",
- "name": "internalLink",
- "value": "c5xB8m4g2IY6",
- "isInheritable": false,
- "position": 20
- },
- {
- "type": "relation",
- "name": "internalLink",
- "value": "zEY4DaJG4YT5",
+ "type": "label",
+ "name": "shareAlias",
+ "value": "backend-basics",
"isInheritable": false,
"position": 30
},
- {
- "type": "label",
- "name": "shareAlias",
- "value": "events",
- "isInheritable": false,
- "position": 10
- },
{
"type": "label",
"name": "iconClass",
- "value": "bx bx-rss",
+ "value": "bx bx-server",
"isInheritable": false,
- "position": 20
+ "position": 40
}
],
"format": "markdown",
- "dataFileName": "Events.md",
- "attachments": []
- },
- {
- "isClone": false,
- "noteId": "MgibgPcfeuGz",
- "notePath": [
- "pOsGYCXsbNQG",
- "CdNpE2pqjmI6",
- "MgibgPcfeuGz"
- ],
- "title": "Custom Widgets",
- "notePosition": 80,
- "prefix": null,
- "isExpanded": false,
- "type": "text",
- "mime": "text/markdown",
- "attributes": [
- {
- "type": "label",
- "name": "shareAlias",
- "value": "custom-widget",
- "isInheritable": false,
- "position": 20
- },
- {
- "type": "label",
- "name": "iconClass",
- "value": "bx bxs-widget",
- "isInheritable": false,
- "position": 30
- }
- ],
- "format": "markdown",
- "dataFileName": "Custom Widgets.md",
"attachments": [],
- "dirFileName": "Custom Widgets",
+ "dirFileName": "Backend scripts",
"children": [
{
"isClone": false,
- "noteId": "YNxAqkI5Kg1M",
+ "noteId": "fZ2IGYFXjkEy",
"notePath": [
"pOsGYCXsbNQG",
"CdNpE2pqjmI6",
- "MgibgPcfeuGz",
- "YNxAqkI5Kg1M"
+ "SPirpZypehBG",
+ "fZ2IGYFXjkEy"
],
- "title": "Word count widget",
+ "title": "Server-side imports",
"notePosition": 10,
"prefix": null,
"isExpanded": false,
"type": "text",
"mime": "text/html",
"attributes": [
- {
- "type": "relation",
- "name": "internalLink",
- "value": "6tZeKvSHEUiB",
- "isInheritable": false,
- "position": 10
- },
- {
- "type": "relation",
- "name": "internalLink",
- "value": "6f9hih2hXXZk",
- "isInheritable": false,
- "position": 20
- },
- {
- "type": "relation",
- "name": "internalLink",
- "value": "s8alTXmpFR61",
- "isInheritable": false,
- "position": 30
- },
{
"type": "label",
"name": "shareAlias",
- "value": "word-count",
+ "value": "server-imports",
"isInheritable": false,
- "position": 40
+ "position": 20
}
],
"format": "markdown",
- "dataFileName": "Word count widget.md",
- "attachments": [
- {
- "attachmentId": "JhM9NWfebzPi",
- "title": "image.png",
- "role": "image",
- "mime": "image/png",
- "position": 10,
- "dataFileName": "Word count widget_image.png"
- }
- ]
+ "dataFileName": "Server-side imports.md",
+ "attachments": []
},
{
"isClone": false,
- "noteId": "SynTBQiBsdYJ",
+ "noteId": "GPERMystNGTB",
"notePath": [
"pOsGYCXsbNQG",
"CdNpE2pqjmI6",
- "MgibgPcfeuGz",
- "SynTBQiBsdYJ"
+ "SPirpZypehBG",
+ "GPERMystNGTB"
],
- "title": "Widget Basics",
+ "title": "Events",
"notePosition": 20,
"prefix": null,
"isExpanded": false,
@@ -14902,34 +15147,41 @@
{
"type": "relation",
"name": "internalLink",
- "value": "zEY4DaJG4YT5",
+ "value": "CdNpE2pqjmI6",
"isInheritable": false,
"position": 10
},
{
"type": "relation",
"name": "internalLink",
- "value": "BFs8mudNFgCS",
+ "value": "c5xB8m4g2IY6",
"isInheritable": false,
"position": 20
},
{
"type": "relation",
"name": "internalLink",
- "value": "GLks18SNjxmC",
+ "value": "zEY4DaJG4YT5",
"isInheritable": false,
"position": 30
},
{
"type": "label",
"name": "shareAlias",
- "value": "widget-basics",
+ "value": "events",
+ "isInheritable": false,
+ "position": 10
+ },
+ {
+ "type": "label",
+ "name": "iconClass",
+ "value": "bx bx-rss",
"isInheritable": false,
"position": 20
}
],
"format": "markdown",
- "dataFileName": "Widget Basics.md",
+ "dataFileName": "Events.md",
"attachments": []
}
]
@@ -14943,7 +15195,7 @@
"GLks18SNjxmC"
],
"title": "Script API",
- "notePosition": 90,
+ "notePosition": 100,
"prefix": null,
"isExpanded": false,
"type": "text",
@@ -15106,7 +15358,7 @@
"vElnKeDNPSVl"
],
"title": "Logging",
- "notePosition": 100,
+ "notePosition": 110,
"prefix": null,
"isExpanded": false,
"type": "text",
diff --git a/docs/User Guide/User Guide/AI.md b/docs/User Guide/User Guide/AI.md
index d17f454c3..57302d77d 100644
--- a/docs/User Guide/User Guide/AI.md
+++ b/docs/User Guide/User Guide/AI.md
@@ -21,7 +21,7 @@ You will then need to set up the AI “provider” that you wish to use to creat
In the following example, we're going to use our self-hosted Ollama instance to create the embeddings for our Notes. You can see additional documentation about installing your own Ollama locally in Installing Ollama.
-To see what embedding models Ollama has available, you can check out [this search](https://ollama.com/search?c=embedding)on their website, and then `pull` whichever one you want to try out. As of 4/15/25, my personal favorite is `mxbai-embed-large`.
+To see what embedding models Ollama has available, you can check out [this search](https://ollama.com/search?c=embedding) on their website, and then `pull` whichever one you want to try out. A popular choice is `mxbai-embed-large`.
First, we'll need to select the Ollama provider from the tabs of providers, then we will enter in the Base URL for our Ollama. Since our Ollama is running on our local machine, our Base URL is `http://localhost:11434`. We will then hit the “refresh” button to have it fetch our models:
diff --git a/docs/User Guide/User Guide/Advanced Usage/Advanced Showcases/Task Manager.md b/docs/User Guide/User Guide/Advanced Usage/Advanced Showcases/Task Manager.md
index 20cf37c5e..13a4a5d94 100644
--- a/docs/User Guide/User Guide/Advanced Usage/Advanced Showcases/Task Manager.md
+++ b/docs/User Guide/User Guide/Advanced Usage/Advanced Showcases/Task Manager.md
@@ -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](../../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.
+Task template defines several [promoted attributes](../Attributes/Promoted%20Attributes.md) - todoDate, doneDate, tags, location. Importantly it also defines `~runOnAttributeChange` relation - [event](../../Scripting/Backend%20scripts/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
diff --git a/docs/User Guide/User Guide/Advanced Usage/Attributes.md b/docs/User Guide/User Guide/Advanced Usage/Attributes.md
index 1cfe040d8..89d397e33 100644
--- a/docs/User Guide/User Guide/Advanced Usage/Attributes.md
+++ b/docs/User Guide/User Guide/Advanced Usage/Attributes.md
@@ -3,14 +3,14 @@
In Trilium, attributes are key-value pairs assigned to notes, providing additional metadata or functionality. There are two primary types of attributes:
-1. Labels 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.
+1. Labels can be used for a variety of purposes, such as storing metadata or configuring the behavior of notes. Labels are also searchable, enhancing note retrieval.
For more information, including predefined labels, see Labels.
2. Relations 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 Relations.
-These attributes play a crucial role in organizing, categorising, and enhancing the functionality of notes.
+These attributes play a crucial role in organizing, categorizing, and enhancing the functionality of notes.
## Viewing the list of attributes
diff --git a/docs/User Guide/User Guide/Advanced Usage/Attributes/Labels.md b/docs/User Guide/User Guide/Advanced Usage/Attributes/Labels.md
index 1a90f31cb..cb68dab93 100644
--- a/docs/User Guide/User Guide/Advanced Usage/Attributes/Labels.md
+++ b/docs/User Guide/User Guide/Advanced Usage/Attributes/Labels.md
@@ -39,4 +39,4 @@ This is a list of labels that Trilium natively supports.
> [!TIP]
> Some labels presented here end with a `*`. That means that there are multiple labels with the same prefix, consult the specific page linked in the description of that label for more information.
-
Label
Description
disableVersioning
Disables automatic creation of Note Revisions for a particular note. Useful for e.g. large, but unimportant notes - e.g. large JS libraries used for scripting.
versioningLimit
Limits the maximum number of Note Revisions for a particular note, overriding the global settings.
calendarRoot
Marks the note which should be used as root for Day Notes. Only one should be marked as such.
archived
Hides notes from default search results and dialogs. Archived notes can optionally be hidden in the Note Tree.
excludeFromExport
Excludes this note and its children when exporting.
Scripts with this label won't be included into parent script execution.
sorted
Keeps child notes sorted by title alphabetically.
When given a value, it will sort by the value of another label instead. If one of the child notes doesn't have the specified label, the title will be used for them instead.
sortDirection
If sorted is applied, specifies the direction of the sort:
ASC, ascending (default)
DESC, descending
sortFoldersFirst
If sorted is applied, folders (notes with children) will be sorted as a group at the top, and the rest will be sorted.
top
If sorted is applied to the parent note, keeps given note on top in its parent.
hidePromotedAttributes
Hide Promoted Attributes on this note. Generally useful when defining inherited attributes, but the parent note doesn't need them.
readOnly
Marks a note to be always be read-only, if it's a supported note (text, code, mermaid).
Marks CSS notes which are loaded into the Trilium application and can thus be used to modify Trilium's looks. See Custom app-wide CSS for more info.
appTheme
Marks CSS notes which are full Trilium themes and are thus available in Trilium options. See Theme development for more information.
appThemeBase
Set to next, next-light, or next-dark to use the corresponding TriliumNext theme (auto, light or dark) as the base for a custom theme, instead of the legacy one. See Customize the Next theme for more information.
cssClass
Value of this label is then added as CSS class to the node representing given note in the Note Tree. This can be useful for advanced theming. Can be used in template notes.
iconClass
value of this label is added as a CSS class to the icon on the tree which can help visually distinguish the notes in the tree. Example might be bx bx-home - icons are taken from boxicons. Can be used in template notes.
pageSize
Specifies the number of items per page in Note List.
default inbox location for new notes - when you create a note using new note button in the sidebar, notes will be created as child notes in the note marked as with #inbox label.
Comma delimited names of relations which should be displayed/hidden in a Relation Map (both the note type and the Note Map (Link map, Tree map) general functionality).
titleTemplate
Default title of notes created as children of this note. This value is evaluated as a JavaScript string and thus can be enriched with dynamic content via the injected now and parentNote variables.
Examples:
\({parentNote.getLabel('authorName')}'s literary works
This note will appear in the selection of available template when creating new note. See Templates for more information.
toc
Controls the display of the Table of contents for a given note. #toc or #toc=show to always display the table of contents, #toc=false to always hide it.
color
defines color of the note in note tree, links etc. Use any valid CSS color value like 'red' or #a13d5f Note: this color may be automatically adjusted when displayed to ensure sufficient contrast with the background.
keyboardShortcut
Defines a keyboard shortcut which will immediately jump to this note. Example: 'ctrl+alt+e'. Requires frontend reload for the change to take effect.
keepCurrentHoisting
Opening this link won't change hoisting even if the note is not displayable in the current hoisted subtree.
executeButton
Title of the button which will execute the current code note
executeDescription
Longer description of the current code note displayed together with the execute button
excludeFromNoteMap
Notes with this label will be hidden from the Note Map.
newNotesOnTop
New notes will be created at the top of the parent note, not on the bottom.
Sets the view of child notes (e.g. grid or list). See Note List for more information.
\ No newline at end of file
+
Label
Description
disableVersioning
Disables automatic creation of Note Revisions for a particular note. Useful for e.g. large, but unimportant notes - e.g. large JS libraries used for scripting.
versioningLimit
Limits the maximum number of Note Revisions for a particular note, overriding the global settings.
calendarRoot
Marks the note which should be used as root for Day Notes. Only one should be marked as such.
archived
Hides notes from default search results and dialogs. Archived notes can optionally be hidden in the Note Tree.
excludeFromExport
Excludes this note and its children when exporting.
Scripts with this label won't be included into parent script execution.
sorted
Keeps child notes sorted by title alphabetically.
When given a value, it will sort by the value of another label instead. If one of the child notes doesn't have the specified label, the title will be used for them instead.
sortDirection
If sorted is applied, specifies the direction of the sort:
ASC, ascending (default)
DESC, descending
sortFoldersFirst
If sorted is applied, folders (notes with children) will be sorted as a group at the top, and the rest will be sorted.
top
If sorted is applied to the parent note, keeps given note on top in its parent.
hidePromotedAttributes
Hide Promoted Attributes on this note. Generally useful when defining inherited attributes, but the parent note doesn't need them.
readOnly
Marks a note to be always be read-only, if it's a supported note (text, code, mermaid).
Marks CSS notes which are loaded into the Trilium application and can thus be used to modify Trilium's looks. See Custom app-wide CSS for more info.
appTheme
Marks CSS notes which are full Trilium themes and are thus available in Trilium options. See Theme development for more information.
appThemeBase
Set to next, next-light, or next-dark to use the corresponding TriliumNext theme (auto, light or dark) as the base for a custom theme, instead of the legacy one. See Customize the Next theme for more information.
cssClass
Value of this label is then added as CSS class to the node representing given note in the Note Tree. This can be useful for advanced theming. Can be used in template notes.
iconClass
value of this label is added as a CSS class to the icon on the tree which can help visually distinguish the notes in the tree. Example might be bx bx-home - icons are taken from boxicons. Can be used in template notes.
pageSize
Specifies the number of items per page in Note List.
default inbox location for new notes - when you create a note using new note button in the sidebar, notes will be created as child notes in the note marked as with #inbox label.
Comma delimited names of relations which should be displayed/hidden in a Relation Map (both the note type and the Note Map (Link map, Tree map) general functionality).
titleTemplate
Default title of notes created as children of this note. This value is evaluated as a JavaScript string and thus can be enriched with dynamic content via the injected now and parentNote variables.
Examples:
\({parentNote.getLabel('authorName')}'s literary works
This note will appear in the selection of available template when creating new note. See Templates for more information.
toc
Controls the display of the Table of contents for a given note. #toc or #toc=show to always display the table of contents, #toc=false to always hide it.
color
defines color of the note in note tree, links etc. Use any valid CSS color value like 'red' or #a13d5f Note: this color may be automatically adjusted when displayed to ensure sufficient contrast with the background.
keyboardShortcut
Defines a keyboard shortcut which will immediately jump to this note. Example: 'ctrl+alt+e'. Requires frontend reload for the change to take effect.
keepCurrentHoisting
Opening this link won't change hoisting even if the note is not displayable in the current hoisted subtree.
executeButton
Title of the button which will execute the current code note
executeDescription
Longer description of the current code note displayed together with the execute button
excludeFromNoteMap
Notes with this label will be hidden from the Note Map.
newNotesOnTop
New notes will be created at the top of the parent note, not on the bottom.
Sets the view of child notes (e.g. grid or list). See Note List for more information.
\ No newline at end of file
diff --git a/docs/User Guide/User Guide/Advanced Usage/Attributes/Relations.md b/docs/User Guide/User Guide/Advanced Usage/Attributes/Relations.md
index 454e7d007..6e1e9aa1f 100644
--- a/docs/User Guide/User Guide/Advanced Usage/Attributes/Relations.md
+++ b/docs/User Guide/User Guide/Advanced Usage/Attributes/Relations.md
@@ -43,7 +43,7 @@ These relations are supported and used internally by Trilium.
| Label | Description |
| --- | --- |
-| `runOn*` | See Events |
+| `runOn*` | See Events |
| `template` | 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. |
| `inherit` | note's attributes will be inherited even without a parent-child relationship. See Templates for a similar concept. See Attribute Inheritance in the documentation. |
| `renderNote` | notes of type Render Note 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 |
diff --git a/docs/User Guide/User Guide/Advanced Usage/Custom Request Handler.md b/docs/User Guide/User Guide/Advanced Usage/Custom Request Handler.md
index 52991f136..6d2c1e734 100644
--- a/docs/User Guide/User Guide/Advanced Usage/Custom Request Handler.md
+++ b/docs/User Guide/User Guide/Advanced Usage/Custom Request Handler.md
@@ -14,7 +14,7 @@ const {secret, title, content} = req.body;
if (req.method == 'POST' && secret === 'secret-password') {
// notes must be saved somewhere in the tree hierarchy specified by a parent note.
// This is defined by a relation from this code note to the "target" parent note
- // alternetively you can just use constant noteId for simplicity (get that from "Note Info" dialog of the desired parent note)
+ // alternatively you can just use constant noteId for simplicity (get that from "Note Info" dialog of the desired parent note)
const targetParentNoteId = api.currentNote.getRelationValue('targetNote');
const {note} = api.createTextNote(targetParentNoteId, title, content);
@@ -37,7 +37,7 @@ This script note has also following two attributes:
Let's test this by using an HTTP client to send a request:
```
-POST http://my.trilium.org/custom/create-note
+POST http://your-trilium-server/custom/create-note
Content-Type: application/json
{
@@ -70,7 +70,7 @@ For more information, see [Custom Resource Providers](Custom%20Resource%20Provi
REST request paths often contain parameters in the URL, e.g.:
```
-http://my.trilium.org/custom/notes/123
+http://your-trilium-server/custom/notes/123
```
The last part is dynamic so the matching of the URL must also be dynamic - for this reason the matching is done with regular expressions. Following `customRequestHandler` value would match it:
@@ -85,4 +85,4 @@ Additionally, this also defines a matching group with the use of parenthesis whi
const noteId = api.pathParams[0];
```
-Often you also need query params (as in e.g. `http://my.trilium.org/custom/notes?noteId=123`), you can get those with standard express `req.query.noteId`.
\ No newline at end of file
+Often you also need query params (as in e.g. `http://your-trilium-server/custom/notes?noteId=123`), you can get those with standard express `req.query.noteId`.
\ No newline at end of file
diff --git a/docs/User Guide/User Guide/Advanced Usage/Nightly release.md b/docs/User Guide/User Guide/Advanced Usage/Nightly release.md
new file mode 100644
index 000000000..c9c2aac09
--- /dev/null
+++ b/docs/User Guide/User Guide/Advanced Usage/Nightly release.md
@@ -0,0 +1,34 @@
+# Nightly release
+Nightly releases are versions built every day, containing the latest improvements and bugfixes, directly from the main development branch. These versions are generally useful in preparation for a release, to ensure that there are no significant bugs that need to be addressed first, or they can be used to confirm whether a particular bug is fixed or feature is well implemented.
+
+## Regarding the stability
+
+Despite being on a development branch, generally the main branch is pretty stable since PRs are tested before they are merged. If you notice any issues, feel free to report them either via a ticket or via the Matrix.
+
+## Downloading the nightly release manually
+
+Go to [github.com/TriliumNext/Trilium/releases/tag/nightly](https://github.com/TriliumNext/Trilium/releases/tag/nightly) and look for the artifacts starting with `TriliumNotes-main`. Choose the appropriate one for your platform (e.g. `windows-x64.zip`).
+
+Depending on your use case, you can either test the portable version or even use the installer.
+
+> [!NOTE]
+> If you choose the installable version (e.g. the .exe on Windows), it will replace your stable installation.
+
+> [!IMPORTANT]
+> By default, the nightly uses the same database as the production version. Generally you could easily downgrade if needed. However, if there are changes to the database or sync version, it will not be possible to downgrade without having to restore from a backup.
+
+## Automatically download and install the latest nightly
+
+This is pretty useful if you are a beta tester that wants to periodically update their version:
+
+On Ubuntu:
+
+```
+#!/usr/bin/env bash
+
+name=TriliumNotes-linux-x64-nightly.deb
+rm -f $name*
+wget https://github.com/TriliumNext/Trilium/releases/download/nightly/$name
+sudo apt-get install ./$name
+rm $name
+```
\ No newline at end of file
diff --git a/docs/Developer Guide/Developer Guide/Development and architecture/Safe mode.md b/docs/User Guide/User Guide/Advanced Usage/Safe mode.md
similarity index 100%
rename from docs/Developer Guide/Developer Guide/Development and architecture/Safe mode.md
rename to docs/User Guide/User Guide/Advanced Usage/Safe mode.md
diff --git a/docs/User Guide/User Guide/Basic Concepts and Features/Navigation/Search.md b/docs/User Guide/User Guide/Basic Concepts and Features/Navigation/Search.md
index 70dd3632a..36aebff51 100644
--- a/docs/User Guide/User Guide/Basic Concepts and Features/Navigation/Search.md
+++ b/docs/User Guide/User Guide/Basic Concepts and Features/Navigation/Search.md
@@ -13,7 +13,7 @@ Note search enables you to find notes by searching for text in the title, conten
To search for notes, click on the magnifying glass icon on the toolbar or press the keyboard [shortcut](../Keyboard%20Shortcuts.md).
1. Set the text to search for in the _Search string_ field.
- 1. Apart from searching for words ad-literam, there is also the possibility to search for attributes or properties of notes.
+ 1. Apart from searching for words literally, there is also the possibility to search for attributes or properties of notes.
2. See the examples below for more information.
2. To limit the search to a note and its sub-children, set a note in _Ancestor_.
1. This value is also pre-filled if the search is triggered from a [hoisted note](Note%20Hoisting.md) or a [workspace](Workspaces.md).
diff --git a/docs/User Guide/User Guide/Basic Concepts and Features/Notes.md b/docs/User Guide/User Guide/Basic Concepts and Features/Notes.md
index 8cb069e53..d461a3506 100644
--- a/docs/User Guide/User Guide/Basic Concepts and Features/Notes.md
+++ b/docs/User Guide/User Guide/Basic Concepts and Features/Notes.md
@@ -25,7 +25,7 @@ When you delete a note in Trilium, it is actually only marked for deletion (soft
Within (by default) 7 days, it is possible to undelete these soft-deleted notes - open the Recent Changes dialog, and you will see a list of all modified notes including the deleted ones. Notes available for undeletion have a link to do so. This is kind of "trash can" functionality known from e.g. Windows.
-Clicking an undelete will recover the note, it's content and attributes - note should be just as before being deleted. This action will also undelete note's children which have been deleted in the same action.
+Clicking an undelete will recover the note, its content and attributes - note should be just as before being deleted. This action will also undelete note's children which have been deleted in the same action.
To be able to undelete a note, it is necessary that deleted note's parent must be undeleted (otherwise there's no place where we can undelete it to). This might become a problem when you delete more notes in succession - the solution is then undelete in the reverse order of your deletion.
diff --git a/docs/User Guide/User Guide/Basic Concepts and Features/UI Elements/Launch Bar.md b/docs/User Guide/User Guide/Basic Concepts and Features/UI Elements/Launch Bar.md
index 795e02602..d0ba7aecf 100644
--- a/docs/User Guide/User Guide/Basic Concepts and Features/UI Elements/Launch Bar.md
+++ b/docs/User Guide/User Guide/Basic Concepts and Features/UI Elements/Launch Bar.md
@@ -56,7 +56,7 @@ Right click either the _Available launchers_ or _Visible launchers_ sections and
2. Optionally, set a `keyboardShortcut` to trigger the launcher.
3. **Custom Widget**
- Allows defining a custom widget to be rendered inside the launcher. See [Widget Basics](../../Scripting/Custom%20Widgets/Widget%20Basics.md) for more information.
+ Allows defining a custom widget to be rendered inside the launcher. See [Widget Basics](../../Scripting/Frontend%20Basics/Custom%20Widgets/Widget%20Basics.md) for more information.
4. **Spacers**
Launchers that create some distance between other launchers for better visual distinction.
diff --git a/docs/User Guide/User Guide/Basic Concepts and Features/UI Elements/Ribbon.md b/docs/User Guide/User Guide/Basic Concepts and Features/UI Elements/Ribbon.md
index 8fd7e37d2..5cbfc0ff3 100644
--- a/docs/User Guide/User Guide/Basic Concepts and Features/UI Elements/Ribbon.md
+++ b/docs/User Guide/User Guide/Basic Concepts and Features/UI Elements/Ribbon.md
@@ -20,7 +20,7 @@ If you are using the _Fixed_ formatting toolbar, all the formatting buttons for
* As a more advanced use, it's possible to change the note type in order to modify the [source code](../../Advanced%20Usage/Note%20source.md) of a note.
* _**Protect the note**_ toggles whether the current note is encrypted and accessible only by entering the protected session. See [Protected Notes](../Notes/Protected%20Notes.md) for more information.
* _**Editable**_ changes whether the current note:
- * Enters [read-only mode](../Notes/Read-Only%20Notes.md) automatically if the note is too big (default behaviour).
+ * Enters [read-only mode](../Notes/Read-Only%20Notes.md) automatically if the note is too big (default behavior).
* Is always in read-only mode (however it can still be edited temporarily).
* Is always editable, regardless of its size.
* _**Bookmark**_ toggles the display of the current note into the [Launch Bar](Launch%20Bar.md) for easy access. See [Bookmarks](../Navigation/Bookmarks.md) for more information.
diff --git a/docs/User Guide/User Guide/Collections.md b/docs/User Guide/User Guide/Collections.md
index b97b4d952..3a9fc9728 100644
--- a/docs/User Guide/User Guide/Collections.md
+++ b/docs/User Guide/User Guide/Collections.md
@@ -1,5 +1,5 @@
# Collections
-Collections are a unique type of notes that don't have a content, but instead display its child notes in various presentation methods.
+Collections are a unique type of note that don't have content, but instead display their child notes in various presentation methods.
## Main collections
@@ -28,7 +28,7 @@ To change the configuration of a collection or even switch to a different collec
## Archived notes
-By default, [archived notes](Basic%20Concepts%20and%20Features/Notes/Archived%20Notes.md) will not be shown in collections. This behaviour can be changed by going to _Collection Properties_ in the Ribbon and checking _Show archived notes_.
+By default, [archived notes](Basic%20Concepts%20and%20Features/Notes/Archived%20Notes.md) will not be shown in collections. This behavior can be changed by going to _Collection Properties_ in the Ribbon and checking _Show archived notes_.
Archived notes will be generally indicated by being greyed out as opposed to the normal ones.
diff --git a/docs/User Guide/User Guide/Installation & Setup/Desktop Installation.md b/docs/User Guide/User Guide/Installation & Setup/Desktop Installation.md
index c96a1e1cd..c8eb58ee5 100644
--- a/docs/User Guide/User Guide/Installation & Setup/Desktop Installation.md
+++ b/docs/User Guide/User Guide/Installation & Setup/Desktop Installation.md
@@ -16,4 +16,4 @@ Trilium offers various startup scripts to customize your experience:
## Synchronization
-For Trilium desktp users who wish to synchronize their data with a server instance, refer to the Synchronization guide for detailed instructions.
\ No newline at end of file
+For Trilium desktop users who wish to synchronize their data with a server instance, refer to the Synchronization guide for detailed instructions.
\ No newline at end of file
diff --git a/docs/Developer Guide/Developer Guide/Building and deployment/Nix flake.md b/docs/User Guide/User Guide/Installation & Setup/Desktop Installation/Nix flake.md
similarity index 100%
rename from docs/Developer Guide/Developer Guide/Building and deployment/Nix flake.md
rename to docs/User Guide/User Guide/Installation & Setup/Desktop Installation/Nix flake.md
diff --git a/docs/User Guide/User Guide/Installation & Setup/Server Installation.md b/docs/User Guide/User Guide/Installation & Setup/Server Installation.md
index eb0054c91..ceae67f84 100644
--- a/docs/User Guide/User Guide/Installation & Setup/Server Installation.md
+++ b/docs/User Guide/User Guide/Installation & Setup/Server Installation.md
@@ -32,7 +32,7 @@ export TRILIUM_DATA_DIR=/home/myuser/data/my-trilium-data
### Disabling / Modifying the Upload Limit
-If you're running into the 250MB limit imposed on the server by default, and you'd like to increase the upload limit, you can set the `TRILIUM_NO_UPLOAD_LIMIT` environment variable to `true` disable it completely:
+If you're running into the 250MB limit imposed on the server by default, and you'd like to increase the upload limit, you can set the `TRILIUM_NO_UPLOAD_LIMIT` environment variable to `true` to disable it completely:
```
export TRILIUM_NO_UPLOAD_LIMIT=true
diff --git a/docs/User Guide/User Guide/Installation & Setup/Server Installation/Nix flake.clone.md b/docs/User Guide/User Guide/Installation & Setup/Server Installation/Nix flake.clone.md
new file mode 100644
index 000000000..1ea9ad997
--- /dev/null
+++ b/docs/User Guide/User Guide/Installation & Setup/Server Installation/Nix flake.clone.md
@@ -0,0 +1,2 @@
+# Nix flake
+This is a clone of a note. Go to its [primary location](../Desktop%20Installation/Nix%20flake.md).
\ No newline at end of file
diff --git a/docs/User Guide/User Guide/Note Types.md b/docs/User Guide/User Guide/Note Types.md
index 2e0540dcf..27958b4ab 100644
--- a/docs/User Guide/User Guide/Note Types.md
+++ b/docs/User Guide/User Guide/Note Types.md
@@ -1,5 +1,5 @@
# Note Types
-One core features of Trilium is that it supports multiple types of notes, depending on the need.
+One of the core features of Trilium is that it supports multiple types of notes, depending on the need.
## Creating a new note with a different type via the note tree
diff --git a/docs/User Guide/User Guide/Scripting.md b/docs/User Guide/User Guide/Scripting.md
index f5724f8a3..b7fad64dc 100644
--- a/docs/User Guide/User Guide/Scripting.md
+++ b/docs/User Guide/User Guide/Scripting.md
@@ -1,18 +1,18 @@
# Scripting
Trilium supports creating Code notes, i.e. notes which allow you to store some programming code and highlight it. Special case is JavaScript code notes which can also be executed inside Trilium which can in conjunction with Script API provide extra functionality.
-## Scripting
+## Architecture Overview
To go further I must explain basic architecture of Trilium - in its essence it is a classic web application - it has these two main components:
* frontend running in the browser (using HTML, CSS, JavaScript) - this is mainly used to interact with the user, display notes etc.
* backend running JavaScript code in node.js runtime - this is responsible for e.g. storing notes, encrypting them etc.
-So we have frontend and backend, each with their own set of responsibilities, but their common feature is that they both run JavaScript code. Add to this the fact, that we're able to create JavaScript \[\[code notes\]\] and we're onto something.
+So we have frontend and backend, each with their own set of responsibilities, but their common feature is that they both run JavaScript code. Add to this the fact, that we're able to create JavaScript code notes and we're onto something.
## Use cases
-* "New Task" launcher button
+* "New Task" launcher button
## Action handler
@@ -34,7 +34,7 @@ You can see more scripting with explanation in Events.
+See Events.
## Script API
diff --git a/docs/User Guide/User Guide/Scripting/Events.md b/docs/User Guide/User Guide/Scripting/Backend scripts/Events.md
similarity index 78%
rename from docs/User Guide/User Guide/Scripting/Events.md
rename to docs/User Guide/User Guide/Scripting/Backend scripts/Events.md
index 6dbeeeba6..227acd5f1 100644
--- a/docs/User Guide/User Guide/Scripting/Events.md
+++ b/docs/User Guide/User Guide/Scripting/Backend scripts/Events.md
@@ -1,15 +1,15 @@
# Events
-[Script](../Scripting.md) notes can be triggered by events. Note that these are backend events and thus relation need to point to the "JS backend" code note.
+[Script](../../Scripting.md) notes can be triggered by events. Note that these are backend events and thus relation need to point to the "JS backend" code note.
## Global events
Global events are attached to the script note via label. Simply create e.g. "run" label with some of these values and script note will be executed once the event occurs.
-
Label
Description
run
Defines on which events script should run. Possible values are:
frontendStartup - when Trilium frontend starts up (or is refreshed), but not on mobile.
mobileStartup - when Trilium frontend starts up (or is refreshed), on mobile.
backendStartup - when Trilium backend starts up
hourly - run once an hour. You can use additional label runAtHour to specify at which hour, on the back-end.
daily - run once a day, on the back-end
runOnInstance
Specifies that the script should only run on a particular Trilium instance.
runAtHour
On which hour should this run. Should be used together with #run=hourly. Can be defined multiple times for more runs during the day.
+
Label
Description
run
Defines on which events script should run. Possible values are:
frontendStartup - when Trilium frontend starts up (or is refreshed), but not on mobile.
mobileStartup - when Trilium frontend starts up (or is refreshed), on mobile.
backendStartup - when Trilium backend starts up
hourly - run once an hour. You can use additional label runAtHour to specify at which hour, on the back-end.
daily - run once a day, on the back-end
runOnInstance
Specifies that the script should only run on a particular Trilium instance.
runAtHour
On which hour should this run. Should be used together with #run=hourly. Can be defined multiple times for more runs during the day.
## Entity events
-Other events are bound to some entity, these are defined as [relations](../Advanced%20Usage/Attributes.md) - meaning that script is triggered only if note has this script attached to it through relations (or it can inherit it).
+Other events are bound to some entity, these are defined as [relations](../../Advanced%20Usage/Attributes.md) - meaning that script is triggered only if note has this script attached to it through relations (or it can inherit it).
| Relation | Description |
| --- | --- |
diff --git a/docs/User Guide/User Guide/Scripting/Backend scripts/Server-side imports.md b/docs/User Guide/User Guide/Scripting/Backend scripts/Server-side imports.md
new file mode 100644
index 000000000..ddc795aa0
--- /dev/null
+++ b/docs/User Guide/User Guide/Scripting/Backend scripts/Server-side imports.md
@@ -0,0 +1,11 @@
+# Server-side imports
+Older versions of Trilium Notes allowed the use of Common.js module imports inside backend scripts, such as:
+
+```
+const isBetween = require('dayjs/plugin/isBetween')
+api.dayjs.extend(isBetween)
+```
+
+For newer versions, Node.js imports are **not officially supported anymore**, since we've added a bundler which makes it more difficult to reuse dependencies.
+
+Theoretically it's still possible to use imports by manually setting up a `node_modules` in the server directory via `npm` or `pnpm`.
\ No newline at end of file
diff --git a/docs/User Guide/User Guide/Scripting/Examples/New Task launcher button.md b/docs/User Guide/User Guide/Scripting/Examples/New Task launcher button.md
deleted file mode 100644
index 85e834b8b..000000000
--- a/docs/User Guide/User Guide/Scripting/Examples/New Task launcher button.md
+++ /dev/null
@@ -1,47 +0,0 @@
-# "New Task" launcher button
-In this example we are going to extend the functionality of Task Manager showcase (which comes by default with Trilium) by adding a button in the Launch Bar () to create a new task automatically and open it.
-
-## Creating the note
-
-1. First, create a new Code note type with the _JS frontend_ language.
-2. Define the `#run=frontendStartup` label in Attributes.
-
-## Content of the script
-
-Copy-paste the following script:
-
-```javascript
-api.addButtonToToolbar({
- title: "New task",
- icon: "task",
- shortcut: "alt+n",
- action: async () => {
- const taskNoteId = await api.runOnBackend(() => {
- const todoRootNote = api.getNoteWithLabel("taskTodoRoot");
- const resp = api.createTextNote(todoRootNote.noteId, "New task", "")
- return resp.note.noteId;
- });
-
- await api.waitUntilSynced();
- await api.activateNewNote(taskNoteId);
- }
-});
-```
-
-## Testing the functionality
-
-Since we set the script to be run on start-up, all we need to do is to [refresh the application](../../Troubleshooting/Refreshing%20the%20application.md).
-
-## Understanding how the script works
-
-
Here we identify a note with the label#taskTodoRoot. This is how the Task Manager showcase knows where to place all the different tasks.
Normally this might return a null value if no such note could be identified, but error handling is outside the scope of this example.
const resp = api.createTextNote(todoRootNote.noteId, "New task", "")
We create a new child note within the to-do root note (first argument) with the title “New task" (second argument) and no content by default (third argument).
await api.waitUntilSynced();
Back on the client, since we created a new note on the server, we now need to wait for the change to be reflected in the client.
await api.activateNewNote(taskNoteId);
Since we know the ID of the newly created note, all we have to do now is to show this note to the user.
\ No newline at end of file
diff --git a/docs/User Guide/User Guide/Scripting/Frontend Basics.md b/docs/User Guide/User Guide/Scripting/Frontend Basics.md
index 2557deed7..13c47823d 100644
--- a/docs/User Guide/User Guide/Scripting/Frontend Basics.md
+++ b/docs/User Guide/User Guide/Scripting/Frontend Basics.md
@@ -54,4 +54,4 @@ Conversely to scripts, widgets do have some specific requirements in order to wo
### Tutorial
-For more information on building widgets, take a look at [Widget Basics](Custom%20Widgets/Widget%20Basics.md).
\ No newline at end of file
+For more information on building widgets, take a look at [Widget Basics](Frontend%20Basics/Custom%20Widgets/Widget%20Basics.md).
\ No newline at end of file
diff --git a/docs/User Guide/User Guide/Scripting/Custom Widgets.md b/docs/User Guide/User Guide/Scripting/Frontend Basics/Custom Widgets.md
similarity index 100%
rename from docs/User Guide/User Guide/Scripting/Custom Widgets.md
rename to docs/User Guide/User Guide/Scripting/Frontend Basics/Custom Widgets.md
diff --git a/docs/Developer Guide/Developer Guide/Old documentation/Scripting/Widgets/CSS.md b/docs/User Guide/User Guide/Scripting/Frontend Basics/Custom Widgets/CSS.md
similarity index 100%
rename from docs/Developer Guide/Developer Guide/Old documentation/Scripting/Widgets/CSS.md
rename to docs/User Guide/User Guide/Scripting/Frontend Basics/Custom Widgets/CSS.md
diff --git a/docs/Developer Guide/Developer Guide/Old documentation/Scripting/Widgets/Right pane widget.md b/docs/User Guide/User Guide/Scripting/Frontend Basics/Custom Widgets/Right pane widget.md
similarity index 100%
rename from docs/Developer Guide/Developer Guide/Old documentation/Scripting/Widgets/Right pane widget.md
rename to docs/User Guide/User Guide/Scripting/Frontend Basics/Custom Widgets/Right pane widget.md
diff --git a/docs/User Guide/User Guide/Scripting/Custom Widgets/Widget Basics.md b/docs/User Guide/User Guide/Scripting/Frontend Basics/Custom Widgets/Widget Basics.md
similarity index 75%
rename from docs/User Guide/User Guide/Scripting/Custom Widgets/Widget Basics.md
rename to docs/User Guide/User Guide/Scripting/Frontend Basics/Custom Widgets/Widget Basics.md
index b6e2a95ca..474cba983 100644
--- a/docs/User Guide/User Guide/Scripting/Custom Widgets/Widget Basics.md
+++ b/docs/User Guide/User Guide/Scripting/Frontend Basics/Custom Widgets/Widget Basics.md
@@ -22,10 +22,10 @@ module.exports = new MyWidget();
To implement this widget:
1. Create a new `JS Frontend` note in Trilium and paste in the code above.
-2. Assign the `#widget` [attribute](../../Advanced%20Usage/Attributes.md) to the [note](../../Basic%20Concepts%20and%20Features/Notes.md).
+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 (`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).
### Step 2: Adding an UI Element
@@ -85,7 +85,7 @@ After reloading Trilium, the button should now appear at the bottom left of the
### Step 4: Adding User Interaction
-Let’s make the button interactive by showing a message when it’s clicked. We'll use the `api.showMessage` method from the [Script API](../Script%20API.md).
+Let’s make the button interactive by showing a message when it’s clicked. We'll use the `api.showMessage` method from the [Script API](../../Script%20API.md).
```
class MyWidget extends api.BasicWidget {
@@ -108,4 +108,11 @@ class MyWidget extends api.BasicWidget {
module.exports = new MyWidget();
```
-Reload the application one last time. When you click the button, a "Hello World!" message should appear, confirming that your widget is fully functional.
\ No newline at end of file
+`parentWidget()` can be given the following values:
+
+* `left-pane` - This renders the widget on the left side of the screen where the note tree lives.
+* `center-pane` - This renders the widget in the center of the layout in the same location that notes and splits appear.
+* `note-detail-pane` - This renders the widget _with_ the note in the center pane. This means it can appear multiple times with splits.
+* `right-pane` - This renders the widget to the right of any opened notes.
+
+[Reload](../../../Troubleshooting/Refreshing%20the%20application.md) the application one last time. When you click the button, a "Hello World!" message should appear, confirming that your widget is fully functional.
\ No newline at end of file
diff --git a/docs/User Guide/User Guide/Scripting/Custom Widgets/Word count widget.md b/docs/User Guide/User Guide/Scripting/Frontend Basics/Custom Widgets/Word count widget.md
similarity index 88%
rename from docs/User Guide/User Guide/Scripting/Custom Widgets/Word count widget.md
rename to docs/User Guide/User Guide/Scripting/Frontend Basics/Custom Widgets/Word count widget.md
index ad8c1c351..8b6be5684 100644
--- a/docs/User Guide/User Guide/Scripting/Custom Widgets/Word count widget.md
+++ b/docs/User Guide/User Guide/Scripting/Frontend Basics/Custom Widgets/Word count widget.md
@@ -1,8 +1,8 @@
# Word count widget
> [!TIP]
-> This widget is also present in new installations in the Demo Notes.
+> This widget is also present in new installations in the Demo Notes.
-Create a Code note of type JS frontend and **give it a** `#widget` **label**.
+Create a Code note of type JS frontend and **give it a** `#widget` **label**.
```
/*
@@ -82,7 +82,7 @@ class WordCountWidget extends api.NoteContextAwareWidget {
module.exports = new WordCountWidget();
```
-After you make changes it is necessary to [restart Trilium](../../Troubleshooting/Refreshing%20the%20application.md) so that the layout can be rebuilt.
+After you make changes it is necessary to [restart Trilium](../../../Troubleshooting/Refreshing%20the%20application.md) so that the layout can be rebuilt.
At the bottom of the note you can see the resulting widget:
diff --git a/docs/User Guide/User Guide/Scripting/Custom Widgets/Word count widget_image.png b/docs/User Guide/User Guide/Scripting/Frontend Basics/Custom Widgets/Word count widget_image.png
similarity index 100%
rename from docs/User Guide/User Guide/Scripting/Custom Widgets/Word count widget_image.png
rename to docs/User Guide/User Guide/Scripting/Frontend Basics/Custom Widgets/Word count widget_image.png
diff --git a/docs/User Guide/User Guide/Scripting/Examples/Downloading responses from Goo.md b/docs/User Guide/User Guide/Scripting/Frontend Basics/Examples/Downloading responses from Goo.md
similarity index 100%
rename from docs/User Guide/User Guide/Scripting/Examples/Downloading responses from Goo.md
rename to docs/User Guide/User Guide/Scripting/Frontend Basics/Examples/Downloading responses from Goo.md
diff --git a/docs/User Guide/User Guide/Scripting/Frontend Basics/Examples/New Task launcher button.md b/docs/User Guide/User Guide/Scripting/Frontend Basics/Examples/New Task launcher button.md
new file mode 100644
index 000000000..6740c047f
--- /dev/null
+++ b/docs/User Guide/User Guide/Scripting/Frontend Basics/Examples/New Task launcher button.md
@@ -0,0 +1,47 @@
+# "New Task" launcher button
+In this example we are going to extend the functionality of Task Manager showcase (which comes by default with Trilium) by adding a button in the Launch Bar () to create a new task automatically and open it.
+
+## Creating the note
+
+1. First, create a new Code note type with the _JS frontend_ language.
+2. Define the `#run=frontendStartup` label in Attributes.
+
+## Content of the script
+
+Copy-paste the following script:
+
+```javascript
+api.addButtonToToolbar({
+ title: "New task",
+ icon: "task",
+ shortcut: "alt+n",
+ action: async () => {
+ const taskNoteId = await api.runOnBackend(() => {
+ const todoRootNote = api.getNoteWithLabel("taskTodoRoot");
+ const resp = api.createTextNote(todoRootNote.noteId, "New task", "")
+ return resp.note.noteId;
+ });
+
+ await api.waitUntilSynced();
+ await api.activateNewNote(taskNoteId);
+ }
+});
+```
+
+## Testing the functionality
+
+Since we set the script to be run on start-up, all we need to do is to [refresh the application](../../../Troubleshooting/Refreshing%20the%20application.md).
+
+## Understanding how the script works
+
+
Here we identify a note with the label#taskTodoRoot. This is how the Task Manager showcase knows where to place all the different tasks.
Normally this might return a null value if no such note could be identified, but error handling is outside the scope of this example.
const resp = api.createTextNote(todoRootNote.noteId, "New task", "")
We create a new child note within the to-do root note (first argument) with the title “New task" (second argument) and no content by default (third argument).
await api.waitUntilSynced();
Back on the client, since we created a new note on the server, we now need to wait for the change to be reflected in the client.
await api.activateNewNote(taskNoteId);
Since we know the ID of the newly created note, all we have to do now is to show this note to the user.
\ No newline at end of file
diff --git a/docs/User Guide/User Guide/Scripting/Examples/New Task launcher button_i.png b/docs/User Guide/User Guide/Scripting/Frontend Basics/Examples/New Task launcher button_i.png
similarity index 100%
rename from docs/User Guide/User Guide/Scripting/Examples/New Task launcher button_i.png
rename to docs/User Guide/User Guide/Scripting/Frontend Basics/Examples/New Task launcher button_i.png
diff --git a/docs/User Guide/User Guide/Scripting/Examples/Using promoted attributes .png b/docs/User Guide/User Guide/Scripting/Frontend Basics/Examples/Using promoted attributes .png
similarity index 100%
rename from docs/User Guide/User Guide/Scripting/Examples/Using promoted attributes .png
rename to docs/User Guide/User Guide/Scripting/Frontend Basics/Examples/Using promoted attributes .png
diff --git a/docs/User Guide/User Guide/Scripting/Examples/Using promoted attributes to c.md b/docs/User Guide/User Guide/Scripting/Frontend Basics/Examples/Using promoted attributes to c.md
similarity index 100%
rename from docs/User Guide/User Guide/Scripting/Examples/Using promoted attributes to c.md
rename to docs/User Guide/User Guide/Scripting/Frontend Basics/Examples/Using promoted attributes to c.md
diff --git a/docs/User Guide/User Guide/Troubleshooting.md b/docs/User Guide/User Guide/Troubleshooting.md
index f439d1185..3be0af47f 100644
--- a/docs/User Guide/User Guide/Troubleshooting.md
+++ b/docs/User Guide/User Guide/Troubleshooting.md
@@ -1,5 +1,5 @@
# Troubleshooting
-As Trilium is currently in beta, encountering bugs is to be expected.
+While Trilium is actively maintained and stable, encountering bugs is possible.
## General Quick Fix
@@ -21,7 +21,7 @@ TRILIUM_START_NOTE_ID=root ./trilium
## Broken Script Prevents Application Startup
-If a custom script causes Triliumto crash, and it is set as a startup script or in an active [custom widget](Scripting/Custom%20Widgets.md), start Triliumin "safe mode" to prevent any custom scripts from executing:
+If a custom script causes Trilium to crash, and it is set as a startup script or in an active [custom widget](Scripting/Frontend%20Basics/Custom%20Widgets.md), start Triliumin "safe mode" to prevent any custom scripts from executing:
```
TRILIUM_SAFE_MODE=true ./trilium
diff --git a/docs/index.md b/docs/index.md
index 5bf104216..33bbff30d 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -21,27 +21,27 @@ Trilium Notes is a powerful, feature-rich note-taking application designed for b