mirror of
https://github.com/zadam/trilium.git
synced 2025-11-17 18:50:41 +01:00
Compare commits
23 Commits
feat/rice-
...
siriusbcd_
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0227449c55 | ||
|
|
f57e90b35c | ||
|
|
5a5d242ea0 | ||
|
|
4afea27fa5 | ||
|
|
fc8042aa25 | ||
|
|
2b6220beb8 | ||
|
|
78426a6c7b | ||
|
|
620e53c255 | ||
|
|
753fc6c769 | ||
|
|
3d6e1dfc0a | ||
|
|
d92431ad65 | ||
|
|
be19d1f5b5 | ||
|
|
ca08a52998 | ||
|
|
e54822f3b0 | ||
|
|
3863e657ef | ||
|
|
341ef79b49 | ||
|
|
335f34b824 | ||
|
|
c864863be4 | ||
|
|
a22687e2d8 | ||
|
|
44475853df | ||
|
|
309d7e704c | ||
|
|
ecf9ce586c | ||
|
|
d0de9e5e21 |
@@ -55,7 +55,7 @@
|
|||||||
"mark.js": "8.11.1",
|
"mark.js": "8.11.1",
|
||||||
"marked": "16.4.2",
|
"marked": "16.4.2",
|
||||||
"mermaid": "11.12.1",
|
"mermaid": "11.12.1",
|
||||||
"mind-elixir": "5.3.5",
|
"mind-elixir": "5.3.6",
|
||||||
"normalize.css": "8.0.1",
|
"normalize.css": "8.0.1",
|
||||||
"panzoom": "9.4.3",
|
"panzoom": "9.4.3",
|
||||||
"preact": "10.27.2",
|
"preact": "10.27.2",
|
||||||
|
|||||||
@@ -647,7 +647,32 @@ export default class TabManager extends Component {
|
|||||||
...this.noteContexts.slice(-noteContexts.length),
|
...this.noteContexts.slice(-noteContexts.length),
|
||||||
...this.noteContexts.slice(lastClosedTab.position, -noteContexts.length)
|
...this.noteContexts.slice(lastClosedTab.position, -noteContexts.length)
|
||||||
];
|
];
|
||||||
this.noteContextReorderEvent({ ntxIdsInOrder: ntxsInOrder.map((nc) => nc.ntxId).filter((id) => id !== null) });
|
|
||||||
|
// Update mainNtxId if the restored pane is the main pane in the split pane
|
||||||
|
const { oldMainNtxId, newMainNtxId } = (() => {
|
||||||
|
if (noteContexts.length !== 1) {
|
||||||
|
return { oldMainNtxId: undefined, newMainNtxId: undefined };
|
||||||
|
}
|
||||||
|
|
||||||
|
const mainNtxId = noteContexts[0]?.mainNtxId;
|
||||||
|
const index = this.noteContexts.findIndex(c => c.ntxId === mainNtxId);
|
||||||
|
|
||||||
|
// No need to update if the restored position is after mainNtxId
|
||||||
|
if (index === -1 || lastClosedTab.position > index) {
|
||||||
|
return { oldMainNtxId: undefined, newMainNtxId: undefined };
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
oldMainNtxId: this.noteContexts[index].ntxId ?? undefined,
|
||||||
|
newMainNtxId: noteContexts[0]?.ntxId ?? undefined
|
||||||
|
};
|
||||||
|
})();
|
||||||
|
|
||||||
|
this.triggerCommand("noteContextReorder", {
|
||||||
|
ntxIdsInOrder: ntxsInOrder.map((nc) => nc.ntxId).filter((id) => id !== null),
|
||||||
|
oldMainNtxId,
|
||||||
|
newMainNtxId
|
||||||
|
});
|
||||||
|
|
||||||
let mainNtx = noteContexts.find((nc) => nc.isMainContext());
|
let mainNtx = noteContexts.find((nc) => nc.isMainContext());
|
||||||
if (mainNtx) {
|
if (mainNtx) {
|
||||||
|
|||||||
@@ -1,18 +1,20 @@
|
|||||||
import { useEffect, useState } from "preact/hooks";
|
import { useEffect, useState } from "preact/hooks";
|
||||||
import { t } from "../../services/i18n";
|
import { t } from "../../services/i18n";
|
||||||
import ActionButton from "../react/ActionButton";
|
import ActionButton from "../react/ActionButton";
|
||||||
import { useNoteContext, useTriliumEvent } from "../react/hooks";
|
import { useNoteContext, useTriliumEvents } from "../react/hooks";
|
||||||
|
import appContext from "../../components/app_context";
|
||||||
|
|
||||||
export default function ClosePaneButton() {
|
export default function ClosePaneButton() {
|
||||||
const { noteContext, ntxId, parentComponent } = useNoteContext();
|
const { noteContext, ntxId, parentComponent } = useNoteContext();
|
||||||
const [ isEnabled, setIsEnabled ] = useState(false);
|
const [isEnabled, setIsEnabled] = useState(false);
|
||||||
|
|
||||||
function refresh() {
|
function refresh() {
|
||||||
setIsEnabled(!!(noteContext && !!noteContext.mainNtxId));
|
const isMainOfSomeContext = appContext.tabManager.noteContexts.some(c => c.mainNtxId === ntxId);
|
||||||
|
setIsEnabled(!!(noteContext && (!!noteContext.mainNtxId || isMainOfSomeContext)));
|
||||||
}
|
}
|
||||||
|
|
||||||
useTriliumEvent("noteContextReorder", refresh);
|
useTriliumEvents(["noteContextRemoved", "noteContextReorder", "newNoteContextCreated"], refresh);
|
||||||
useEffect(refresh, [ ntxId ]);
|
useEffect(refresh, [ntxId]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ActionButton
|
<ActionButton
|
||||||
|
|||||||
@@ -91,6 +91,7 @@ export default function CalendarView({ note, noteIds }: ViewModeProps<CalendarVi
|
|||||||
const [ hideWeekends ] = useNoteLabelBoolean(note, "calendar:hideWeekends");
|
const [ hideWeekends ] = useNoteLabelBoolean(note, "calendar:hideWeekends");
|
||||||
const [ weekNumbers ] = useNoteLabelBoolean(note, "calendar:weekNumbers");
|
const [ weekNumbers ] = useNoteLabelBoolean(note, "calendar:weekNumbers");
|
||||||
const [ calendarView, setCalendarView ] = useNoteLabel(note, "calendar:view");
|
const [ calendarView, setCalendarView ] = useNoteLabel(note, "calendar:view");
|
||||||
|
const [ initialDate ] = useNoteLabel(note, "calendar:initialDate");
|
||||||
const initialView = useRef(calendarView);
|
const initialView = useRef(calendarView);
|
||||||
const viewSpacedUpdate = useSpacedUpdate(() => setCalendarView(initialView.current));
|
const viewSpacedUpdate = useSpacedUpdate(() => setCalendarView(initialView.current));
|
||||||
useResizeObserver(containerRef, () => calendarRef.current?.updateSize());
|
useResizeObserver(containerRef, () => calendarRef.current?.updateSize());
|
||||||
@@ -134,6 +135,7 @@ export default function CalendarView({ note, noteIds }: ViewModeProps<CalendarVi
|
|||||||
height="90%"
|
height="90%"
|
||||||
nowIndicator
|
nowIndicator
|
||||||
handleWindowResize={false}
|
handleWindowResize={false}
|
||||||
|
initialDate={initialDate || undefined}
|
||||||
locale={locale}
|
locale={locale}
|
||||||
{...editingProps}
|
{...editingProps}
|
||||||
eventDidMount={eventDidMount}
|
eventDidMount={eventDidMount}
|
||||||
|
|||||||
@@ -100,9 +100,23 @@ export default class SplitNoteContainer extends FlexContainer<SplitNoteWidget> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async closeThisNoteSplitCommand({ ntxId }: CommandListenerData<"closeThisNoteSplit">) {
|
async closeThisNoteSplitCommand({ ntxId }: CommandListenerData<"closeThisNoteSplit">) {
|
||||||
if (ntxId) {
|
if (!ntxId) return;
|
||||||
await appContext.tabManager.removeNoteContext(ntxId);
|
const contexts = appContext.tabManager.noteContexts;
|
||||||
|
|
||||||
|
const currentIndex = contexts.findIndex((c) => c.ntxId === ntxId);
|
||||||
|
if (currentIndex === -1) return;
|
||||||
|
|
||||||
|
const isRemoveMainContext = !contexts[currentIndex].mainNtxId;
|
||||||
|
if (isRemoveMainContext && currentIndex + 1 <= contexts.length) {
|
||||||
|
const ntxIds = contexts.map((c) => c.ntxId).filter((c) => !!c) as string[];
|
||||||
|
this.triggerCommand("noteContextReorder", {
|
||||||
|
ntxIdsInOrder: ntxIds,
|
||||||
|
oldMainNtxId: ntxId,
|
||||||
|
newMainNtxId: ntxIds[currentIndex + 1]
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
await appContext.tabManager.removeNoteContext(ntxId);
|
||||||
}
|
}
|
||||||
|
|
||||||
async moveThisNoteSplitCommand({ ntxId, isMovingLeft }: CommandListenerData<"moveThisNoteSplit">) {
|
async moveThisNoteSplitCommand({ ntxId, isMovingLeft }: CommandListenerData<"moveThisNoteSplit">) {
|
||||||
@@ -167,12 +181,16 @@ export default class SplitNoteContainer extends FlexContainer<SplitNoteWidget> {
|
|||||||
splitService.delNoteSplitResizer(ntxIds);
|
splitService.delNoteSplitResizer(ntxIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
contextsReopenedEvent({ ntxId, afterNtxId }: EventData<"contextsReopened">) {
|
contextsReopenedEvent({ ntxId, mainNtxId, tabPosition, afterNtxId }: EventData<"contextsReopened">) {
|
||||||
if (ntxId === undefined || afterNtxId === undefined) {
|
if (ntxId !== undefined && afterNtxId !== undefined) {
|
||||||
// no single split reopened
|
this.$widget.find(`[data-ntx-id="${ntxId}"]`).insertAfter(this.$widget.find(`[data-ntx-id="${afterNtxId}"]`));
|
||||||
return;
|
} else if (mainNtxId && tabPosition >= 0) {
|
||||||
|
const contexts = appContext.tabManager.noteContexts;
|
||||||
|
const nextIndex = contexts.findIndex(c => c.ntxId === mainNtxId);
|
||||||
|
const beforeNtxId = (nextIndex !== -1 && nextIndex + 1 < contexts.length) ? contexts[nextIndex + 1].ntxId : null;
|
||||||
|
|
||||||
|
this.$widget.find(`[data-ntx-id="${mainNtxId}"]`).insertBefore(this.$widget.find(`[data-ntx-id="${beforeNtxId}"]`));
|
||||||
}
|
}
|
||||||
this.$widget.find(`[data-ntx-id="${ntxId}"]`).insertAfter(this.$widget.find(`[data-ntx-id="${afterNtxId}"]`));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async refresh() {
|
async refresh() {
|
||||||
|
|||||||
@@ -820,12 +820,15 @@ export default class TabRowWidget extends BasicWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
contextsReopenedEvent({ mainNtxId, tabPosition }: EventData<"contextsReopened">) {
|
contextsReopenedEvent({ mainNtxId, tabPosition }: EventData<"contextsReopened">) {
|
||||||
if (!mainNtxId || !tabPosition) {
|
if (!mainNtxId || tabPosition < 0) {
|
||||||
// no tab reopened
|
// no tab reopened
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const tabEl = this.getTabById(mainNtxId)[0];
|
const tabEl = this.getTabById(mainNtxId)[0];
|
||||||
tabEl.parentNode?.insertBefore(tabEl, this.tabEls[tabPosition]);
|
|
||||||
|
if ( tabEl && tabEl.parentNode ){
|
||||||
|
tabEl.parentNode.insertBefore(tabEl, this.tabEls[tabPosition]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
updateTabById(ntxId: string | null) {
|
updateTabById(ntxId: string | null) {
|
||||||
|
|||||||
2
apps/server/src/assets/doc_notes/en/User Guide/!!!meta.json
generated
vendored
2
apps/server/src/assets/doc_notes/en/User Guide/!!!meta.json
generated
vendored
File diff suppressed because one or more lines are too long
6
apps/server/src/assets/doc_notes/en/User Guide/User Guide/Collections/Calendar.html
generated
vendored
6
apps/server/src/assets/doc_notes/en/User Guide/User Guide/Collections/Calendar.html
generated
vendored
@@ -112,6 +112,12 @@
|
|||||||
<td>When present (regardless of value), it will show the number of the week
|
<td>When present (regardless of value), it will show the number of the week
|
||||||
on the calendar.</td>
|
on the calendar.</td>
|
||||||
</tr>
|
</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>
|
<tr>
|
||||||
<td><code>#calendar:view</code>
|
<td><code>#calendar:view</code>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ docker run -d --name trilium -p 8080:8080 --user $(id -u):$(id -g) -v ~/trilium-
|
|||||||
(default: <code>/home/node/trilium-data</code>)</li>
|
(default: <code>/home/node/trilium-data</code>)</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p>For a complete list of configuration environment variables (network settings,
|
<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 <a class="reference-link" href="#root/_help_Gzjqa934BdH4">Configuration (config.ini or environment variables)</a>.</p>
|
||||||
<h3>Volume Permissions</h3>
|
<h3>Volume Permissions</h3>
|
||||||
<p>If you encounter permission issues with the data volume, ensure that:</p>
|
<p>If you encounter permission issues with the data volume, ensure that:</p>
|
||||||
<ol>
|
<ol>
|
||||||
|
|||||||
48
apps/server/src/assets/doc_notes/en/User Guide/User Guide/Installation & Setup/Server Installation/2. Reverse proxy/Traefik.html
generated
vendored
Normal file
48
apps/server/src/assets/doc_notes/en/User Guide/User Guide/Installation & Setup/Server Installation/2. Reverse proxy/Traefik.html
generated
vendored
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
<p>Configure Traefik proxy and HTTPS. See <a href="https://github.com/TriliumNext/Trilium/issues/7768#issuecomment-3539165814">#7768</a> for
|
||||||
|
reference</p>
|
||||||
|
<h3>Build the docker-compose file</h3>
|
||||||
|
<p>Setting up Traefik as reverse proxy requires setting the following labels:</p><pre><code class="language-text-x-yaml"> labels:
|
||||||
|
- traefik.enable=true
|
||||||
|
- traefik.http.routers.trilium.entrypoints=https
|
||||||
|
- traefik.http.routers.trilium.rule=Host(`trilium.mydomain.tld`)
|
||||||
|
- traefik.http.routers.trilium.tls=true
|
||||||
|
- traefik.http.routers.trilium.service=trilium
|
||||||
|
- traefik.http.services.trilium.loadbalancer.server.port=8080
|
||||||
|
# scheme must be HTTP instead of the usual HTTPS because Trilium listens on HTTP internally
|
||||||
|
- traefik.http.services.trilium.loadbalancer.server.scheme=http
|
||||||
|
- traefik.docker.network=proxy
|
||||||
|
# forward HTTP to HTTPS
|
||||||
|
- traefik.http.routers.trilium.middlewares=trilium-headers@docker
|
||||||
|
- traefik.http.middlewares.trilium-headers.headers.customrequestheaders.X-Forwarded-Proto=https</code></pre>
|
||||||
|
<h3>Setup needed environment variables</h3>
|
||||||
|
<p>After setting up a reverse proxy, make sure to configure the <a class="reference-link"
|
||||||
|
href="Trusted%20proxy.md">[missing note]</a>.</p>
|
||||||
|
<h3>Example <code>docker-compose.yaml</code></h3><pre><code class="language-text-x-yaml">services:
|
||||||
|
trilium:
|
||||||
|
image: triliumnext/trilium
|
||||||
|
container_name: trilium
|
||||||
|
networks:
|
||||||
|
- traefik-proxy
|
||||||
|
environment:
|
||||||
|
- TRILIUM_NETWORK_TRUSTEDREVERSEPROXY=my-traefik-host-ip # e.g., 172.18.0.0/16
|
||||||
|
volumes:
|
||||||
|
- /path/to/data:/home/node/trilium-data
|
||||||
|
- /etc/timezone:/etc/timezone:ro
|
||||||
|
- /etc/localtime:/etc/localtime:ro
|
||||||
|
labels:
|
||||||
|
- traefik.enable=true
|
||||||
|
- traefik.http.routers.trilium.entrypoints=https
|
||||||
|
- traefik.http.routers.trilium.rule=Host(`trilium.mydomain.tld`)
|
||||||
|
- traefik.http.routers.trilium.tls=true
|
||||||
|
- traefik.http.routers.trilium.service=trilium
|
||||||
|
- traefik.http.services.trilium.loadbalancer.server.port=8080
|
||||||
|
# scheme must be HTTP instead of the usual HTTPS because of how trilium works
|
||||||
|
- traefik.http.services.trilium.loadbalancer.server.scheme=http
|
||||||
|
- traefik.docker.network=traefik-proxy
|
||||||
|
# Tell Trilium the original request was HTTPS
|
||||||
|
- traefik.http.routers.trilium.middlewares=trilium-headers@docker
|
||||||
|
- traefik.http.middlewares.trilium-headers.headers.customrequestheaders.X-Forwarded-Proto=https
|
||||||
|
|
||||||
|
networks:
|
||||||
|
traefik-proxy:
|
||||||
|
external: true</code></pre>
|
||||||
14
docs/Developer Guide/!!!meta.json
vendored
14
docs/Developer Guide/!!!meta.json
vendored
@@ -1961,6 +1961,13 @@
|
|||||||
"isInheritable": false,
|
"isInheritable": false,
|
||||||
"position": 10
|
"position": 10
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "relation",
|
||||||
|
"name": "internalLink",
|
||||||
|
"value": "lXjOyKpUSKgE",
|
||||||
|
"isInheritable": false,
|
||||||
|
"position": 20
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "label",
|
"type": "label",
|
||||||
"name": "iconClass",
|
"name": "iconClass",
|
||||||
@@ -1974,13 +1981,6 @@
|
|||||||
"value": "i18n",
|
"value": "i18n",
|
||||||
"isInheritable": false,
|
"isInheritable": false,
|
||||||
"position": 20
|
"position": 20
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "relation",
|
|
||||||
"name": "internalLink",
|
|
||||||
"value": "lXjOyKpUSKgE",
|
|
||||||
"isInheritable": false,
|
|
||||||
"position": 30
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"format": "markdown",
|
"format": "markdown",
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# Documentation
|
# 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/eyrnitqBQ2w6/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 _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.
|
* The _Developer's Guide_ represents a set of Markdown documents that present the internals of Trilium, for developers.
|
||||||
|
|||||||
36
docs/User Guide/!!!meta.json
vendored
36
docs/User Guide/!!!meta.json
vendored
@@ -681,6 +681,13 @@
|
|||||||
"isInheritable": false,
|
"isInheritable": false,
|
||||||
"position": 20
|
"position": 20
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "relation",
|
||||||
|
"name": "internalLink",
|
||||||
|
"value": "Gzjqa934BdH4",
|
||||||
|
"isInheritable": false,
|
||||||
|
"position": 30
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "label",
|
"type": "label",
|
||||||
"name": "shareAlias",
|
"name": "shareAlias",
|
||||||
@@ -1044,6 +1051,35 @@
|
|||||||
"format": "markdown",
|
"format": "markdown",
|
||||||
"dataFileName": "Trusted proxy.md",
|
"dataFileName": "Trusted proxy.md",
|
||||||
"attachments": []
|
"attachments": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"isClone": false,
|
||||||
|
"noteId": "5ERVJb9s4FRD",
|
||||||
|
"notePath": [
|
||||||
|
"pOsGYCXsbNQG",
|
||||||
|
"Otzi9La2YAUX",
|
||||||
|
"WOcw2SLH6tbX",
|
||||||
|
"vcjrb3VVYPZI",
|
||||||
|
"5ERVJb9s4FRD"
|
||||||
|
],
|
||||||
|
"title": "Traefik",
|
||||||
|
"notePosition": 40,
|
||||||
|
"prefix": null,
|
||||||
|
"isExpanded": false,
|
||||||
|
"type": "text",
|
||||||
|
"mime": "text/html",
|
||||||
|
"attributes": [
|
||||||
|
{
|
||||||
|
"type": "label",
|
||||||
|
"name": "shareAlias",
|
||||||
|
"value": "traefik",
|
||||||
|
"isInheritable": false,
|
||||||
|
"position": 30
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"format": "markdown",
|
||||||
|
"dataFileName": "Traefik.md",
|
||||||
|
"attachments": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -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:
|
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.
|
In addition, the first day of the week can be either Sunday or Monday and can be adjusted from the application settings.
|
||||||
|
|
||||||
|
|||||||
@@ -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_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`)
|
* `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
|
### Volume Permissions
|
||||||
|
|
||||||
|
|||||||
60
docs/User Guide/User Guide/Installation & Setup/Server Installation/2. Reverse proxy/Traefik.md
vendored
Normal file
60
docs/User Guide/User Guide/Installation & Setup/Server Installation/2. Reverse proxy/Traefik.md
vendored
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
# Traefik
|
||||||
|
Configure Traefik proxy and HTTPS. See [#7768](https://github.com/TriliumNext/Trilium/issues/7768#issuecomment-3539165814) for reference
|
||||||
|
|
||||||
|
### Build the docker-compose file
|
||||||
|
|
||||||
|
Setting up Traefik as reverse proxy requires setting the following labels:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
labels:
|
||||||
|
- traefik.enable=true
|
||||||
|
- traefik.http.routers.trilium.entrypoints=https
|
||||||
|
- traefik.http.routers.trilium.rule=Host(`trilium.mydomain.tld`)
|
||||||
|
- traefik.http.routers.trilium.tls=true
|
||||||
|
- traefik.http.routers.trilium.service=trilium
|
||||||
|
- traefik.http.services.trilium.loadbalancer.server.port=8080
|
||||||
|
# scheme must be HTTP instead of the usual HTTPS because Trilium listens on HTTP internally
|
||||||
|
- traefik.http.services.trilium.loadbalancer.server.scheme=http
|
||||||
|
- traefik.docker.network=proxy
|
||||||
|
# forward HTTP to HTTPS
|
||||||
|
- traefik.http.routers.trilium.middlewares=trilium-headers@docker
|
||||||
|
- traefik.http.middlewares.trilium-headers.headers.customrequestheaders.X-Forwarded-Proto=https
|
||||||
|
```
|
||||||
|
|
||||||
|
### Setup needed environment variables
|
||||||
|
|
||||||
|
After setting up a reverse proxy, make sure to configure the <a class="reference-link" href="Trusted%20proxy.md">[missing note]</a>.
|
||||||
|
|
||||||
|
### Example `docker-compose.yaml`
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
services:
|
||||||
|
trilium:
|
||||||
|
image: triliumnext/trilium
|
||||||
|
container_name: trilium
|
||||||
|
networks:
|
||||||
|
- traefik-proxy
|
||||||
|
environment:
|
||||||
|
- TRILIUM_NETWORK_TRUSTEDREVERSEPROXY=my-traefik-host-ip # e.g., 172.18.0.0/16
|
||||||
|
volumes:
|
||||||
|
- /path/to/data:/home/node/trilium-data
|
||||||
|
- /etc/timezone:/etc/timezone:ro
|
||||||
|
- /etc/localtime:/etc/localtime:ro
|
||||||
|
labels:
|
||||||
|
- traefik.enable=true
|
||||||
|
- traefik.http.routers.trilium.entrypoints=https
|
||||||
|
- traefik.http.routers.trilium.rule=Host(`trilium.mydomain.tld`)
|
||||||
|
- traefik.http.routers.trilium.tls=true
|
||||||
|
- traefik.http.routers.trilium.service=trilium
|
||||||
|
- traefik.http.services.trilium.loadbalancer.server.port=8080
|
||||||
|
# scheme must be HTTP instead of the usual HTTPS because of how trilium works
|
||||||
|
- traefik.http.services.trilium.loadbalancer.server.scheme=http
|
||||||
|
- traefik.docker.network=traefik-proxy
|
||||||
|
# Tell Trilium the original request was HTTPS
|
||||||
|
- traefik.http.routers.trilium.middlewares=trilium-headers@docker
|
||||||
|
- traefik.http.middlewares.trilium-headers.headers.customrequestheaders.X-Forwarded-Proto=https
|
||||||
|
|
||||||
|
networks:
|
||||||
|
traefik-proxy:
|
||||||
|
external: true
|
||||||
|
```
|
||||||
@@ -33,6 +33,7 @@ type Labels = {
|
|||||||
"calendar:hideWeekends": boolean;
|
"calendar:hideWeekends": boolean;
|
||||||
"calendar:weekNumbers": boolean;
|
"calendar:weekNumbers": boolean;
|
||||||
"calendar:view": string;
|
"calendar:view": string;
|
||||||
|
"calendar:initialDate": string;
|
||||||
"map:style": string;
|
"map:style": string;
|
||||||
"map:scale": boolean;
|
"map:scale": boolean;
|
||||||
"board:groupBy": string;
|
"board:groupBy": string;
|
||||||
|
|||||||
42
pnpm-lock.yaml
generated
42
pnpm-lock.yaml
generated
@@ -186,7 +186,7 @@ importers:
|
|||||||
version: 0.2.0(mermaid@11.12.1)
|
version: 0.2.0(mermaid@11.12.1)
|
||||||
'@mind-elixir/node-menu':
|
'@mind-elixir/node-menu':
|
||||||
specifier: 5.0.1
|
specifier: 5.0.1
|
||||||
version: 5.0.1(mind-elixir@5.3.5)
|
version: 5.0.1(mind-elixir@5.3.6)
|
||||||
'@popperjs/core':
|
'@popperjs/core':
|
||||||
specifier: 2.11.8
|
specifier: 2.11.8
|
||||||
version: 2.11.8
|
version: 2.11.8
|
||||||
@@ -275,8 +275,8 @@ importers:
|
|||||||
specifier: 11.12.1
|
specifier: 11.12.1
|
||||||
version: 11.12.1
|
version: 11.12.1
|
||||||
mind-elixir:
|
mind-elixir:
|
||||||
specifier: 5.3.5
|
specifier: 5.3.6
|
||||||
version: 5.3.5
|
version: 5.3.6
|
||||||
normalize.css:
|
normalize.css:
|
||||||
specifier: 8.0.1
|
specifier: 8.0.1
|
||||||
version: 8.0.1
|
version: 8.0.1
|
||||||
@@ -10377,8 +10377,8 @@ packages:
|
|||||||
resolution: {integrity: sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==}
|
resolution: {integrity: sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==}
|
||||||
engines: {node: '>=10'}
|
engines: {node: '>=10'}
|
||||||
|
|
||||||
mind-elixir@5.3.5:
|
mind-elixir@5.3.6:
|
||||||
resolution: {integrity: sha512-GKYTqU7qsbmPmdTvJlM0g/chrHIkikV7sYhQIz4GTa7Xp8H7hqL5y8gMeJLeR2gdJi3sLUyoVUzBwF7tmKIffw==}
|
resolution: {integrity: sha512-LU5HuRrtq/Fq/YkgZHUu4gb1Vg6tNQq0Ob7bQKNDTP3A8prcohHF5D7ca5blvqVkyf9+xUdBWsdFMNffMNPnkA==}
|
||||||
|
|
||||||
mini-css-extract-plugin@2.4.7:
|
mini-css-extract-plugin@2.4.7:
|
||||||
resolution: {integrity: sha512-euWmddf0sk9Nv1O0gfeeUAvAkoSlWncNLF77C0TP2+WoPvy8mAHKOzMajcCz2dzvyt3CNgxb1obIEVFIRxaipg==}
|
resolution: {integrity: sha512-euWmddf0sk9Nv1O0gfeeUAvAkoSlWncNLF77C0TP2+WoPvy8mAHKOzMajcCz2dzvyt3CNgxb1obIEVFIRxaipg==}
|
||||||
@@ -15616,6 +15616,8 @@ snapshots:
|
|||||||
'@ckeditor/ckeditor5-ui': 47.2.0
|
'@ckeditor/ckeditor5-ui': 47.2.0
|
||||||
'@ckeditor/ckeditor5-utils': 47.2.0
|
'@ckeditor/ckeditor5-utils': 47.2.0
|
||||||
ckeditor5: 47.2.0(patch_hash=8331a09d41443b39ea1c784daaccfeb0da4f9065ed556e7de92e9c77edd9eb41)
|
ckeditor5: 47.2.0(patch_hash=8331a09d41443b39ea1c784daaccfeb0da4f9065ed556e7de92e9c77edd9eb41)
|
||||||
|
transitivePeerDependencies:
|
||||||
|
- supports-color
|
||||||
|
|
||||||
'@ckeditor/ckeditor5-block-quote@47.2.0':
|
'@ckeditor/ckeditor5-block-quote@47.2.0':
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -15626,6 +15628,8 @@ snapshots:
|
|||||||
'@ckeditor/ckeditor5-ui': 47.2.0
|
'@ckeditor/ckeditor5-ui': 47.2.0
|
||||||
'@ckeditor/ckeditor5-utils': 47.2.0
|
'@ckeditor/ckeditor5-utils': 47.2.0
|
||||||
ckeditor5: 47.2.0(patch_hash=8331a09d41443b39ea1c784daaccfeb0da4f9065ed556e7de92e9c77edd9eb41)
|
ckeditor5: 47.2.0(patch_hash=8331a09d41443b39ea1c784daaccfeb0da4f9065ed556e7de92e9c77edd9eb41)
|
||||||
|
transitivePeerDependencies:
|
||||||
|
- supports-color
|
||||||
|
|
||||||
'@ckeditor/ckeditor5-bookmark@47.2.0':
|
'@ckeditor/ckeditor5-bookmark@47.2.0':
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -15636,6 +15640,8 @@ snapshots:
|
|||||||
'@ckeditor/ckeditor5-utils': 47.2.0
|
'@ckeditor/ckeditor5-utils': 47.2.0
|
||||||
'@ckeditor/ckeditor5-widget': 47.2.0
|
'@ckeditor/ckeditor5-widget': 47.2.0
|
||||||
ckeditor5: 47.2.0(patch_hash=8331a09d41443b39ea1c784daaccfeb0da4f9065ed556e7de92e9c77edd9eb41)
|
ckeditor5: 47.2.0(patch_hash=8331a09d41443b39ea1c784daaccfeb0da4f9065ed556e7de92e9c77edd9eb41)
|
||||||
|
transitivePeerDependencies:
|
||||||
|
- supports-color
|
||||||
|
|
||||||
'@ckeditor/ckeditor5-case-change@47.2.0':
|
'@ckeditor/ckeditor5-case-change@47.2.0':
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -15946,6 +15952,8 @@ snapshots:
|
|||||||
'@ckeditor/ckeditor5-utils': 47.2.0
|
'@ckeditor/ckeditor5-utils': 47.2.0
|
||||||
ckeditor5: 47.2.0(patch_hash=8331a09d41443b39ea1c784daaccfeb0da4f9065ed556e7de92e9c77edd9eb41)
|
ckeditor5: 47.2.0(patch_hash=8331a09d41443b39ea1c784daaccfeb0da4f9065ed556e7de92e9c77edd9eb41)
|
||||||
es-toolkit: 1.39.5
|
es-toolkit: 1.39.5
|
||||||
|
transitivePeerDependencies:
|
||||||
|
- supports-color
|
||||||
|
|
||||||
'@ckeditor/ckeditor5-editor-multi-root@47.2.0':
|
'@ckeditor/ckeditor5-editor-multi-root@47.2.0':
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -15968,6 +15976,8 @@ snapshots:
|
|||||||
'@ckeditor/ckeditor5-table': 47.2.0
|
'@ckeditor/ckeditor5-table': 47.2.0
|
||||||
'@ckeditor/ckeditor5-utils': 47.2.0
|
'@ckeditor/ckeditor5-utils': 47.2.0
|
||||||
ckeditor5: 47.2.0(patch_hash=8331a09d41443b39ea1c784daaccfeb0da4f9065ed556e7de92e9c77edd9eb41)
|
ckeditor5: 47.2.0(patch_hash=8331a09d41443b39ea1c784daaccfeb0da4f9065ed556e7de92e9c77edd9eb41)
|
||||||
|
transitivePeerDependencies:
|
||||||
|
- supports-color
|
||||||
|
|
||||||
'@ckeditor/ckeditor5-emoji@47.2.0':
|
'@ckeditor/ckeditor5-emoji@47.2.0':
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -15980,6 +15990,8 @@ snapshots:
|
|||||||
ckeditor5: 47.2.0(patch_hash=8331a09d41443b39ea1c784daaccfeb0da4f9065ed556e7de92e9c77edd9eb41)
|
ckeditor5: 47.2.0(patch_hash=8331a09d41443b39ea1c784daaccfeb0da4f9065ed556e7de92e9c77edd9eb41)
|
||||||
es-toolkit: 1.39.5
|
es-toolkit: 1.39.5
|
||||||
fuzzysort: 3.1.0
|
fuzzysort: 3.1.0
|
||||||
|
transitivePeerDependencies:
|
||||||
|
- supports-color
|
||||||
|
|
||||||
'@ckeditor/ckeditor5-engine@47.2.0':
|
'@ckeditor/ckeditor5-engine@47.2.0':
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -16022,6 +16034,8 @@ snapshots:
|
|||||||
'@ckeditor/ckeditor5-ui': 47.2.0
|
'@ckeditor/ckeditor5-ui': 47.2.0
|
||||||
'@ckeditor/ckeditor5-utils': 47.2.0
|
'@ckeditor/ckeditor5-utils': 47.2.0
|
||||||
ckeditor5: 47.2.0(patch_hash=8331a09d41443b39ea1c784daaccfeb0da4f9065ed556e7de92e9c77edd9eb41)
|
ckeditor5: 47.2.0(patch_hash=8331a09d41443b39ea1c784daaccfeb0da4f9065ed556e7de92e9c77edd9eb41)
|
||||||
|
transitivePeerDependencies:
|
||||||
|
- supports-color
|
||||||
|
|
||||||
'@ckeditor/ckeditor5-export-word@47.2.0':
|
'@ckeditor/ckeditor5-export-word@47.2.0':
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -16087,6 +16101,8 @@ snapshots:
|
|||||||
'@ckeditor/ckeditor5-ui': 47.2.0
|
'@ckeditor/ckeditor5-ui': 47.2.0
|
||||||
'@ckeditor/ckeditor5-utils': 47.2.0
|
'@ckeditor/ckeditor5-utils': 47.2.0
|
||||||
ckeditor5: 47.2.0(patch_hash=8331a09d41443b39ea1c784daaccfeb0da4f9065ed556e7de92e9c77edd9eb41)
|
ckeditor5: 47.2.0(patch_hash=8331a09d41443b39ea1c784daaccfeb0da4f9065ed556e7de92e9c77edd9eb41)
|
||||||
|
transitivePeerDependencies:
|
||||||
|
- supports-color
|
||||||
|
|
||||||
'@ckeditor/ckeditor5-heading@47.2.0':
|
'@ckeditor/ckeditor5-heading@47.2.0':
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -16097,6 +16113,8 @@ snapshots:
|
|||||||
'@ckeditor/ckeditor5-ui': 47.2.0
|
'@ckeditor/ckeditor5-ui': 47.2.0
|
||||||
'@ckeditor/ckeditor5-utils': 47.2.0
|
'@ckeditor/ckeditor5-utils': 47.2.0
|
||||||
ckeditor5: 47.2.0(patch_hash=8331a09d41443b39ea1c784daaccfeb0da4f9065ed556e7de92e9c77edd9eb41)
|
ckeditor5: 47.2.0(patch_hash=8331a09d41443b39ea1c784daaccfeb0da4f9065ed556e7de92e9c77edd9eb41)
|
||||||
|
transitivePeerDependencies:
|
||||||
|
- supports-color
|
||||||
|
|
||||||
'@ckeditor/ckeditor5-highlight@47.2.0':
|
'@ckeditor/ckeditor5-highlight@47.2.0':
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -16142,6 +16160,8 @@ snapshots:
|
|||||||
'@ckeditor/ckeditor5-widget': 47.2.0
|
'@ckeditor/ckeditor5-widget': 47.2.0
|
||||||
ckeditor5: 47.2.0(patch_hash=8331a09d41443b39ea1c784daaccfeb0da4f9065ed556e7de92e9c77edd9eb41)
|
ckeditor5: 47.2.0(patch_hash=8331a09d41443b39ea1c784daaccfeb0da4f9065ed556e7de92e9c77edd9eb41)
|
||||||
es-toolkit: 1.39.5
|
es-toolkit: 1.39.5
|
||||||
|
transitivePeerDependencies:
|
||||||
|
- supports-color
|
||||||
|
|
||||||
'@ckeditor/ckeditor5-icons@47.2.0': {}
|
'@ckeditor/ckeditor5-icons@47.2.0': {}
|
||||||
|
|
||||||
@@ -16173,6 +16193,8 @@ snapshots:
|
|||||||
'@ckeditor/ckeditor5-ui': 47.2.0
|
'@ckeditor/ckeditor5-ui': 47.2.0
|
||||||
'@ckeditor/ckeditor5-utils': 47.2.0
|
'@ckeditor/ckeditor5-utils': 47.2.0
|
||||||
ckeditor5: 47.2.0(patch_hash=8331a09d41443b39ea1c784daaccfeb0da4f9065ed556e7de92e9c77edd9eb41)
|
ckeditor5: 47.2.0(patch_hash=8331a09d41443b39ea1c784daaccfeb0da4f9065ed556e7de92e9c77edd9eb41)
|
||||||
|
transitivePeerDependencies:
|
||||||
|
- supports-color
|
||||||
|
|
||||||
'@ckeditor/ckeditor5-indent@47.2.0':
|
'@ckeditor/ckeditor5-indent@47.2.0':
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -16309,6 +16331,8 @@ snapshots:
|
|||||||
'@ckeditor/ckeditor5-widget': 47.2.0
|
'@ckeditor/ckeditor5-widget': 47.2.0
|
||||||
ckeditor5: 47.2.0(patch_hash=8331a09d41443b39ea1c784daaccfeb0da4f9065ed556e7de92e9c77edd9eb41)
|
ckeditor5: 47.2.0(patch_hash=8331a09d41443b39ea1c784daaccfeb0da4f9065ed556e7de92e9c77edd9eb41)
|
||||||
es-toolkit: 1.39.5
|
es-toolkit: 1.39.5
|
||||||
|
transitivePeerDependencies:
|
||||||
|
- supports-color
|
||||||
|
|
||||||
'@ckeditor/ckeditor5-minimap@47.2.0':
|
'@ckeditor/ckeditor5-minimap@47.2.0':
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -16692,6 +16716,8 @@ snapshots:
|
|||||||
'@ckeditor/ckeditor5-utils': 47.2.0
|
'@ckeditor/ckeditor5-utils': 47.2.0
|
||||||
ckeditor5: 47.2.0(patch_hash=8331a09d41443b39ea1c784daaccfeb0da4f9065ed556e7de92e9c77edd9eb41)
|
ckeditor5: 47.2.0(patch_hash=8331a09d41443b39ea1c784daaccfeb0da4f9065ed556e7de92e9c77edd9eb41)
|
||||||
es-toolkit: 1.39.5
|
es-toolkit: 1.39.5
|
||||||
|
transitivePeerDependencies:
|
||||||
|
- supports-color
|
||||||
|
|
||||||
'@codemirror/autocomplete@6.18.6':
|
'@codemirror/autocomplete@6.18.6':
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -18575,9 +18601,9 @@ snapshots:
|
|||||||
|
|
||||||
'@microsoft/tsdoc@0.15.1': {}
|
'@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:
|
dependencies:
|
||||||
mind-elixir: 5.3.5
|
mind-elixir: 5.3.6
|
||||||
|
|
||||||
'@mixmark-io/domino@2.2.0': {}
|
'@mixmark-io/domino@2.2.0': {}
|
||||||
|
|
||||||
@@ -27043,7 +27069,7 @@ snapshots:
|
|||||||
|
|
||||||
mimic-response@3.1.0: {}
|
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)):
|
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:
|
dependencies:
|
||||||
|
|||||||
Reference in New Issue
Block a user