Merge remote-tracking branch 'origin/main' into patch-2

This commit is contained in:
Elian Doran
2025-11-17 08:20:18 +02:00
11 changed files with 91 additions and 45 deletions

View File

@@ -55,7 +55,7 @@
"mark.js": "8.11.1",
"marked": "16.4.2",
"mermaid": "11.12.1",
"mind-elixir": "5.3.5",
"mind-elixir": "5.3.6",
"normalize.css": "8.0.1",
"panzoom": "9.4.3",
"preact": "10.27.2",

View File

@@ -91,6 +91,7 @@ export default function CalendarView({ note, noteIds }: ViewModeProps<CalendarVi
const [ hideWeekends ] = useNoteLabelBoolean(note, "calendar:hideWeekends");
const [ weekNumbers ] = useNoteLabelBoolean(note, "calendar:weekNumbers");
const [ calendarView, setCalendarView ] = useNoteLabel(note, "calendar:view");
const [ initialDate ] = useNoteLabel(note, "calendar:initialDate");
const initialView = useRef(calendarView);
const viewSpacedUpdate = useSpacedUpdate(() => setCalendarView(initialView.current));
useResizeObserver(containerRef, () => calendarRef.current?.updateSize());
@@ -134,6 +135,7 @@ export default function CalendarView({ note, noteIds }: ViewModeProps<CalendarVi
height="90%"
nowIndicator
handleWindowResize={false}
initialDate={initialDate || undefined}
locale={locale}
{...editingProps}
eventDidMount={eventDidMount}

View File

@@ -112,6 +112,12 @@
<td>When present (regardless of value), it will show the number of the week
on the calendar.</td>
</tr>
<tr>
<td><code>#calendar:initialDate</code>
</td>
<td>Change the date the calendar opens on. When not present, the calendar
opens on the current date.</td>
</tr>
<tr>
<td><code>#calendar:view</code>
</td>

View File

@@ -39,8 +39,8 @@
setup is suitable for testing or when using a proxy server like Nginx or
Apache.</p><pre><code class="language-text-x-trilium-auto">sudo docker run -t -i -p 127.0.0.1:8080:8080 -v ~/trilium-data:/home/node/trilium-data triliumnext/trilium:[VERSION]</code></pre>
<ol>
<li>Verify the container is running using <code>docker ps</code>.</li>
<li>Access Trilium via a web browser at <code>127.0.0.1:8080</code>.</li>
<li data-list-item-id="e80c579b4a0bc1835053edc0db1cf6a02">Verify the container is running using <code>docker ps</code>.</li>
<li data-list-item-id="eede157791e4c575365d2062fa585510a">Access Trilium via a web browser at <code>127.0.0.1:8080</code>.</li>
</ol>
<h4>Local Network Access</h4>
<p>To make the container accessible only on your local network, first create
@@ -65,9 +65,9 @@ docker inspect [container_name]</code></pre>
is the container's path. More details can be found in the <a href="https://docs.docker.com/storage/volumes/">Docker Volumes Documentation</a>.</p>
<h2>Reverse Proxy</h2>
<ol>
<li><a href="#root/_help_ud6MShXL4WpO">Nginx</a>
<li data-list-item-id="ec4c3fc06ee11be205d718f2e7420ddc4"><a href="#root/_help_ud6MShXL4WpO">Nginx</a>
</li>
<li><a href="#root/_help_fDLvzOx29Pfg">Apache</a>
<li data-list-item-id="e5fab2239f11e7b5ca2f4635a953b6468"><a href="#root/_help_fDLvzOx29Pfg">Apache</a>
</li>
</ol>
<h3>Note on --user Directive</h3>
@@ -101,10 +101,12 @@ docker pull triliumnext/trilium:rootless-alpine</code></pre>
<h3>How It Works</h3>
<p>The rootless Trilium image:</p>
<ol>
<li>Creates a non-root user (<code>trilium</code>) during build time</li>
<li>Configures the application to run as this non-root user</li>
<li>Allows runtime customization of the user's UID/GID via Docker's <code>--user</code> flag</li>
<li>Does not require a separate Docker <code>entrypoint</code> script</li>
<li data-list-item-id="e90c32e9ff9c613ffb612b14de8c4e487">Creates a non-root user (<code>trilium</code>) during build time</li>
<li
data-list-item-id="eea8c80200f4f4d3fc99ee61ebd28ef90">Configures the application to run as this non-root user</li>
<li data-list-item-id="e8898c3bf906b0fa681dd37014e21c135">Allows runtime customization of the user's UID/GID via Docker's <code>--user</code> flag</li>
<li
data-list-item-id="e7b4f254dfd0b53084245c3a5f8aff9e9">Does not require a separate Docker <code>entrypoint</code> script</li>
</ol>
<h3>Usage</h3>
<h4><strong>Using docker-compose (Recommended)</strong></h4><pre><code class="language-text-x-trilium-auto"># Run with default UID/GID (1000:1000)
@@ -127,51 +129,51 @@ docker run -d --name trilium -p 8080:8080 --user $(id -u):$(id -g) -v ~/trilium-
</code></pre>
<h3>Environment Variables</h3>
<ul>
<li><code>TRILIUM_UID</code>: UID to use for the container process (passed
<li data-list-item-id="eb52d2c583a8808652ce0761d246ef29e"><code>TRILIUM_UID</code>: UID to use for the container process (passed
to Docker's <code>--user</code> flag)</li>
<li><code>TRILIUM_GID</code>: GID to use for the container process (passed
<li data-list-item-id="ea0cfaacd3839aa7be06ab16ac93c0b73"><code>TRILIUM_GID</code>: GID to use for the container process (passed
to Docker's <code>--user</code> flag)</li>
<li><code>TRILIUM_DATA_DIR</code>: Path to the data directory inside the container
<li data-list-item-id="e798f25ec7f7eb14d5e37c010a893f574"><code>TRILIUM_DATA_DIR</code>: Path to the data directory inside the container
(default: <code>/home/node/trilium-data</code>)</li>
</ul>
<p>For a complete list of configuration environment variables (network settings,
authentication, sync, etc.), see <a class="reference-link" href="#root/_help_dmi3wz9muS2O">Configuration (config.ini or environment variables)</a>.</p>
authentication, sync, etc.), see&nbsp;<a class="reference-link" href="#root/pOsGYCXsbNQG/tC7s2alapj8V/_help_Gzjqa934BdH4">Configuration (config.ini or environment variables)</a>.</p>
<h3>Volume Permissions</h3>
<p>If you encounter permission issues with the data volume, ensure that:</p>
<ol>
<li>The host directory has appropriate permissions for the UID/GID you're
<li data-list-item-id="e080a03231b298c4ed1f1517161a4a827">The host directory has appropriate permissions for the UID/GID you're
using</li>
<li>You're setting both <code>TRILIUM_UID</code> and <code>TRILIUM_GID</code> to
<li data-list-item-id="e6ae1b441bf88ef155897ae808def1659">You're setting both <code>TRILIUM_UID</code> and <code>TRILIUM_GID</code> to
match the owner of the host directory</li>
</ol><pre><code class="language-text-x-trilium-auto"># For example, if your data directory is owned by UID 1001 and GID 1001:
TRILIUM_UID=1001 TRILIUM_GID=1001 docker-compose -f docker-compose.rootless.yml up -d
</code></pre>
<h3>Considerations</h3>
<ul>
<li>The container starts with a specific UID/GID which can be customized at
<li data-list-item-id="ecc3672515488dba9b61869cdfd5d9844">The container starts with a specific UID/GID which can be customized at
runtime</li>
<li>Unlike the traditional setup, this approach does not use a separate entrypoint
<li data-list-item-id="e0c331861745c5c0487f49ff6253af2b0">Unlike the traditional setup, this approach does not use a separate entrypoint
script with <code>usermod</code>/<code>groupmod</code> commands</li>
<li>The container cannot modify its own UID/GID at runtime, which is a security
<li data-list-item-id="eaa843c637b6b98c143be6e388283406b">The container cannot modify its own UID/GID at runtime, which is a security
feature of rootless containers</li>
</ul>
<h3>Available Rootless Images</h3>
<p>Two rootless variants are provided:</p>
<ol>
<li><strong>Debian-based</strong> (default): Uses the Debian Bullseye Slim
<li data-list-item-id="eb55a0f37e1d52feab8f2cf0bed2ff5ba"><strong>Debian-based</strong> (default): Uses the Debian Bullseye Slim
base image
<ul>
<li>Dockerfile: <code>apps/server/Dockerfile.rootless</code>
<li data-list-item-id="ed167aa522a14c0c11e7b67cf2ec829d0">Dockerfile: <code>apps/server/Dockerfile.rootless</code>
</li>
<li>Recommended for most users</li>
<li data-list-item-id="e01b97bf3611445c24a10109aac1bdb93">Recommended for most users</li>
</ul>
</li>
<li><strong>Alpine-based</strong>: Uses the Alpine base image for smaller
<li data-list-item-id="efdc17349ac079b3595b2da5741080641"><strong>Alpine-based</strong>: Uses the Alpine base image for smaller
size
<ul>
<li>Dockerfile: <code>apps/server/Dockerfile.alpine.rootless</code>
<li data-list-item-id="ea6712f3d5c9c339f5dee5ab643d00bac">Dockerfile: <code>apps/server/Dockerfile.alpine.rootless</code>
</li>
<li>Smaller image size, but may have compatibility issues with some systems</li>
<li data-list-item-id="ebdeac8a67fc5f4f6a4d8df566482f56d">Smaller image size, but may have compatibility issues with some systems</li>
</ul>
</li>
</ol>
@@ -186,7 +188,9 @@ docker build --build-arg USER=myuser --build-arg UID=1001 --build-arg GID=1001 \
</code></pre>
<p>Available build arguments:</p>
<ul>
<li><code>USER</code>: Username for the non-root user (default: trilium)</li>
<li><code>UID</code>: User ID for the non-root user (default: 1000)</li>
<li><code>GID</code>: Group ID for the non-root user (default: 1000)</li>
<li data-list-item-id="e71af4a98ca5cd03cd91a5821015a264f"><code>USER</code>: Username for the non-root user (default: trilium)</li>
<li
data-list-item-id="e46e4176bfb41ec68f7671ce4f4c44959"><code>UID</code>: User ID for the non-root user (default: 1000)</li>
<li
data-list-item-id="e9c69339349469f3711dca84cc9e7483b"><code>GID</code>: Group ID for the non-root user (default: 1000)</li>
</ul>

View File

@@ -1961,6 +1961,13 @@
"isInheritable": false,
"position": 10
},
{
"type": "relation",
"name": "internalLink",
"value": "lXjOyKpUSKgE",
"isInheritable": false,
"position": 20
},
{
"type": "label",
"name": "iconClass",
@@ -1974,13 +1981,6 @@
"value": "i18n",
"isInheritable": false,
"position": 20
},
{
"type": "relation",
"name": "internalLink",
"value": "lXjOyKpUSKgE",
"isInheritable": false,
"position": 30
}
],
"format": "markdown",

View File

@@ -1,5 +1,5 @@
# Documentation
There are multiple types of documentation for Trilium:<img class="image-style-align-right" src="api/images/5q5br2G87GtN/Documentation_image.png" width="205" height="162">
There are multiple types of documentation for Trilium:<img class="image-style-align-right" src="api/images/SIwJUad843tO/Documentation_image.png" width="205" height="162">
* The _User Guide_ represents the user-facing documentation. This documentation can be browsed by users directly from within Trilium, by pressing <kbd>F1</kbd>.
* The _Developer's Guide_ represents a set of Markdown documents that present the internals of Trilium, for developers.

View File

@@ -694,6 +694,13 @@
"value": "bx bxl-docker",
"isInheritable": false,
"position": 40
},
{
"type": "relation",
"name": "internalLink",
"value": "Gzjqa934BdH4",
"isInheritable": false,
"position": 50
}
],
"format": "markdown",

View File

@@ -48,7 +48,7 @@ In the _Collections_ tab in the <a class="reference-link" href="../Basic%20Conc
The following attributes can be added to the Collection type:
<table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>#calendar:hideWeekends</code></td><td>When present (regardless of value), it will hide Saturday and Sundays from the calendar.</td></tr><tr><td><code>#calendar:weekNumbers</code></td><td>When present (regardless of value), it will show the number of the week on the calendar.</td></tr><tr><td><code>#calendar:view</code></td><td><p>Which view to display in the calendar:</p><ul><li><code>timeGridWeek</code> for the <em>week</em> view;</li><li><code>dayGridMonth</code> for the <em>month</em> view;</li><li><code>multiMonthYear</code> for the <em>year</em> view;</li><li><code>listMonth</code> for the <em>list</em> view.</li></ul><p>Any other value will be dismissed and the default view (month) will be used instead.</p><p>The value of this label is automatically updated when changing the view using the UI buttons.</p></td></tr><tr><td><code>~child:template</code></td><td>Defines the template for newly created notes in the calendar (via dragging or clicking).</td></tr></tbody></table>
<table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code>#calendar:hideWeekends</code></td><td>When present (regardless of value), it will hide Saturday and Sundays from the calendar.</td></tr><tr><td><code>#calendar:weekNumbers</code></td><td>When present (regardless of value), it will show the number of the week on the calendar.</td></tr><tr><td><code>#calendar:initialDate</code></td><td>Change the date the calendar opens on. When not present, the calendar opens on the current date.</td></tr><tr><td><code>#calendar:view</code></td><td><p>Which view to display in the calendar:</p><ul><li><code>timeGridWeek</code> for the <em>week</em> view;</li><li><code>dayGridMonth</code> for the <em>month</em> view;</li><li><code>multiMonthYear</code> for the <em>year</em> view;</li><li><code>listMonth</code> for the <em>list</em> view.</li></ul><p>Any other value will be dismissed and the default view (month) will be used instead.</p><p>The value of this label is automatically updated when changing the view using the UI buttons.</p></td></tr><tr><td><code>~child:template</code></td><td>Defines the template for newly created notes in the calendar (via dragging or clicking).</td></tr></tbody></table>
In addition, the first day of the week can be either Sunday or Monday and can be adjusted from the application settings.

View File

@@ -187,7 +187,7 @@ docker run -d --name trilium -p 8080:8080 --user $(id -u):$(id -g) -v ~/trilium-
* `TRILIUM_GID`: GID to use for the container process (passed to Docker's `--user` flag)
* `TRILIUM_DATA_DIR`: Path to the data directory inside the container (default: `/home/node/trilium-data`)
For a complete list of configuration environment variables (network settings, authentication, sync, etc.), see <a class="reference-link" href="#root/dmi3wz9muS2O">Configuration (config.ini or environment variables)</a>.
For a complete list of configuration environment variables (network settings, authentication, sync, etc.), see <a class="reference-link" href="../../../Advanced%20Usage/Configuration%20(config.ini%20or%20e.md">Configuration (config.ini or environment variables)</a>.
### Volume Permissions

View File

@@ -33,6 +33,7 @@ type Labels = {
"calendar:hideWeekends": boolean;
"calendar:weekNumbers": boolean;
"calendar:view": string;
"calendar:initialDate": string;
"map:style": string;
"map:scale": boolean;
"board:groupBy": string;

42
pnpm-lock.yaml generated
View File

@@ -186,7 +186,7 @@ importers:
version: 0.2.0(mermaid@11.12.1)
'@mind-elixir/node-menu':
specifier: 5.0.1
version: 5.0.1(mind-elixir@5.3.5)
version: 5.0.1(mind-elixir@5.3.6)
'@popperjs/core':
specifier: 2.11.8
version: 2.11.8
@@ -275,8 +275,8 @@ importers:
specifier: 11.12.1
version: 11.12.1
mind-elixir:
specifier: 5.3.5
version: 5.3.5
specifier: 5.3.6
version: 5.3.6
normalize.css:
specifier: 8.0.1
version: 8.0.1
@@ -10377,8 +10377,8 @@ packages:
resolution: {integrity: sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==}
engines: {node: '>=10'}
mind-elixir@5.3.5:
resolution: {integrity: sha512-GKYTqU7qsbmPmdTvJlM0g/chrHIkikV7sYhQIz4GTa7Xp8H7hqL5y8gMeJLeR2gdJi3sLUyoVUzBwF7tmKIffw==}
mind-elixir@5.3.6:
resolution: {integrity: sha512-LU5HuRrtq/Fq/YkgZHUu4gb1Vg6tNQq0Ob7bQKNDTP3A8prcohHF5D7ca5blvqVkyf9+xUdBWsdFMNffMNPnkA==}
mini-css-extract-plugin@2.4.7:
resolution: {integrity: sha512-euWmddf0sk9Nv1O0gfeeUAvAkoSlWncNLF77C0TP2+WoPvy8mAHKOzMajcCz2dzvyt3CNgxb1obIEVFIRxaipg==}
@@ -15616,6 +15616,8 @@ snapshots:
'@ckeditor/ckeditor5-ui': 47.2.0
'@ckeditor/ckeditor5-utils': 47.2.0
ckeditor5: 47.2.0(patch_hash=8331a09d41443b39ea1c784daaccfeb0da4f9065ed556e7de92e9c77edd9eb41)
transitivePeerDependencies:
- supports-color
'@ckeditor/ckeditor5-block-quote@47.2.0':
dependencies:
@@ -15626,6 +15628,8 @@ snapshots:
'@ckeditor/ckeditor5-ui': 47.2.0
'@ckeditor/ckeditor5-utils': 47.2.0
ckeditor5: 47.2.0(patch_hash=8331a09d41443b39ea1c784daaccfeb0da4f9065ed556e7de92e9c77edd9eb41)
transitivePeerDependencies:
- supports-color
'@ckeditor/ckeditor5-bookmark@47.2.0':
dependencies:
@@ -15636,6 +15640,8 @@ snapshots:
'@ckeditor/ckeditor5-utils': 47.2.0
'@ckeditor/ckeditor5-widget': 47.2.0
ckeditor5: 47.2.0(patch_hash=8331a09d41443b39ea1c784daaccfeb0da4f9065ed556e7de92e9c77edd9eb41)
transitivePeerDependencies:
- supports-color
'@ckeditor/ckeditor5-case-change@47.2.0':
dependencies:
@@ -15946,6 +15952,8 @@ snapshots:
'@ckeditor/ckeditor5-utils': 47.2.0
ckeditor5: 47.2.0(patch_hash=8331a09d41443b39ea1c784daaccfeb0da4f9065ed556e7de92e9c77edd9eb41)
es-toolkit: 1.39.5
transitivePeerDependencies:
- supports-color
'@ckeditor/ckeditor5-editor-multi-root@47.2.0':
dependencies:
@@ -15968,6 +15976,8 @@ snapshots:
'@ckeditor/ckeditor5-table': 47.2.0
'@ckeditor/ckeditor5-utils': 47.2.0
ckeditor5: 47.2.0(patch_hash=8331a09d41443b39ea1c784daaccfeb0da4f9065ed556e7de92e9c77edd9eb41)
transitivePeerDependencies:
- supports-color
'@ckeditor/ckeditor5-emoji@47.2.0':
dependencies:
@@ -15980,6 +15990,8 @@ snapshots:
ckeditor5: 47.2.0(patch_hash=8331a09d41443b39ea1c784daaccfeb0da4f9065ed556e7de92e9c77edd9eb41)
es-toolkit: 1.39.5
fuzzysort: 3.1.0
transitivePeerDependencies:
- supports-color
'@ckeditor/ckeditor5-engine@47.2.0':
dependencies:
@@ -16022,6 +16034,8 @@ snapshots:
'@ckeditor/ckeditor5-ui': 47.2.0
'@ckeditor/ckeditor5-utils': 47.2.0
ckeditor5: 47.2.0(patch_hash=8331a09d41443b39ea1c784daaccfeb0da4f9065ed556e7de92e9c77edd9eb41)
transitivePeerDependencies:
- supports-color
'@ckeditor/ckeditor5-export-word@47.2.0':
dependencies:
@@ -16087,6 +16101,8 @@ snapshots:
'@ckeditor/ckeditor5-ui': 47.2.0
'@ckeditor/ckeditor5-utils': 47.2.0
ckeditor5: 47.2.0(patch_hash=8331a09d41443b39ea1c784daaccfeb0da4f9065ed556e7de92e9c77edd9eb41)
transitivePeerDependencies:
- supports-color
'@ckeditor/ckeditor5-heading@47.2.0':
dependencies:
@@ -16097,6 +16113,8 @@ snapshots:
'@ckeditor/ckeditor5-ui': 47.2.0
'@ckeditor/ckeditor5-utils': 47.2.0
ckeditor5: 47.2.0(patch_hash=8331a09d41443b39ea1c784daaccfeb0da4f9065ed556e7de92e9c77edd9eb41)
transitivePeerDependencies:
- supports-color
'@ckeditor/ckeditor5-highlight@47.2.0':
dependencies:
@@ -16142,6 +16160,8 @@ snapshots:
'@ckeditor/ckeditor5-widget': 47.2.0
ckeditor5: 47.2.0(patch_hash=8331a09d41443b39ea1c784daaccfeb0da4f9065ed556e7de92e9c77edd9eb41)
es-toolkit: 1.39.5
transitivePeerDependencies:
- supports-color
'@ckeditor/ckeditor5-icons@47.2.0': {}
@@ -16173,6 +16193,8 @@ snapshots:
'@ckeditor/ckeditor5-ui': 47.2.0
'@ckeditor/ckeditor5-utils': 47.2.0
ckeditor5: 47.2.0(patch_hash=8331a09d41443b39ea1c784daaccfeb0da4f9065ed556e7de92e9c77edd9eb41)
transitivePeerDependencies:
- supports-color
'@ckeditor/ckeditor5-indent@47.2.0':
dependencies:
@@ -16309,6 +16331,8 @@ snapshots:
'@ckeditor/ckeditor5-widget': 47.2.0
ckeditor5: 47.2.0(patch_hash=8331a09d41443b39ea1c784daaccfeb0da4f9065ed556e7de92e9c77edd9eb41)
es-toolkit: 1.39.5
transitivePeerDependencies:
- supports-color
'@ckeditor/ckeditor5-minimap@47.2.0':
dependencies:
@@ -16692,6 +16716,8 @@ snapshots:
'@ckeditor/ckeditor5-utils': 47.2.0
ckeditor5: 47.2.0(patch_hash=8331a09d41443b39ea1c784daaccfeb0da4f9065ed556e7de92e9c77edd9eb41)
es-toolkit: 1.39.5
transitivePeerDependencies:
- supports-color
'@codemirror/autocomplete@6.18.6':
dependencies:
@@ -18575,9 +18601,9 @@ snapshots:
'@microsoft/tsdoc@0.15.1': {}
'@mind-elixir/node-menu@5.0.1(mind-elixir@5.3.5)':
'@mind-elixir/node-menu@5.0.1(mind-elixir@5.3.6)':
dependencies:
mind-elixir: 5.3.5
mind-elixir: 5.3.6
'@mixmark-io/domino@2.2.0': {}
@@ -27043,7 +27069,7 @@ snapshots:
mimic-response@3.1.0: {}
mind-elixir@5.3.5: {}
mind-elixir@5.3.6: {}
mini-css-extract-plugin@2.4.7(webpack@5.101.3(@swc/core@1.11.29(@swc/helpers@0.5.17))(esbuild@0.27.0)):
dependencies: