Skip to content

Build your personal knowledge base with Trilium Notes

feat(global-menu): trim the global menu, most of all on mobile

Elian Doran78c3c8ac02ff
diff --git a/apps/client/src/widgets/buttons/global_menu.spec.tsx b/apps/client/src/widgets/buttons/global_menu.spec.tsx
index d8ea805588..10648cb29c 100644
--- a/apps/client/src/widgets/buttons/global_menu.spec.tsx
+++ b/apps/client/src/widgets/buttons/global_menu.spec.tsx
@@ -4,7 +4,7 @@ import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
// Shared, mutable control state for the mocks below. `vi.hoisted` runs before the hoisted `vi.mock`
// factories, so they can safely reference it.
-const ctrl = vi.hoisted(() => ({ standalone: false, checkForUpdates: true }));
+const ctrl = vi.hoisted(() => ({ standalone: false, checkForUpdates: true, mobile: false }));
// `isStandalone` is a const in the target, read here as a live getter so each scenario can flip the
// kind of client we are pretending to be. Partial-mock so the rest of utils stays real — in
@@ -13,9 +13,13 @@ vi.mock("../../services/utils", async (importOriginal) => ({
...(await importOriginal<typeof import("../../services/utils")>()),
get isStandalone() {
return ctrl.standalone;
- }
+ },
+ isMobile: () => ctrl.mobile
}));
+// The rows are read by their keys.
+vi.mock("../../services/i18n", () => ({ t: (key: string) => key }));
+
// The hook reads the user's preference through `useTriliumOptionBool`; stub just that one, so the
// other hooks the menu pulls in keep their real implementation.
vi.mock("../react/hooks", async (importOriginal) => ({
@@ -24,7 +28,7 @@ vi.mock("../react/hooks", async (importOriginal) => ({
}));
// Import AFTER the mocks (vi.mock is hoisted, but the import must resolve the mocked deps).
-import { parseLatestVersion, RELEASES_API_URL, UPDATE_CHECK_INTERVAL, useTriliumUpdateStatus } from "./global_menu";
+import GlobalMenu, { parseLatestVersion, RELEASES_API_URL, UPDATE_CHECK_INTERVAL, useTriliumUpdateStatus } from "./global_menu";
let status: ReturnType<typeof useTriliumUpdateStatus> | undefined;
let container: HTMLDivElement | undefined;
@@ -65,6 +69,7 @@ beforeEach(() => {
vi.useFakeTimers();
ctrl.standalone = false;
ctrl.checkForUpdates = true;
+ ctrl.mobile = false;
status = undefined;
window.glob = { ...window.glob, triliumVersion: "0.104.0" };
@@ -149,3 +154,68 @@ describe("parseLatestVersion", () => {
expect(parseLatestVersion({ tag_name: 104 })).toBeUndefined();
});
});
+
+describe("GlobalMenu", () => {
+ const popup = () => document.querySelector<HTMLElement>(".tn-popup:not([data-closing])");
+ /** The keys of the rows at the top of the menu, or of the submenu page open over it. */
+ const rows = (scope: Element | null | undefined) => [ ...scope?.querySelectorAll(":scope > li.dropdown-item, :scope > .dropdown-item") ?? [] ]
+ .map((row) => row.textContent?.trim());
+
+ async function openAdvanced() {
+ await act(async () => {
+ if (container) render(<GlobalMenu isHorizontalLayout />, container);
+ });
+ const toggle = container?.querySelector<HTMLButtonElement>("button.global-menu-button");
+ await act(async () => toggle?.click());
+ await vi.waitFor(() => expect(popup()).not.toBeNull());
+ const topLevel = rows(popup()?.querySelector(".tn-menu-scroll"));
+
+ const advanced = [ ...popup()?.querySelectorAll<HTMLElement>("li.dropdown-submenu") ?? [] ]
+ .find((row) => row.textContent?.includes("global_menu.advanced"));
+ // A phone opens a submenu as a page over the menu; a desktop beside it, on hover.
+ const opened = () => popup()?.querySelector(":scope > .tn-menu-page .tn-menu-scroll")
+ ?? popup()?.querySelector(":scope > div.dropdown-submenu > .dropdown-menu .tn-menu-scroll");
+ await act(async () => {
+ if (ctrl.mobile) advanced?.click();
+ else advanced?.dispatchEvent(new PointerEvent("pointerenter"));
+ });
+ await vi.waitFor(() => expect(opened()).toBeTruthy());
+ return { topLevel, advanced: rows(opened()) };
+ }
+
+ beforeEach(() => {
+ vi.useRealTimers();
+ container = document.body.appendChild(document.createElement("div"));
+ // Without slides, a submenu's page goes as soon as it closes.
+ document.body.classList.add("motion-disabled");
+ });
+
+ afterEach(() => {
+ document.body.classList.remove("motion-disabled");
+ });
+
+ it("keeps the shared notes and space usage views in Advanced", async () => {
+ const { topLevel, advanced } = await openAdvanced();
+
+ expect(topLevel.some((row) => row?.startsWith("global_menu.open_new_window"))).toBe(true);
+ expect(topLevel.some((row) => row?.startsWith("global_menu.show_shared_notes_subtree"))).toBe(false);
+ expect(topLevel.some((row) => row?.startsWith("global_menu.show_space_usage"))).toBe(false);
+ expect(advanced.slice(0, 2).map((row) => row?.split(/\s/)[0])).toEqual([ "global_menu.show_shared_notes_subtree", "global_menu.show_space_usage" ]);
+ });
+
+ it("moves what a phone rarely needs into Advanced, and leaves out what it cannot use", async () => {
+ ctrl.mobile = true;
+ const { topLevel, advanced } = await openAdvanced();
+
+ expect(topLevel).toContain("global_menu.show_deleted_notes");
+ for (const key of [ "global_menu.open_new_window", "global_menu.show-cheatsheet", "global_menu.show_shared_notes_subtree",
+ "global_menu.show_space_usage", "global_menu.switch_to_desktop_version" ]) {
+ expect(topLevel.some((row) => row?.startsWith(key))).toBe(false);
+ }
+ expect(advanced.some((row) => row?.startsWith("global_menu.show_shared_notes_subtree"))).toBe(true);
+ expect(advanced.some((row) => row?.startsWith("global_menu.show_space_usage"))).toBe(true);
+ expect(advanced.at(-1)).toBe("global_menu.switch_to_desktop_version");
+ expect([ ...topLevel, ...advanced ].some((row) => row?.startsWith("global_menu.open_new_window"))).toBe(false);
+ expect([ ...topLevel, ...advanced ].some((row) => row?.startsWith("global_menu.show-cheatsheet"))).toBe(false);
+ });
+});
diff --git a/apps/client/src/widgets/buttons/global_menu.tsx b/apps/client/src/widgets/buttons/global_menu.tsx
index 28ff90e5b4..a3b04a9cb2 100644
--- a/apps/client/src/widgets/buttons/global_menu.tsx
+++ b/apps/client/src/widgets/buttons/global_menu.tsx
@@ -49,10 +49,8 @@ export default function GlobalMenu({ isHorizontalLayout }: { isHorizontalLayout:
<FormDropdownDivider />
</>}
- <MenuItem command="openNewWindow" icon="bx bx-window-open" text={t("global_menu.open_new_window")} />
- <MenuItem command="showShareSubtree" icon="bx bx-share-alt" text={t("global_menu.show_shared_notes_subtree")} />
+ {!isMobile() && <MenuItem command="openNewWindow" icon="bx bx-window-open" text={t("global_menu.open_new_window")} />}
<MenuItem command="showDeletedNotes" icon="bx bx-trash-alt" text={t("global_menu.show_deleted_notes")} />
- <KeyboardActionMenuItem command="showSpaceUsage" icon="bx bx-pie-chart-alt-2" text={t("global_menu.show_space_usage")} />
<FormDropdownDivider />
<ZoomControls parentComponent={parentComponent} />
@@ -60,14 +58,14 @@ export default function GlobalMenu({ isHorizontalLayout }: { isHorizontalLayout:
<KeyboardActionMenuItem command="toggleZenMode" icon="bx bxs-yin-yang" text={t("global_menu.toggle-zen-mode")} />
<FormDropdownDivider />
- <SwitchToOptions />
+ {!isMobile() && <SwitchToOptions />}
<MenuItem command="showLaunchBarSubtree" icon={`bx ${isMobile() ? "bx-mobile" : "bx-sidebar"}`} text={t("global_menu.configure_launchbar")} />
<AdvancedMenu />
<MenuItem command="showOptions" icon="bx bx-cog" text={t("global_menu.options")} />
<FormDropdownDivider />
<KeyboardActionMenuItem command="showHelp" icon="bx bx-help-circle" text={t("global_menu.show_help")} />
- <KeyboardActionMenuItem command="showCheatsheet" icon="bx bxs-keyboard" text={t("global_menu.show-cheatsheet")} />
+ {!isMobile() && <KeyboardActionMenuItem command="showCheatsheet" icon="bx bxs-keyboard" text={t("global_menu.show-cheatsheet")} />}
<MenuItem command="openAboutDialog" icon="bx bx-info-circle" text={t("global_menu.about")} />
{isUpdateAvailable && <>
@@ -85,6 +83,8 @@ export default function GlobalMenu({ isHorizontalLayout }: { isHorizontalLayout:
function AdvancedMenu() {
return (
<FormDropdownSubmenu icon="bx bx-chip" title={t("global_menu.advanced")}>
+ <MenuItem command="showShareSubtree" icon="bx bx-share-alt" text={t("global_menu.show_shared_notes_subtree")} />
+ <KeyboardActionMenuItem command="showSpaceUsage" icon="bx bx-pie-chart-alt-2" text={t("global_menu.show_space_usage")} />
<MenuItem command="showHiddenSubtree" icon="bx bx-hide" text={t("global_menu.show_hidden_subtree")} />
<MenuItem command="showSearchHistory" icon="bx bx-search-alt" text={t("global_menu.open_search_history")} />
<FormDropdownDivider />
@@ -96,6 +96,11 @@ function AdvancedMenu() {
{isElectron() && <MenuItem command="openDevTools" icon="bx bx-bug-alt" text={t("global_menu.open_dev_tools")} />}
<KeyboardActionMenuItem command="reloadFrontendApp" icon="bx bx-refresh" text={t("global_menu.reload_frontend")} title={t("global_menu.reload_hint")} />
+
+ {isMobile() && <>
+ <FormDropdownDivider />
+ <SwitchToOptions />
+ </>}
</FormDropdownSubmenu>
);
}
diff --git a/apps/server/src/assets/help/help_content.json b/apps/server/src/assets/help/help_content.json
index 568c99a06a..25e61cc25a 100644
--- a/apps/server/src/assets/help/help_content.json
+++ b/apps/server/src/assets/help/help_content.json
@@ -29,7 +29,7 @@
"_help_yeEaYqosGLSh": "<p>As an alternative to <a href=\"#root/_help_Dgg7bR3b6K9j\">hosting your own Trilium instance</a>, there are two services out there that provide out of the box support for Trilium.</p><aside class=\"admonition important\"><p><strong>Disclaimer</strong>: The Trilium Notes project and maintainers are not directly affiliated with either of the projects.</p><p>PikaPods have gracefully offered us free credits for testing purposes.</p></aside><h2>Cloud instance providers</h2><h3>PikaPods</h3><ol><li>Go to <a href=\"https://www.pikapods.com\">pikapods.com</a> &nbsp;and sign up.</li><li>In the “Available Apps” section, look for \"TriliumNext<br>&nbsp;and select “Run your own”.</li><li>Follow the on-screen instructions to set up your own cloud hosted instance.</li></ol><p>PikaPods generally updates their Trilium instances to the latest version within a two-week interval after a new version is released.</p><h2>Matching your version with the cloud instance</h2><p>Please note that once you set up&nbsp;<a class=\"reference-link\" href=\"#root/_help_cbkrhQjrkKrh\">Synchronization</a>&nbsp;between a cloud instance and <a href=\"#root/_help_poXkQfguuA0U\">desktop</a> clients, it's important that the version of the desktop application and the server match up.</p><p>When setting up a cloud instance, it's best to check the version of the server by accessing it via a web browser and going to the <em>About</em> section. It's best that both the desktop and the server have the same <em>App version</em>; however it's generally OK to update the desktop to a newer version than the server if it has the same <em>Sync version</em>.</p><p>If the <em>Sync version</em> between the server and the desktop application doesn't match, synchronization will not work.</p>",
"_help_iGTnKjubbXkA": "<ul><li>Using Docker, the server can be run on Windows, Linux and macOS devices.</li><li>Native binaries are provided for Linux x64 and ARM (<code>aarch64</code>).</li></ul><h2>Legacy ARM support</h2><p>The Docker builds also provide <code>linux/arm/v7</code> and <code>linux/arm/v8</code> platforms. These platforms are considered legacy since Trilium uses Node.js version 24 which have <a href=\"https://github.com/nodejs/node/commit/6682861d6f\">officially downgraded support</a> for these platforms to “experimental”.</p><p>As a result, Trilium needs to use Node.js 22 for these versions. As soon as soon Node.js 22 will no longer be compatible, support for <code>armv7</code> and <code>armv8</code> will be dropped entirely.</p><p>Regardless of upstream support, these platforms are supported on a best-effort basis and are not officially supported by the Trilium development team. Bug reports are accepted but they will not be treated with priority; contributions are welcome.</p>",
"_help_cbkrhQjrkKrh": "<p>Trilium is an offline-first note-taking application that stores all data locally on the desktop client. However, it also offers the option to set up synchronization with a server instance, allowing multiple desktop clients to sync with a central server. This creates a star-shaped topology:</p><p><img src=\"{{helpAssets}}/User%20Guide/Installation%20%26%20Setup/Synchronization_image.jpg\"></p><p>In this setup, a central server (referred to as the <em>sync server</em>) and multiple <em>client</em> (or <em>desktop</em>) instances synchronize with the sync server. Once configured, synchronization is automatic and ongoing, requiring no manual intervention.</p><h2>Setting Up Synchronization</h2><h3>Security Considerations</h3><p>Setting up the server securely is critical and can be complex. It is crucial to use a valid <a href=\"#root/_help_l2VkvOwUNfZj\">TLS certificate</a> (HTTPS) rather than an unencrypted HTTP connection to ensure security and avoid potential vulnerabilities.</p><h3>Synchronizing a Desktop Instance with a Sync Server</h3><p>This method is used when you already have a desktop instance of Trilium and want to set up a sync server on your web host.</p><ol><li><strong>Server Deployment</strong>: Ensure your server instance is deployed but uninitialized.</li><li><strong>Desktop Configuration</strong>: Open your desktop instance, navigate to&nbsp;<a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a>&nbsp;→ <em>Sync</em> → <em>Sync server</em>, and set the <em>Server address</em> to your sync server's address.<ul><li>Note that the sync server can also be overridden through&nbsp;<a class=\"reference-link\" href=\"#root/_help_Gzjqa934BdH4\">Configuration (config.ini or environment variables)</a>, case in which that value takes precedence. If that's the case, a field called <em>Server in use</em> indicates it.</li></ul></li><li><strong>Testing Sync</strong>: Click the <em>Test sync</em> button to verify the connection to the sync server.<ul><li>If successful, the client will start pushing all data to the server instance.</li><li>This process may take some time, but you can continue using Trilium. Periodically check the server instance to confirm when the sync is complete. Once finished, you should see the login screen on the server.</li></ul></li></ol><h3>Synchronizing a Desktop Instance from a Sync Server</h3><p>This method is used when you already have a sync server and want to configure a new desktop instance to sync with it.</p><ol><li><strong>Desktop Setup</strong>: Follow the <a href=\"#root/_help_poXkQfguuA0U\">desktop installation page</a>.</li><li><strong>Initial Configuration</strong>: When prompted, choose the option to set up sync with a sync server.</li></ol><p><img src=\"{{helpAssets}}/User%20Guide/Installation%20%26%20Setup/Synchronization_sync-init.png\" alt=\"screenshot of the sync from server setup page\"></p><ol><li><strong>Server Details</strong>: Configure the Trilium server address and enter the server's password. If the server has <a class=\"reference-link\" href=\"#root/_help_7DAiwaf8Z7Rz\">Multi-factor authentication with TOTP</a> enabled, also enter a one-time password from your authenticator app, or a recovery code.</li><li><strong>Finish Setup</strong>: Click the \"Finish setup\" button. If successful, you will see the following screen:</li></ol><p><img src=\"{{helpAssets}}/User%20Guide/Installation%20%26%20Setup/Synchronization_sync-in-progress.png\" alt=\"screenshot of the sync page\"></p><p>Once synchronization is complete, you will be automatically redirected to the Trilium application.</p><h3>Desktop-to-desktop sync</h3><p>This method allows two desktop instances to synchronize between each other without requiring a&nbsp;<a class=\"reference-link\" href=\"#root/_help_WOcw2SLH6tbX\">Server Installation</a>.</p><aside class=\"admonition warning\"><p>Since v0.104.0, LAN access needs to be enabled to allow this sync to function. See&nbsp;<a class=\"reference-link\" href=\"#root/_help_swSFivWk6KkA\">Network Access</a>&nbsp;for information on how to do so.</p></aside><h2>Proxy Configuration</h2><p>Two proxy setups are supported:</p><ul><li><strong>Explicit Proxy Configuration</strong>: Set the proxy server in Options / Sync. Only unauthenticated proxy servers are supported.</li><li><strong>System Proxy Settings</strong>: If no proxy server is explicitly configured, Trilium will use the system proxy settings.</li></ul><h2>Troubleshooting</h2><h3>Date/Time Synchronization</h3><p>For successful synchronization, both client and server must have the same date and time, with a tolerance of up to five minutes.</p><h3>Certificate Issues</h3><p>When using TLS, Trilium will verify the server certificate. If verification fails (e.g., due to self-signed certificates or certain corporate proxies), you can run the Trilium client with the <code>NODE_TLS_REJECT_UNAUTHORIZED</code> environment variable set to <code>0</code>:</p><pre><code class=\"language-text-x-trilium-auto\">export NODE_TLS_REJECT_UNAUTHORIZED=0</code></pre><p>This will disable TLS certificate verification, significantly reducing security and exposing the setup to MITM attacks. It is strongly recommended to use a valid signed server certificate. Newer Trilium versions include a script called <code>trilium-no-cert-check.sh</code> for this purpose.</p><h3>Conflict Resolution</h3><p>If you edit the same note on multiple instances before synchronization, Trilium resolves conflicts by retaining the newer change and discarding the older one. The older version remains accessible in <a href=\"#root/_help_vZWERwf8U3nx\">note revisions</a>, allowing data recovery if needed.</p><h3>Hash Check</h3><p>After each synchronization, Trilium computes a hash of all synced data on both the client and the sync server. If there is a discrepancy, Trilium will automatically initiate a recovery mechanism to resolve the issue.</p>",
- "_help_RDslemsQ6gCp": "<figure class=\"image image-style-align-right image_resized\" style=\"width:33.52%;\"><img style=\"aspect-ratio:1242/2688;\" src=\"{{helpAssets}}/User%20Guide/Installation%20%26%20Setup/Mobile%20Frontend_IMG_1765.PNG\" width=\"1242\" height=\"2688\"></figure><p>Trilium has a mobile web frontend which is optimized for touch based devices - smartphones and tablets. It is activated automatically during login process based on browser detection.</p><p>Mobile frontend is limited in features compared to the full desktop version. See below for more details on this.</p><h2>Layout basics</h2><p>Unlike the desktop version, the mobile version has a slightly different UI meant to better fit the constrained screens of a mobile phone.</p><p>Here is a non-exhaustive list of differences between the desktop version and the mobile one:</p><ul><li>The&nbsp;<a class=\"reference-link\" href=\"#root/_help_oPVyFC7WL2Lp\">Note Tree</a>&nbsp;is displayed as a sidebar. To display the sidebar, press the button in the top-left of the screen.<ul><li>There is also a swipe gesture that can be done from the left of the screen, but the browser's navigation gesture interferes with it most of the time (depending on the platform).</li><li>Press and hold a note to display the&nbsp;<a class=\"reference-link\" href=\"#root/_help_YtSN43OrfzaA\">Note tree contextual menu</a>.</li></ul></li><li>The&nbsp;<a class=\"reference-link\" href=\"#root/_help_Ms1nauBra7gq\">Quick search</a>&nbsp;bar is also displayed at the top of the note tree.</li><li>The full&nbsp;<a class=\"reference-link\" href=\"#root/_help_eIg8jdvaoNNd\">Search</a>&nbsp;function can be triggered either from either the&nbsp;<a class=\"reference-link\" href=\"#root/_help_x3i7MxGccDuM\">Global menu</a>&nbsp;or from the&nbsp;<a class=\"reference-link\" href=\"#root/_help_xYmIYSP6wE3F\">Launch Bar</a>, if configured.</li><li>The&nbsp;<a class=\"reference-link\" href=\"#root/_help_xYmIYSP6wE3F\">Launch Bar</a>&nbsp;is displayed at the bottom of the screen.<ul><li>The launch bar uses a different configuration for icons than the desktop version. See the dedicated page for more information on how to configure it.</li></ul></li><li>Most of the note-related actions are grouped in the horizontal dots icon on the top-right of the note.</li><li>The&nbsp;<a class=\"reference-link\" href=\"#root/_help_3seOhtN8uLIY\">Tabs</a>&nbsp;are grouped under a tab switcher in the&nbsp;<a class=\"reference-link\" href=\"#root/_help_xYmIYSP6wE3F\">Launch Bar</a>, where the tabs are displayed in a full-screen grid with preview for easy switching, as well as additional options such as reopening closed tabs.</li><li>Since v0.100.0,&nbsp;<a class=\"reference-link\" href=\"#root/_help_luNhaphA37EO\">Split View</a>&nbsp;can also be used in mobile view, but with a maximum of two panes at once. The splits are displayed vertically instead of horizontally.</li></ul><h2>Installing as a PWA</h2><p>The mobile view can be set up as a PWA. While this does not offer any offline capabilities, it will display the application in full-screen and makes it easy to access via your mobile phone's home screen.</p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\"><span class=\"tn-icon bx bxl-apple\"></span>&nbsp;iOS with Safari</p><div class=\"trilium-tab-panel\"><ol><li>Open your default web browser and access your Trilium instance.</li><li>Login.</li><li>Press the […] button in the bottom-right of the screen and select Share.</li><li>Scroll down to reveal the full list of items and choose <em>Add to Home Screen</em>.</li><li>Press <em>Add</em> and the web app will be available.</li></ol></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\"><span class=\"tn-icon bx bxl-chrome\"></span>&nbsp;Android with Google Chrome</p><div class=\"trilium-tab-panel\"><aside class=\"admonition important\"><p>Google Chrome requires the server to be served over HTTPS in order to display in full-screen. If using HTTP, the app will appear like a normal web page (similar to a bookmark).</p></aside><ol><li>Open your default web browser and access your Trilium instance.</li><li>Login.</li><li>Press the three vertical dots icon in the top-right of the screen and select <em>Add to Home screen.</em></li><li>Select the <em>Install</em> option.</li><li>Select an appropriate name.</li><li>The web app will appear as an application, not on the home screen.</li></ol></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">Android with Brave</p><div class=\"trilium-tab-panel\"><aside class=\"admonition important\"><p>Brave requires the server to be served over HTTPS in order to display in full-screen. If using HTTP, the app will appear like a normal web page (similar to a bookmark).</p></aside><ol><li>Open your default web browser and access your Trilium instance.</li><li>Login.</li><li>Press the three vertical dots icon in the bottom-right of the screen and select <em>Add to Home screen</em>.</li><li>Press the <em>Install</em> option.</li><li>The web app will appear as an application, not on the home screen.</li></ol></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">Samsung Browser</p><div class=\"trilium-tab-panel\"><ol><li>Open your default web browser and access your Trilium instance.</li><li>Login.</li><li>Press the hamburger menu in the bottom-right of the screen.</li><li>Select <em>Add to</em>, followed by <em>Home screen</em>.</li><li>Press <em>Add</em> and the web app will appear on the home page.</li></ol></div></section></div><h2>Sharing to Trilium</h2><p>Once installed as a PWA on Android, Trilium appears in the system's share menu, so links, text, images and other files can be sent to it from other apps. Shared content is saved to the&nbsp;<a class=\"reference-link\" href=\"#root/_help_S0Fos78ZfcY7\">Note Inbox</a>, and Trilium opens the note it created:</p><ul><li>Text or a link becomes a text note. A shared link is also stored in the <code>#pageUrl</code> label.</li><li>A single file becomes an image note or a file note, placed directly in the inbox.</li><li>Several files, or files shared together with text, are placed under a new text note that holds the text.</li></ul><p>Every note created this way carries the <code>#clipType=share</code> label, which gives a shared text note the <span class=\"tn-icon bx bx-share\"></span> icon unless the note has an <code>#iconClass</code> of its own. A single share can carry at most 20 files.</p><aside class=\"admonition note\"><p>Sharing requires being logged in. If the session has expired, log in again and share once more.</p></aside><h2>Testing via the desktop application</h2><p>If you are running Trilium without a dedicated <a href=\"#root/_help_WOcw2SLH6tbX\">server installation</a>, you can still test the mobile application using the desktop application. For more information, see&nbsp;<a class=\"reference-link\" href=\"#root/_help_nRqcgfTb97uV\">Using the desktop application as a server</a>. To access it go to <code>http://&lt;ip&gt;:37840/login?mobile</code> .</p><h2>Forcing mobile/desktop frontend</h2><p>Trilium decides automatically whether to use mobile or desktop front-end. If this is not appropriate, you can use <code>?mobile</code> or <code>?desktop</code> query param on <strong>login</strong> page (Note: you might need to log out).</p><p>Alternatively, simply select <em>Switch to Mobile/Desktop Version</em> in the&nbsp;<a class=\"reference-link\" href=\"#root/_help_x3i7MxGccDuM\">Global menu</a>.</p><h2>Scripting</h2><p>You can alter the behavior with&nbsp;<a class=\"reference-link\" href=\"#root/_help_CdNpE2pqjmI6\">Scripting</a>, just like for normal frontend. For script notes to be executed, they need to have labeled <code>#run=mobileStartup</code>.</p><p>Custom&nbsp;<a class=\"reference-link\" href=\"#root/_help_xYmIYSP6wE3F\">Launch Bar</a>&nbsp;widgets are also supported.</p>",
+ "_help_RDslemsQ6gCp": "<figure class=\"image image-style-align-right image_resized\" style=\"width:33.52%;\"><img style=\"aspect-ratio:1242/2688;\" src=\"{{helpAssets}}/User%20Guide/Installation%20%26%20Setup/Mobile%20Frontend_IMG_1765.PNG\" width=\"1242\" height=\"2688\"></figure><p>Trilium has a mobile web frontend which is optimized for touch based devices - smartphones and tablets. It is activated automatically during login process based on browser detection.</p><p>Mobile frontend is limited in features compared to the full desktop version. See below for more details on this.</p><h2>Layout basics</h2><p>Unlike the desktop version, the mobile version has a slightly different UI meant to better fit the constrained screens of a mobile phone.</p><p>Here is a non-exhaustive list of differences between the desktop version and the mobile one:</p><ul><li>The&nbsp;<a class=\"reference-link\" href=\"#root/_help_oPVyFC7WL2Lp\">Note Tree</a>&nbsp;is displayed as a sidebar. To display the sidebar, press the button in the top-left of the screen.<ul><li>There is also a swipe gesture that can be done from the left of the screen, but the browser's navigation gesture interferes with it most of the time (depending on the platform).</li><li>Press and hold a note to display the&nbsp;<a class=\"reference-link\" href=\"#root/_help_YtSN43OrfzaA\">Note tree contextual menu</a>.</li></ul></li><li>The&nbsp;<a class=\"reference-link\" href=\"#root/_help_Ms1nauBra7gq\">Quick search</a>&nbsp;bar is also displayed at the top of the note tree.</li><li>The full&nbsp;<a class=\"reference-link\" href=\"#root/_help_eIg8jdvaoNNd\">Search</a>&nbsp;function can be triggered either from either the&nbsp;<a class=\"reference-link\" href=\"#root/_help_x3i7MxGccDuM\">Global menu</a>&nbsp;or from the&nbsp;<a class=\"reference-link\" href=\"#root/_help_xYmIYSP6wE3F\">Launch Bar</a>, if configured.</li><li>The&nbsp;<a class=\"reference-link\" href=\"#root/_help_x3i7MxGccDuM\">Global menu</a> is shorter: <em>Open New Window</em> and <em>Show Cheatsheet</em> are left out, and <em>Switch to Desktop Version</em> is under <em>Advanced</em>.</li><li>The&nbsp;<a class=\"reference-link\" href=\"#root/_help_xYmIYSP6wE3F\">Launch Bar</a>&nbsp;is displayed at the bottom of the screen.<ul><li>The launch bar uses a different configuration for icons than the desktop version. See the dedicated page for more information on how to configure it.</li></ul></li><li>Most of the note-related actions are grouped in the horizontal dots icon on the top-right of the note.</li><li>The&nbsp;<a class=\"reference-link\" href=\"#root/_help_3seOhtN8uLIY\">Tabs</a>&nbsp;are grouped under a tab switcher in the&nbsp;<a class=\"reference-link\" href=\"#root/_help_xYmIYSP6wE3F\">Launch Bar</a>, where the tabs are displayed in a full-screen grid with preview for easy switching, as well as additional options such as reopening closed tabs.</li><li>Since v0.100.0,&nbsp;<a class=\"reference-link\" href=\"#root/_help_luNhaphA37EO\">Split View</a>&nbsp;can also be used in mobile view, but with a maximum of two panes at once. The splits are displayed vertically instead of horizontally.</li></ul><h2>Installing as a PWA</h2><p>The mobile view can be set up as a PWA. While this does not offer any offline capabilities, it will display the application in full-screen and makes it easy to access via your mobile phone's home screen.</p><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\"><span class=\"tn-icon bx bxl-apple\"></span>&nbsp;iOS with Safari</p><div class=\"trilium-tab-panel\"><ol><li>Open your default web browser and access your Trilium instance.</li><li>Login.</li><li>Press the […] button in the bottom-right of the screen and select Share.</li><li>Scroll down to reveal the full list of items and choose <em>Add to Home Screen</em>.</li><li>Press <em>Add</em> and the web app will be available.</li></ol></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\"><span class=\"tn-icon bx bxl-chrome\"></span>&nbsp;Android with Google Chrome</p><div class=\"trilium-tab-panel\"><aside class=\"admonition important\"><p>Google Chrome requires the server to be served over HTTPS in order to display in full-screen. If using HTTP, the app will appear like a normal web page (similar to a bookmark).</p></aside><ol><li>Open your default web browser and access your Trilium instance.</li><li>Login.</li><li>Press the three vertical dots icon in the top-right of the screen and select <em>Add to Home screen.</em></li><li>Select the <em>Install</em> option.</li><li>Select an appropriate name.</li><li>The web app will appear as an application, not on the home screen.</li></ol></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">Android with Brave</p><div class=\"trilium-tab-panel\"><aside class=\"admonition important\"><p>Brave requires the server to be served over HTTPS in order to display in full-screen. If using HTTP, the app will appear like a normal web page (similar to a bookmark).</p></aside><ol><li>Open your default web browser and access your Trilium instance.</li><li>Login.</li><li>Press the three vertical dots icon in the bottom-right of the screen and select <em>Add to Home screen</em>.</li><li>Press the <em>Install</em> option.</li><li>The web app will appear as an application, not on the home screen.</li></ol></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\">Samsung Browser</p><div class=\"trilium-tab-panel\"><ol><li>Open your default web browser and access your Trilium instance.</li><li>Login.</li><li>Press the hamburger menu in the bottom-right of the screen.</li><li>Select <em>Add to</em>, followed by <em>Home screen</em>.</li><li>Press <em>Add</em> and the web app will appear on the home page.</li></ol></div></section></div><h2>Sharing to Trilium</h2><p>Once installed as a PWA on Android, Trilium appears in the system's share menu, so links, text, images and other files can be sent to it from other apps. Shared content is saved to the&nbsp;<a class=\"reference-link\" href=\"#root/_help_S0Fos78ZfcY7\">Note Inbox</a>, and Trilium opens the note it created:</p><ul><li>Text or a link becomes a text note. A shared link is also stored in the <code>#pageUrl</code> label.</li><li>A single file becomes an image note or a file note, placed directly in the inbox.</li><li>Several files, or files shared together with text, are placed under a new text note that holds the text.</li></ul><p>Every note created this way carries the <code>#clipType=share</code> label, which gives a shared text note the <span class=\"tn-icon bx bx-share\"></span> icon unless the note has an <code>#iconClass</code> of its own. A single share can carry at most 20 files.</p><aside class=\"admonition note\"><p>Sharing requires being logged in. If the session has expired, log in again and share once more.</p></aside><h2>Testing via the desktop application</h2><p>If you are running Trilium without a dedicated <a href=\"#root/_help_WOcw2SLH6tbX\">server installation</a>, you can still test the mobile application using the desktop application. For more information, see&nbsp;<a class=\"reference-link\" href=\"#root/_help_nRqcgfTb97uV\">Using the desktop application as a server</a>. To access it go to <code>http://&lt;ip&gt;:37840/login?mobile</code> .</p><h2>Forcing mobile/desktop frontend</h2><p>Trilium decides automatically whether to use mobile or desktop front-end. If this is not appropriate, you can use <code>?mobile</code> or <code>?desktop</code> query param on <strong>login</strong> page (Note: you might need to log out).</p><p>Alternatively, simply select <em>Switch to Mobile Version</em> in the&nbsp;<a class=\"reference-link\" href=\"#root/_help_x3i7MxGccDuM\">Global menu</a>. In the mobile version, select <em>Advanced</em> → <em>Switch to Desktop Version</em> there instead.</p><h2>Scripting</h2><p>You can alter the behavior with&nbsp;<a class=\"reference-link\" href=\"#root/_help_CdNpE2pqjmI6\">Scripting</a>, just like for normal frontend. For script notes to be executed, they need to have labeled <code>#run=mobileStartup</code>.</p><p>Custom&nbsp;<a class=\"reference-link\" href=\"#root/_help_xYmIYSP6wE3F\">Launch Bar</a>&nbsp;widgets are also supported.</p>",
"_help_MtPxeAWVAzMg": "<p><img src=\"{{helpAssets}}/User%20Guide/Installation%20%26%20Setup/Web%20Clipper_image.png\"></p><p>Trilium Web Clipper is a web browser extension which allows user to clip text, screenshots, whole pages and short notes and save them directly to Trilium Notes.</p><h2>Supported browsers</h2><p>Trilium Web Clipper officially supports the following web browsers:</p><ul><li>Mozilla Firefox, using Manifest v2.</li><li>Google Chrome, using Manifest v3. Theoretically the extension should work on other Chromium-based browsers as well, but they are not officially supported.</li></ul><h2>Obtaining the extension</h2><p>The extension is available from the official browser web stores:</p><ul><li><strong>Firefox</strong>: <a href=\"https://addons.mozilla.org/firefox/addon/trilium-notes-web-clipper/\">Trilium Web Clipper on Firefox Add-ons</a></li><li><strong>Chrome</strong>: <a href=\"https://chromewebstore.google.com/detail/trilium-web-clipper/ofoiklieachadcaeffficgjaajojpkpi\">Trilium Web Clipper on Chrome Web Store</a></li></ul><h2>Functionality</h2><ul><li>select text and clip it with the right-click context menu</li><li>click on an image or link and save it through context menu</li><li>save whole page from the popup or context menu</li><li>save a PDF that the browser shows, as a file note</li><li>save a screenshot of an area you select, of the visible part of the page or of the whole page, from either popup or context menu</li><li>create short text note from popup</li></ul><h2>The popup</h2><p>Clicking the extension's button in the browser toolbar opens its popup:</p><ul><li><p>The popup shows what will be saved from the current page: the note's title, which can be edited before saving, the website, and below them a preview, which starts with a box for your own note and the page's description. A switch above the preview chooses what to save, among what the page offers:</p><ul><li><em>Selection</em>, when text is selected on the page: <em>Save selection</em> saves it into the note of that page's clippings, as the context menu does.</li><li><em>Page</em>: <em>Save page to Trilium</em> saves the page's text and images. A smaller switch at the top of the preview chooses how much of the page to keep: <em>Article</em> keeps only the page's main text, without its menus, sidebars and footers, and <em>Whole page</em> keeps everything the page shows. <em>Whole page</em> is for pages that are not an article (such as a gallery or a page of cards), where <em>Article</em> can leave out part of the content; the preview shows what each one keeps. <em>Article</em> is unavailable on a page where Trilium finds no article. The author the page names shows under the description, marked by the <span class=\"tn-icon bx bx-user\"></span> icon. It can be edited or cleared before saving, or written in when the page names none, and is saved in the <code>#pageAuthor</code> label of the note. When the page states when it was published, that date shows under the author, marked by the <span class=\"tn-icon bx bx-calendar\"></span> icon, and is saved in the <code>#publishedDate</code> label of the note. When it states when it was last modified, that date shows below, marked by the <span class=\"tn-icon bx bx-history\"></span> icon, and is saved in the <code>#modifiedDate</code> label.</li><li><em>PDF</em>, when the tab shows a PDF in the browser's viewer: <em>Save PDF to Trilium</em> downloads the PDF and saves it as a file note, which Trilium opens in its&nbsp;<a class=\"reference-link\" href=\"#root/_help_XJGJrpu7F9sh\">PDFs</a> viewer. Only the title and the description can be edited, since a file note has no text of its own for your note. The page's address is saved in the note's <code>#pageUrl</code> label and the PDF's file name in <code>#originalFileName</code>. Saving a PDF needs Trilium v0.107.0 or later.</li><li><em>Bookmark</em>, always: there is no preview, and <em>Save bookmark</em> saves a link to the page with your note as the content of the note. Left empty, the title stays the page's title.</li></ul><p>The box for your note, marked by the <span class=\"tn-icon bx bx-info-circle\"></span> icon, has the cursor when the popup opens, so a note (such as why the page is worth keeping) can be typed right away. It grows with its text, and keeps it when switching between <em>Selection</em>, <em>Page</em> and <em>Bookmark</em>. A note on a selection or a page is saved above the clipped content, in a <em>Note</em> admonition. Left empty, nothing is added. <kbd>Ctrl</kbd>+<kbd>Enter</kbd> in any of the popup's fields saves, whichever is chosen.</p><p>The description, marked by the <span class=\"tn-icon bx bx-align-left\"></span> icon, comes from the page's <code>description</code> meta tag, or the one it gives social sites. It can be edited or cleared before saving, or written in when the page has none, and is saved in the <code>#pageDescription</code> label of the note. Clippings saved with the keyboard shortcuts or the context menu, screenshots and images included, get the description as the page gives it. Each clipping that brings a description updates the label. The description, the author and the dates are shown by clicking the <em>Web clip</em> badge next to the title of the note (see <a class=\"reference-link\" href=\"#root/_help_B5dihXRDksTk\">Note badges</a>).</p><p>The popup opens on the selection if there is one, otherwise on <em>Page</em>, showing the article, or the whole page when the page has no article. On a PDF, it opens on <em>PDF</em>. On a page that shows nothing to save, it opens on <em>Bookmark</em> and says so. The keyboard shortcuts and the context menu still save right away, without a preview: saving the whole page that way saves the article, the whole page when the page has no article, or the PDF when the tab shows one.</p></li><li><p>Pages the extension cannot access (the browser's own pages, the extension stores, and pages that were open before the extension was installed until they are reloaded) cannot be saved or captured, so the popup says so in place of the preview, and only <em>All tabs</em> remains available there.</p></li><li><p>Below the preview, a row of buttons offers the other actions: <em>Area</em> (a screenshot of an area you select), <em>Visible</em> (a screenshot of the visible part of the page), <em>Full page</em> (a screenshot of the whole page) and <em>All tabs</em> (saves the links of every tab in the current window as a list of <a class=\"reference-link\" href=\"#root/_help_UmgZAfcltxkS\">Link Previews</a>, or of plain links when <em>Autogenerate link previews</em> is turned off). Hovering over a button shows its full name and, if it has one, its keyboard shortcut.</p></li><li><p><em>Full page</em> scrolls through the page, takes a screenshot of each part and joins them into one image, then scrolls back to where the page was. The scrollbars are hidden while it does, so they do not appear in the image. Stay on the tab until it is saved: switching to another tab stops the screenshot. A header that stays at the top of the window appears once, at the top of the image, and headings that stick while scrolling appear where they are in the page. Other elements that stay in place while scrolling (such as cookie banners and chat buttons) are left out, while a background that fills the whole window repeats on every screen. In Firefox, the page is captured without scrolling through it, which is faster: such a background then appears only at the top, and images that the page loads only once they are scrolled into view can be missing. A long page is saved as several images, one below the other in the note. A page longer than 100 screens is cut off there, and the message after saving says so. Screenshots keep their full height in Trilium: <em>Resize image</em> (under <em>Automatically compress images</em> in Options → Media) limits only their width.</p></li><li><p>The popup stays open while Trilium saves, which can take a few seconds for a long page or a large PDF, and the other actions wait until it is done. The bar at the top of the popup then says, in green, that the clipping was saved (in place of the notice that the page was already clipped), with <em>Open note</em> to open it in Trilium (and, after <em>All tabs</em>, <em>Close saved tabs</em>), or, in red, why it could not be saved. The same clipping cannot be saved twice by accident: the save button stays disabled until another mode is chosen. <em>Crop</em> is the exception: the popup closes so that an area of the page can be selected, and the notification on the page reports the outcome.</p></li><li><p>If the current page was already clipped, a notice at the top offers to open the note in Trilium.</p></li><li><p>If Trilium cannot be found, the popup explains why instead of showing the actions, with buttons to look for Trilium again and to open the options.</p></li><li><p>The bottom of the popup shows whether the extension is connected to Trilium, as a colored dot (green when connected, amber when the versions are not compatible, red when Trilium was not found) next to a description of the connection, followed by the buttons for the extension's options and for this help page. A button to check the connection again appears next to them when hovering over the bar, and stays visible while Trilium cannot be reached or is not compatible.</p></li></ul><h2>Location of clippings</h2><p>Trilium will save these clippings as a new child note under a \"clipper inbox\" note.</p><p>By default, that's the&nbsp;<a class=\"reference-link\" href=\"#root/_help_l0tKav7yLHGF\">Day Notes</a>&nbsp;but you can override that by setting the <a href=\"#root/_help_zEY4DaJG4YT5\">label</a> <code>clipperInbox</code>, on any other note.</p><p>Further clippings of the same kind from the same page are added to the note created by the first one, even on a later day or after that note was moved out of the clipper inbox. The note stays where it is and is not cloned back into the inbox. A PDF is the exception: each save creates a new file note, since the PDF can have changed since it was last saved.</p><p>The icon of a clipped note shows what was saved:</p><ul><li><span class=\"tn-icon bx bx-paperclip\"></span> a selection, a screenshot or a link from the context menu;</li><li><span class=\"tn-icon bx bx-globe\"></span> a page (<em>Article</em> or <em>Whole page</em>);</li><li><span class=\"tn-icon bx bx-bookmark\"></span> a bookmark;</li><li><span class=\"tn-icon bx bx-window-alt\"></span> the tabs of a window.</li></ul><p>The icon is derived from the note's <code>#clipType</code> label, so setting an <code>#iconClass</code> label on the note replaces it. A saved PDF has the icon of a PDF file, like any other PDF in Trilium.</p><h2>Embedded videos</h2><p>A YouTube video embedded in a clipped page is saved as a <a class=\"reference-link\" href=\"#root/_help_UmgZAfcltxkS\">Link Previews</a> embed, with the video's title and thumbnail. As with a link preview added in the editor, the video plays only when clicked. Other embedded content (such as videos from other websites) is not saved.</p><p>The popup's preview shows each such video as a chip with the YouTube icon and the video's short link, and leaves out the embedded content that will not be saved.</p><h2>Keyboard shortcuts</h2><p>Keyboard shortcuts are available for most functions:</p><ul><li>Save selected text: <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>S</kbd> (Mac: <kbd>⌘</kbd>+<kbd>⇧</kbd>+<kbd>S</kbd>)</li><li>Save whole page: <kbd>Alt</kbd>+<kbd>Shift</kbd>+<kbd>S</kbd> (Mac: <kbd>⌥</kbd>+<kbd>⇧</kbd>+<kbd>S</kbd>)</li><li>Save a screenshot of an area: <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>E</kbd> (Mac: <kbd>⌘</kbd>+<kbd>⇧</kbd>+<kbd>E</kbd>)</li><li>Save all tabs of the current window: no default shortcut, but one can be assigned as described below.</li><li>Save a screenshot of the whole page: no default shortcut, but one can be assigned as described below.</li></ul><p>To set custom shortcuts, follow the directions for your browser.</p><ul><li><strong>Firefox</strong>: <code>about:addons</code> → Gear icon ⚙️ → Manage extension shortcuts</li><li><strong>Chrome</strong>: <code>chrome://extensions/shortcuts</code></li></ul><aside class=\"admonition note\"><p>On Firefox, the default shortcuts interfere with some browser features. As such, the keyboard combinations will not trigger the Web Clipper action. To fix this, simply change the keyboard shortcut to something that works. The defaults will be adjusted in future versions.</p></aside><h2>Configuration</h2><p>The extension needs to connect to a running Trilium instance. By default, it looks for the desktop application on port 37840 of the local computer. If the desktop application runs on a different port (for example because it was started with the <code>TRILIUM_PORT</code> environment variable), enter that port in the extension's options. The extension checks for Trilium again every minute, or right away when pressing the refresh button at the bottom of its popup.</p><p>It's also possible to configure the <a href=\"#root/_help_WOcw2SLH6tbX\">server</a> address if you don't run the desktop application, or want it to work without the desktop application running.</p><p>To connect to a server, enter its address and your password in the extension's options and press <em>Login to the server instance</em>. If the server uses <a href=\"#root/_help_7DAiwaf8Z7Rz\">multi-factor authentication</a>, also fill in <em>Authentication code</em> with the current code from your authenticator app (or one of your recovery codes); otherwise leave it empty. The password and the code are used only once, to obtain a token for the extension, and are not stored.</p><h3>When a clipping fails</h3><p>After each clipping made with a keyboard shortcut or the context menu, a notification in the corner of the page confirms that it was saved, with a link to open the new note in Trilium. A clipping made from the popup reports in the popup instead, unless the popup was closed before it was saved. If the clipping could not be saved, the message says why instead:</p><ul><li>Trilium was not found: start the desktop application, or check the server address and token in the extension's options.</li><li>The versions of Trilium and the extension are not compatible: update the one the message names.</li><li>Trilium rejected the request: the message includes the reason Trilium gave.</li><li>The popup could not reach the extension's background script, or it gave no answer: close the popup and open it again. If the extension was just updated or reloaded, reload the page as well.</li><li>A PDF could not be saved: Trilium is older than v0.107.0, the website refused to send the PDF again, or the PDF is larger than 100 MB. The extension downloads the PDF with the browser's cookies for that website, so a PDF behind a login can be saved while you are logged in.</li></ul><p>The extension downloads the images of a clipping itself, so that they are stored in Trilium together with the note. If some of them cannot be downloaded (for example because the website refuses the request), the clipping is still saved, and the notification says how many images are missing. Those images keep their address on the original website: Trilium tries to download them once more if <em>Download images automatically</em> is enabled in <a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a> → <em>Media</em>, and otherwise the note shows them from the website for as long as it serves them.</p><p>The notification is shown on the page itself, so it does not appear on pages where extensions cannot run (such as the browser's own settings pages, the extension stores and Firefox's PDF viewer). A clipping saved from the popup on such a page still reports in the popup.</p><h2>Testing development versions</h2><p>Development versions are version pre-release versions, generally meant for testing purposes. These are not available in the Google or Firefox web stores, but can be downloaded from either:</p><ul><li><a href=\"https://github.com/TriliumNext/Trilium/releases\">GitHub Releases</a> by looking for releases starting with <em>Web Clipper.</em></li><li>Artifacts in GitHub Actions, by looking for the <a href=\"https://github.com/TriliumNext/Trilium/actions/workflows/web-clipper.yml\"><em>Deploy web clipper extension</em> workflow</a>. Once a workflow run is selected, the ZIP files are available in the <em>Artifacts</em> section, under the name <code>web-clipper-extension</code>.</li></ul><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\"><span class=\"tn-icon bx bxl-chrome\"></span>&nbsp;Chrome</p><div class=\"trilium-tab-panel\"><ol><li>Download <code>trilium-web-clipper-[x.y.z]-chrome.zip</code>.</li><li>Extract the archive.</li><li>In Chrome, navigate to <code>chrome://extensions/</code></li><li>Toggle <em>Developer Mode</em> in top-right of the page.</li><li>Press the <em>Load unpacked</em> button near the header.</li><li>Point to the extracted directory from step (2).</li></ol></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\"><span class=\"tn-icon bx bxl-firefox\"></span>&nbsp;Firefox</p><div class=\"trilium-tab-panel\"><aside class=\"admonition warning\"><p>Firefox prevents installation of unsigned packages in the “retail” version. To be able to install extensions from disk, consider using <em>Firefox Developer Edition</em> or a non-branded version of Firefox (e.g. <em>GNU IceCat</em>).</p><p>One time, go to <code>about:config</code> and change <code>xpinstall.signatures.required</code> to <code>false</code>.</p></aside><ol><li>Navigate to <code>about:addons</code>.</li><li>Select <em>Extensions</em> in the left-side navigation.</li><li>Press the <em>Gear</em> icon on the right of the <em>Manage Your Extensions</em> title.</li><li>Select <em>Install Add-on From File…</em></li><li>Point it to <code>trilium-web-clipper-[x.y.z]-firefox.zip</code>.</li><li>Press the <em>Add</em> button to confirm.</li></ol></div></section></div><h2>Credits</h2><p>Some parts of the code are based on the <a href=\"https://github.com/laurent22/joplin/tree/master/Clipper\">Joplin Notes browser extension</a>.</p>",
"_help_n1lujUxCwipy": "<p>This document outlines the steps required to upgrade Trilium to a new release version.</p><h2>How to Upgrade</h2><p>Trilium does not support built-in automatic upgrades; all updates must be performed manually. The upgrade process varies depending on the installation method:</p><ul><li><a href=\"#root/_help_rWX5eY045zbE\"><strong>Docker Server Installation</strong></a>: Pull the new image and restart the container.</li><li><strong>Other Installations</strong>: Download the latest version from the <a href=\"https://github.com/TriliumNext/Trilium/releases/latest\">release page</a> and replace the existing application files.</li></ul><h2>Database Compatibility and Migration</h2><p>Upon startup, Trilium will automatically migrate the <a href=\"#root/_help_wX4HbRucYSDD\">database</a> to the new version. Note that after migration, older versions of Trilium will be unable to read the database. If you need to revert to a previous version of Trilium and its database, you can restore the <a href=\"#root/_help_ODY7qQn5m2FT\">backup</a> that is created prior to migration.</p><h2>Sync Compatibility</h2><p>The <a href=\"#root/_help_cbkrhQjrkKrh\">synchronization</a> protocol used by Trilium is versioned, requiring all members of the sync cluster to use the same protocol version. Therefore, when upgrading to a new version, you may need to upgrade all instances in the sync cluster. Changes to the sync protocol version are typically indicated on the release page.</p>",
"_help_ODY7qQn5m2FT": "<p>Trilium supports simple backup scheme where it saves copy of the&nbsp;<a class=\"reference-link\" href=\"#root/_help_wX4HbRucYSDD\">Database</a>&nbsp;on these events:</p><ul><li>once a day</li><li>once a week</li><li>once a month</li><li>before DB migration to newer version</li></ul><p>So in total you'll have at most 4 backups from different points in time which should protect you from various problems. These backups are stored by default in <code>backup</code> directory placed in the <a href=\"#root/_help_tAassRL4RSQL\">data directory</a>.</p><p>This is only very basic backup solution, and you're encouraged to add some better backup solution - e.g. backing up the&nbsp;<a class=\"reference-link\" href=\"#root/_help_wX4HbRucYSDD\">Database</a>&nbsp;to cloud / different computer etc.</p><p>Note that&nbsp;<a class=\"reference-link\" href=\"#root/_help_cbkrhQjrkKrh\">Synchronization</a>&nbsp;provides also some backup capabilities by its nature of distributing the data to other computers.</p><h2>Creating a backup</h2><div class=\"trilium-tabs\"><section class=\"trilium-tab\"><p class=\"trilium-tab-title\"><span class=\"tn-icon bx bx-desktop\"></span>&nbsp;On the desktop app &amp; web client</p><div class=\"trilium-tab-panel\"><ol><li>Go to&nbsp;<a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a> → <em>Backup</em> and press the <em>Backup now</em> button.</li><li>The backup creation process may take a few moments, especially for larger databases. A notification will inform you when the backup is complete.</li><li>The backup will be saved as <code>backup-now</code> in the <em>Existing backups</em> list, where you can download it.</li></ol></div></section><section class=\"trilium-tab\"><p class=\"trilium-tab-title\"><span class=\"tn-icon bx bx-globe\"></span>&nbsp;On the standalone client</p><div class=\"trilium-tab-panel\"><ol><li>Go to&nbsp;<a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a> → <em>Backup</em> and press the <em>Download backup</em> button.</li><li>You will be prompted to restart the app. Confirm, and the app will restart automatically.</li><li>Set a <em>backup name</em> or <em>password</em> (both optional), then press <em>Continue</em>.</li><li>Press the <em>Generate and download</em> button and wait for the download to complete.</li><li>Once you confirm the download is saved on your device, press <em>Finish</em> to complete</li></ol></div></section></div><h2>Downloading a backup</h2><ul><li><strong>Desktop and web client</strong>: to download an existing backup, navigate to&nbsp;<a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a> → <em>Backup</em> → <em>Existing backups</em> and select <em>Download</em> (<span class=\"tn-icon bx bx-download\"></span>).</li><li><strong>Standalone client</strong>: automatic backups are not supported in this version. You can manually create and download a backup by going to&nbsp;<a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a> → <em>Backup</em> → <em>Download backup</em>.</li></ul><h2>Restoring a backup</h2><ul><li><strong>For a new Trilium instance</strong>: When setting up a new Trilium instance, use the <em>Restore from backup</em> option in the setup menu to guide you through restoring your existing backup.</li><li><strong>For an existing Trilium instance</strong>: To restore a backup and replace your current database, go to&nbsp;<a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a> → <em>Backup</em> and click <em>Restore a backup</em>. You will be prompted to restart the app for the restoration process to begin. After restarting, you can choose to back up the existing database before overwriting it. Note: For the web client, use the Start Over feature (&nbsp;<a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a> → <em>Database</em> → <em>Start over</em> (<span class=\"tn-icon bx bx-reset\"></span>)) to switch to the setup screen and restore a backup.</li></ul><p>Next, select the backup file (.db or .tnbackup) from your device. The web client is optimized for handling large backups and is resilient to unstable network conditions, similar to the desktop application.</p><p>If your database is encrypted, you will be prompted to enter the password used for encrypting the backup file. Without the correct password, decryption and restoration cannot proceed.</p><p>Restoring a backup may take some time, depending on its size. Once it completes, Trilium will open the freshly restored database.</p><h3>The alternative way for restoring a backup</h3><p>Let's assume you want to restore the weekly backup (only in .db format, .tnbackup files are not supported by this method), here's how to do it:</p><ul><li>find <a href=\"#root/_help_tAassRL4RSQL\">data directory</a> Trilium uses - easy way is to open \"About Trilium Notes\" (<span class=\"tn-icon bx bx-info-circle\"></span>) from \"Menu\" in upper left corner and looking at \"data directory\"<ul><li>I'll refer to <code>~/trilium-data</code> as data directory from now on</li></ul></li><li>find <code>~/trilium-data/backup/backup-weekly.db</code> - this is the&nbsp;<a class=\"reference-link\" href=\"#root/_help_wX4HbRucYSDD\">Database</a>&nbsp;backup.</li><li>at this point stop/kill Trilium</li><li>delete <code>~/trilium-data/document.db</code>, <code>~/trilium-data/document.db-wal</code> and <code>~/trilium-data/document.db-shm</code> (latter two files are auto generated)</li><li>copy and rename this <code>~/trilium-data/backup/backup-weekly.db</code> to <code>~/trilium-data/document.db</code></li><li>make sure that the file is writable, e.g. with <code>chmod 600 document.db</code></li><li>start Trilium again</li></ul><aside class=\"admonition warning\"><p>If you have configured sync then you need to do it across all members of the sync cluster, otherwise older version (restored backup) of the document will be detected and synced to the newer version.</p></aside><h2>Changing the backup location in Trilium (desktop only)</h2><p>Starting with version 0.105, the Trilium desktop client allows users to change the directory where backups are stored. Follow these steps to specify a custom backup directory:</p><ol><li>Navigate to&nbsp;<a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a> → <em>Backup</em> → <em>Backup location</em>.</li><li>Click the <em>Select location</em> button.</li><li>Choose any writable directory on your file system. This could include network shares, depending on your operating system.</li></ol><p>Once you set a custom directory, all manual and automatic backups will be saved there. If the selected directory becomes unavailable, backups may fail or revert to the default location.</p><aside class=\"admonition tip\"><p>For better privacy when using unsafe backup locations, you can enable backup encryption, which makes the backup file unreadable without the correct password.</p></aside><h2>Backup encryption</h2><p>Trilium can secure the entire content of the database backup, ensuring it remains unreadable unless the correct password is provided. This is particularly useful for storing backups in unsecured locations, like network shares, unencrypted external drives, or cloud services.&nbsp;</p><p>Encrypted database backups use the Trilium Backup Container (.tnbackup) format, which relies on AES-256-GCM. This authenticated encryption mode scrambles the data and generates a tag confirming it hasn't been altered. The password itself isn't directly used as the key; it's processed through scrypt, a key derivation function designed to be slow and memory-intensive, making brute-force password guessing difficult even with powerful hardware. Each backup also receives a random 16-byte salt, ensuring that the same password never produces the same encryption key twice. Additionally, critical metadata such as chunk order, length, and header flags are cryptographically bound into the encryption (via \"additional authenticated data\"), preventing undetected tampering like reorder, truncate, or splice operations.</p><h3>Enabling backup encryption</h3><p>To enable encryption for automatic backups in the Desktop application:</p><ol><li>Go to&nbsp;<a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a> → <em>Backup</em> → <em>Backup options</em>.</li><li>Click on <em>Turn on encryption</em> and set a password.</li></ol><p>Once encryption is enabled, all newly created backups (both automatic and manual) will be encrypted with the specified password. Backups created prior to enabling encryption will remain unsecured.</p><p>You can change the password anytime using the <em>Change password</em> button. The new password will apply to backups created after the change.</p><p>To disable encryption, uncheck&nbsp;<a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a> → <em>Backup</em> → <em>Enable encryption</em>.</p><aside class=\"admonition note\"><p>On some systems, a keyring may not be available for Trilium to securely store the encryption password. In such cases, the encryption option is disabled.</p></aside><h2>Backup compression</h2><p>Database backups can be optionally compressed to minimize storage footprint. This method is effective primarily when the database consists largely of text content. However, media files (images, videos, audio), along with PDF, ODF, and DOCX files, are already compressed in their original formats and won't benefit from further compression.</p><p>Compressed backups are stored using the Trilium Backup Container (.tnbackup), employing RFC 1952 GZIP compression.</p><aside class=\"admonition warning\"><p><strong>Note:</strong> Compression increases the time required for backup creation and restoration. It may also lead to higher CPU usage during automatic backups, potentially draining the battery faster on battery-powered devices. Enable this option only if necessary.</p></aside><h3>Enabling Backup Compression (Desktop Only)</h3><p>To enable compression for new automatic and manual backups, navigate to&nbsp;<a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a> → <em>Backup</em> → <em>Backup options</em> and toggle <em>Enable compression</em> to on.</p><h2>Disabling backup</h2><p>Although this is not recommended, it is possible to disable backup in <code>config.ini</code> in the <a href=\"#root/_help_tAassRL4RSQL\">data directory</a>:</p><pre><code class=\"language-text-x-trilium-auto\">[General]\n... some other configs\n# set to true to disable backups (e.g. because of limited space on server)\nnoBackup=true</code></pre><p>You can also review the <a href=\"#root/_help_Gzjqa934BdH4\">configuration</a> file to provide all <code>config.ini</code> values as environment variables instead.</p><p>See <a href=\"https://github.com/TriliumNext/Trilium/blob/master/config-sample.ini\">sample config</a>.</p>",
@@ -207,7 +207,7 @@
"_help_VQjhl61rlWh9": "<p>Markdown Snippets are closely related to&nbsp;<a class=\"reference-link\" href=\"#root/_help_KC1HB96bqqHX\">Templates</a>, but instead of defining the content of an entire note, a snippet is a reusable piece of Markdown text that can easily be inserted into a&nbsp;<a class=\"reference-link\" href=\"#root/_help_6RM1Q7ppFVoj\">Markdown</a>&nbsp;note.</p><h2>Creating a Markdown snippet</h2><p>In the&nbsp;<a class=\"reference-link\" href=\"#root/_help_oPVyFC7WL2Lp\">Note Tree</a>: </p><ol><li>Right-click the note where you want to place the snippet.</li><li>Select <em>Insert child note</em>.</li><li>Select <em>More</em> → <em>Markdown snippet</em>.</li></ol><p>Then simply type the desired content into the note.</p><p>The note's title becomes the title of the snippet. Optionally, you can add a description in the&nbsp;<a class=\"reference-link\" href=\"#root/_help_OFXdgB2nNk1F\">Promoted Attributes</a>&nbsp;section.</p><h2>Inserting a snippet</h2><p>To insert a snippet, type <code>/snippet</code> and select its title from the dropdown.</p><p><a class=\"reference-link\" href=\"#root/_help_IEgsWp5hHH35\">Code Snippets</a>&nbsp;with their language mode set to \"Plain text\" are also listed here.</p><h2>Limitations</h2><ul><li>Unlike&nbsp;<a class=\"reference-link\" href=\"#root/_help_KC1HB96bqqHX\">Templates</a>, snippets cannot be limited to a particular <a href=\"#root/_help_9sRHySam5fXb\">workspace</a>.</li></ul>",
"_help_IEgsWp5hHH35": "<p>Code Snippets are closely related to&nbsp;<a class=\"reference-link\" href=\"#root/_help_KC1HB96bqqHX\">Templates</a>, but instead of defining the content of an entire note, a snippet is a reusable piece of code that can easily be inserted into a&nbsp;<a class=\"reference-link\" href=\"#root/_help_6f9hih2hXXZk\">Code</a>&nbsp;note.</p><h2>Creating a Code snippet</h2><p>In the&nbsp;<a class=\"reference-link\" href=\"#root/_help_oPVyFC7WL2Lp\">Note Tree</a>: </p><ol><li>Right-click the note where you want to place the snippet.</li><li>Select <em>Insert child note</em>.</li><li>Select <em>More</em> → <em>Code snippet</em>.</li></ol><p>Then simply type the desired code into the note and set the correct language mode.</p><p>The note's title becomes the title of the snippet. Optionally, you can add a description in the&nbsp;<a class=\"reference-link\" href=\"#root/_help_OFXdgB2nNk1F\">Promoted Attributes</a>&nbsp;section.</p><h2>Inserting a snippet</h2><p>To insert a snippet, type <kbd>/</kbd> followed by the first letters of its title, then select it from the list. Typing <code>/snippet</code> lists every snippet available in the note. This also works in an included code or Markdown note that is being edited in place, see <a class=\"reference-link\" href=\"#root/_help_nBAXQFj20hS1\">Include Note</a>.</p><aside class=\"admonition important\"><p>Only code snippets whose language mode matches the current code note are listed. For example, a CSS code note shows only CSS snippets, not JavaScript ones. The exception is snippets set to \"Plain text\", which are available in&nbsp;<a class=\"reference-link\" href=\"#root/_help_6RM1Q7ppFVoj\">Markdown</a>&nbsp;notes and any code note regardless of its language mode.</p></aside><h2>Limitations</h2><ul><li>Unlike&nbsp;<a class=\"reference-link\" href=\"#root/_help_KC1HB96bqqHX\">Templates</a>, snippets cannot be limited to a particular <a href=\"#root/_help_9sRHySam5fXb\">workspace</a>.</li></ul>",
"_help_BCkXAVs63Ttv": "<p>Note map is a visualization of connections between notes. This provides an insight into a structure (\"web\") of notes.</p><p>There are two types of note map:</p><ul><li>Link Map, which shows relations between notes.</li><li>Note Map, which shows the hierarchical tree structure.</li></ul><h2>Accessing the note map</h2><p>The note map comes into multiple flavors:</p><ul><li>The note map is available in the&nbsp;<a class=\"reference-link\" href=\"#root/_help_KRlZFoIH0j6p\">Connections tab</a>&nbsp;in the&nbsp;<a class=\"reference-link\" href=\"#root/_help_RnaPdbciOfeq\">Right Sidebar</a>, in the <em>Note map</em> section.<ul><li>It can also be accessed by going to&nbsp;<a class=\"reference-link\" href=\"#root/_help_8YBEPzcpUgxw\">Note menu</a>&nbsp;→ <em>Note map</em>, which will focus the sidebar at the right section.</li></ul></li><li>To display a full-screen note map, there is a <a href=\"#root/_help_bdUJEHsAPYQR\">dedicated note type</a> with the same name.</li><li>To view the global note map (of all the notes in the knowledge base), there is a dedicated <em>Note map</em> button in the&nbsp;<a class=\"reference-link\" href=\"#root/_help_xYmIYSP6wE3F\">Launch Bar</a>.</li></ul><h2>Terminology and structure</h2><ul><li>Each note is represented as a <em>node</em> in the graph, with the title displayed underneath.<ul><li>When the map is zoomed out, the title can still be viewed by hovering over the node.</li><li>The <a href=\"#root/_help_p9kXRFAkwN4o\">icon and color</a> of the note are respected.</li></ul></li><li>The root node is the reference point for which the relations and hierarchical structure are displayed.<ul><li>When accessing the note map through the&nbsp;<a class=\"reference-link\" href=\"#root/_help_RnaPdbciOfeq\">Right Sidebar</a>, the root node is the current note.</li><li>When using a dedicated&nbsp;<a class=\"reference-link\" href=\"#root/_help_bdUJEHsAPYQR\">Note Map</a>&nbsp;note, the root note can be either the parent note, the currently <a href=\"#root/_help_OR8WJ7Iz9K4U\">hoisted</a> note or a specific note. See the note type documentation for more information.</li></ul></li></ul><h2>Interaction</h2><ul><li>Nodes can be dragged around, but they will return to their original position once released.<ul><li>To have the notes remain in the same position as they were dragged, press the <em>Fix nodes</em> button. The position of the notes is not saved, so it will return to normal once you navigate to another note or restart the application.</li></ul></li><li>When hovering over a node, the adjacent relations and nodes are highlighted.</li><li>The distance between nodes can be adjusted via the slider in the bottom-left. Similarly, this value is not saved.</li><li>To zoom, use the mouse wheel, pinch on a touch screen, or press the <span class=\"tn-icon bx bx-plus-circle\"></span> and <span class=\"tn-icon bx bx-minus-circle\"></span> buttons in the bottom-right corner.<ul><li>To bring the whole map back into view, press the <span class=\"tn-icon bx bx-scan\"></span> <em>Fit to view</em> button next to them.</li><li>The zoom buttons are not shown on mobile, where pinching zooms instead. The <em>Fit to view</em> button is always shown.</li></ul></li><li><a class=\"reference-link\" href=\"#root/_help_MKmLg5x6xkor\">Archived Notes</a>&nbsp;are generally ignored by the note map in order to reduce clutter. There is one exception: if the root note is also archived, then all archived notes are displayed too.</li></ul><h2>Link Map</h2><img src=\"{{helpAssets}}/User%20Guide/Advanced%20Usage/Note%20Map%20(Link%20map%2C%20Tree%20map)_image.png\" width=\"1425\" height=\"1093\"><p>The link map is a visualization of links and&nbsp;<a class=\"reference-link\" href=\"#root/_help_Cq5X6iKQop6R\">Relations</a>&nbsp;incoming to and outgoing from a particular note.</p><p>The map indicates the following types of relations:</p><ul><li><a class=\"reference-link\" href=\"#root/_help_hrZ1D00cLbal\">Internal (reference) links</a>&nbsp;between notes.</li><li><a class=\"reference-link\" href=\"#root/_help_Cq5X6iKQop6R\">Relations</a></li></ul><p>The link map will also show unlinked notes that are part of the hierarchy as a cloud of unconnected dots. On the&nbsp;<a class=\"reference-link\" href=\"#root/_help_RnaPdbciOfeq\">Right Sidebar</a>&nbsp;deliberately omits this in order to save some space, but they will be revealed once the map is maximized.</p><h2>Tree Map</h2><p>Shows hierarchical map of notes:</p><figure class=\"image\"><img style=\"aspect-ratio:1420/1490;\" src=\"{{helpAssets}}/User%20Guide/Advanced%20Usage/1_Note%20Map%20(Link%20map%2C%20Tree%20map)_image.png\" width=\"1420\" height=\"1490\"></figure><h2>See also</h2><ul><li>Apart from the note map feature which can be accessed from any note, it is also possible to create a dedicated note which will display the relations in full screen. See&nbsp;<a class=\"reference-link\" href=\"#root/_help_bdUJEHsAPYQR\">Note Map</a>&nbsp;for more information.</li><li><a class=\"reference-link\" href=\"#root/_help_iRwzGnHPzonm\">Relation Map</a>&nbsp;is a similar concept, with some differences:<ul><li>note map is automatically generated while relation map must be created manually</li><li>relation map is a type of note while a link map is just virtual visualization</li></ul></li></ul>",
- "_help_R9pX4DGra2Vt": "<p>Trilium allows you to share selected notes as <strong>publicly accessible</strong> read-only documents. This feature is particularly useful for publishing content directly from your Trilium notes, making it accessible to others online.</p><figure class=\"image\"><img style=\"aspect-ratio:1144/660;\" src=\"{{helpAssets}}/User%20Guide/Advanced%20Usage/Sharing_image.png\" width=\"1144\" height=\"660\"></figure><h2>Features, interaction and limitations</h2><ul><li>Searching by note title.</li><li>Light and dark mode, following the visitor's system setting by default, also while the page is open. The visitor can pick <em>Light</em>, <em>Dark</em> or <em>System</em> with the buttons at the top of the navigation pane; the choice is remembered by the browser.</li><li>A layout centered on wide screens, with the navigation tree and the table of contents at either side of the content, and a mobile-friendly layout on narrow ones. There, the navigation tree slides in from the menu button in the header, and lists the headings of the current page below its entry (at the top of the pane, for a page the tree does not show).</li><li>Collapsible tree with the same note icons as the application. It keeps the sections the visitor expanded and its scroll position while they move between the pages of the site, and shows the current note.</li><li>Customizable logo.</li><li>Quick navigation buttons (previous and next note).</li><li>Notes that hide their children from the tree with <code>#subtreeHidden</code> (such as a <a class=\"reference-link\" href=\"#root/_help_CtBQqbwXDx1w\">Kanban Board</a>) show a badge counting them in place of listing them. The page of one of those children shows only that child below its parent, and the previous and next buttons skip them.</li><li>The subpages of a text or code note shown below its content as cards, as in the application. Each card shows the icon of the subpage and the start of its text (or its <code>#shareDescription</code>), or, for a subpage without text, links to its own first subpages. The cards can be hidden with <code>#hideChildrenOverview</code>.</li><li>Displaying the date of the last update of the note, written out in the application's language.</li><li>Marking the page with the application's language and its text direction, and the content of the note with its own <a href=\"#root/_help_veGu4faJErEM\">content language</a>, for screen readers and right-to-left text.</li></ul><h3>By note type</h3><figure class=\"table\"><table class=\"ck-table-resized\"><colgroup><col style=\"width:19.92%;\"><col style=\"width:41.66%;\"><col style=\"width:38.42%;\"></colgroup><thead><tr><th>&nbsp;</th><th>Supported features</th><th>Limitations</th></tr></thead><tbody><tr><th><a class=\"reference-link\" href=\"#root/_help_iPIMuisry3hd\">Text</a></th><td><ul><li>Table of contents.</li><li>A link next to each heading, shown while the pointer is over the heading. Clicking it shows the address of the section in the address bar of the browser and copies it, to share a link to the section.</li><li>Syntax highlight of code blocks, in the language selected for each block and in the colors of the VS Code light or dark theme, following the page's mode. For “Auto-detected” blocks, the language is guessed among the ones enabled in <a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a> → <em>Code Notes</em>; a language not enabled there is not highlighted.</li><li>Rendering for math equations.</li><li><a href=\"#root/_help_nBAXQFj20hS1\">Including notes</a> (only if the included notes are also shared).</li><li>Drawing canvases, shown as pictures at their own size.</li><li>Mermaid diagrams in code blocks, drawn in the page's light or dark mode and redrawn when the visitor switches it.</li></ul></td><td>&nbsp;</td></tr><tr><th><a class=\"reference-link\" href=\"#root/_help_6f9hih2hXXZk\">Code</a></th><td><ul><li>Syntax highlight with line numbers, in the language of the note and in the colors of the VS Code light or dark theme, following the page's mode. A language not enabled in&nbsp;<a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a>&nbsp;→ <em>Code Notes</em> is not highlighted.</li></ul></td><td>&nbsp;</td></tr><tr><th><a class=\"reference-link\" href=\"#root/_help_m523cpzocqaD\">Saved Search</a></th><td>Not supported.</td><td>&nbsp;</td></tr><tr><th><a class=\"reference-link\" href=\"#root/_help_iRwzGnHPzonm\">Relation Map</a></th><td>Not supported.</td><td>&nbsp;</td></tr><tr><th><a class=\"reference-link\" href=\"#root/_help_bdUJEHsAPYQR\">Note Map</a></th><td>Not supported.</td><td>&nbsp;</td></tr><tr><th><a class=\"reference-link\" href=\"#root/_help_HcABDtFCkbFN\">Render Note</a></th><td>Not supported.</td><td>&nbsp;</td></tr><tr><th><a class=\"reference-link\" href=\"#root/_help_GTwFsgaA0lCt\">Collections</a></th><td><ul><li>The child notes are shown as cards, or as a list when the view type of the collection is <em>List</em>. Each shows its icon and the start of its text (or its <code>#shareDescription</code>), or, for a child note without text, links to its own first child notes.</li></ul></td><td><ul><li>The calendar, table, board, geo map, dashboard and presentation view types are shown as in the app, but read-only.</li></ul></td></tr><tr><th><a class=\"reference-link\" href=\"#root/_help_s1aBHPd79XYj\">Mermaid Diagrams</a></th><td><ul><li>The diagram is drawn in the page's light or dark mode and redrawn when the visitor switches it. In browsers with JavaScript disabled, the image saved when the note was last edited is shown instead, and the source of the diagram can be expanded below it.</li><li>The diagram fills the page and can be zoomed with the <span class=\"tn-icon bx bx-minus-circle\"></span> and <span class=\"tn-icon bx bx-plus-circle\"></span> buttons in its bottom corner or with the mouse wheel, between 50% and 1000% of its fitted size, and on touch screens by pinching. Clicking the percentage between the buttons, or double-clicking the diagram, shows it whole again. The diagram can be panned by dragging it.</li></ul></td><td>&nbsp;</td></tr><tr><th><a class=\"reference-link\" href=\"#root/_help_grjYqerjn243\">Canvas</a></th><td><ul><li>The diagram is displayed as a vector image.</li></ul></td><td><ul><li>No further interaction supported.</li></ul></td></tr><tr><th><a class=\"reference-link\" href=\"#root/_help_1vHRoWCEjj0L\">Web View</a></th><td>Not supported.</td><td>&nbsp;</td></tr><tr><th><a class=\"reference-link\" href=\"#root/_help_gBbsAeiuUxI5\">Mind Map</a></th><td>The diagram is displayed as a vector image.</td><td><ul><li>No further interaction supported.</li></ul></td></tr><tr><th><a class=\"reference-link\" href=\"#root/_help_81SGnPGMk7Xc\">Geo Map</a></th><td>Not supported.</td><td>&nbsp;</td></tr><tr><th><a class=\"reference-link\" href=\"#root/_help_W8vYD3Q1zjCR\">File</a></th><td>Basic interaction (downloading the file).</td><td><ul><li>No further interaction supported.</li></ul></td></tr></tbody></table></figure><p>While the sharing feature is powerful, it has some limitations:</p><ul><li><strong>Static Note Tree</strong></li><li><strong>Protected Notes</strong>: Cannot be shared.</li><li><strong>Include Notes</strong>: Not supported.</li></ul><p>Some of these limitations may be addressed in future updates.</p><h2>Prerequisites</h2><p>To use the sharing feature, you must have a&nbsp;<a class=\"reference-link\" href=\"#root/_help_WOcw2SLH6tbX\">Server Installation</a>&nbsp;of Trilium. This is necessary because the notes will be hosted from the server.</p><h2>Sharing a note</h2><ol><li><p><strong>Enable Sharing</strong>: To share a note, toggle the <code>Shared</code> switch within the note's interface. Once sharing is enabled, an URL will appear, which you can click to access the shared note.</p><p><img src=\"{{helpAssets}}/User%20Guide/Advanced%20Usage/Sharing_share-single-note.png\" alt=\"Share Note\"></p></li><li><p><strong>Access the Shared Note</strong>: The link provided will open the note in your browser. If your server is not configured with a public IP, the URL will refer to <code>localhost (127.0.0.1)</code>.</p></li></ol><h2>Sharing a note subtree</h2><p>When you share a note, you actually share the entire subtree of notes beneath it. If the note has child notes, they will also be included in the shared content. For example, sharing the \"Formatting\" subtree will display a page with basic navigation for exploring all the notes within that subtree.</p><h2>Viewing and managing shared notes</h2><p>You can view a list of all shared notes by clicking on \"Show Shared Notes Subtree\" in the&nbsp;<a class=\"reference-link\" href=\"#root/_help_x3i7MxGccDuM\">Global menu</a>. This allows you to manage and navigate through all the notes you have made public.</p><h2>Security considerations</h2><ul><li>Shared notes are published on the open internet and can be accessed by anyone with the URL unless the notes are password-protected.</li><li>The URL's randomness does not provide security, so it is crucial not to share sensitive information through this feature.</li><li>Trilium takes precautions to protect your publicly shared instance from leaking information for non-shared notes, including opening a separate read-only connection to the&nbsp;<a class=\"reference-link\" href=\"#root/_help_wX4HbRucYSDD\">Database</a>. Depending on your threat model, it might make more sense to use&nbsp;<a class=\"reference-link\" href=\"#root/_help_ycBFjKrrwE9p\">Exporting static HTML for web publishing</a>&nbsp;and use battle-tested web servers such as Nginx or Apache to serve static content.</li></ul><h3>Password protection</h3><p>To protect shared notes with a username and password, you can use the <code>#shareCredentials</code> attribute. Add this label to the note with the format <code>#shareCredentials=\"username:password\"</code>. To protect an entire subtree, make sure the label is <a href=\"#root/_help_bwZpz2ajCEwO\">inheritable</a>.</p><h2>Advanced sharing options</h2><h3>Customizing the appearance of shared notes</h3><p>The default design should be a good starting point, but you can customize it using your own CSS:</p><ul><li><strong>Custom CSS</strong>: Link a CSS&nbsp;<a class=\"reference-link\" href=\"#root/_help_6f9hih2hXXZk\">Code</a>&nbsp;note to the shared page by adding a <code>~shareCss</code> relation to the note. If you want this style to apply to the entire subtree, make the label inheritable. You can hide the CSS code note from the tree navigation by adding the <code>#shareHiddenFromTree</code> label.</li><li><strong>Omitting Default CSS</strong>: For extensive styling changes, use the <code>#shareOmitDefaultCss</code> label to avoid conflicts with Trilium's <a href=\"#root/_help_Wy267RK4M69c\">default stylesheet</a>.</li></ul><h3>Adding JavaScript</h3><p>You can inject custom JavaScript into the shared note using the <code>~shareJs</code> relation. This allows you to access note attributes or traverse the note tree using the <code>fetchNote()</code> API, which retrieves note data based on its ID.</p><h3>Adding custom HTML</h3><p>You can inject custom HTML snippets into specific locations of the shared page using the <code>~shareHtml</code> relation. The HTML note should contain the raw HTML content you want to inject, and you can control where it appears by adding the <code>#shareHtmlLocation</code> label to the HTML snippet note itself.</p><p>The <code>#shareHtmlLocation</code> label accepts values in the format <code>location:position</code>:</p><ul><li><strong>Locations</strong>: <code>head</code>, <code>body</code>, <code>content</code></li><li><strong>Positions</strong>: <code>start</code>, <code>end</code></li></ul><p>For example:</p><ul><li><code>#shareHtmlLocation=head:start</code> - Injects HTML at the beginning of the <code>&lt;head&gt;</code> section</li><li><code>#shareHtmlLocation=head:end</code> - Injects HTML at the end of the <code>&lt;head&gt;</code> section (default)</li><li><code>#shareHtmlLocation=body:start</code> - Injects HTML at the beginning of the <code>&lt;body&gt;</code> section</li><li><code>#shareHtmlLocation=content:start</code> - Injects HTML at the beginning of the content area</li><li><code>#shareHtmlLocation=content:end</code> - Injects HTML at the end of the content area</li></ul><p>If no location is specified, the HTML will be injected at <code>content:end</code> by default.</p><p>Example:</p><pre><code class=\"language-text-javascript\">const currentNote = await fetchNote();\nconst parentNote = await fetchNote(currentNote.parentNoteIds[0]);\n\nfor (const attr of parentNote.attributes) {\n console.log(attr.type, attr.name, attr.value);\n}</code></pre><h3>Custom share templates</h3><p>To completely redesign the share, it is possible to create or use an existing <a href=\"#root/_help_Ad7Ku5gOHrDU\">custom share template</a>.</p><h3>Creating human-readable URL aliases</h3><p>Shared notes typically have URLs like <code>http://domain.tld/share/knvU8aJy4dJ7</code>, where the last part is the note's ID. You can make these URLs more user-friendly by adding the <code>#shareAlias</code> label to individual notes (e.g., <code>#shareAlias=highlighting</code>). This will change the URL to <code>http://domain.tld/share/highlighting</code>. The URL with the note's ID keeps working and redirects to the alias.</p><p><strong>Important</strong>:</p><ol><li>Ensure that aliases are unique.</li><li>Using slashes (<code>/</code>) within aliases to create subpaths is not supported.</li></ol><aside class=\"admonition tip\"><ul><li>To easily identify pages that don't have a share alias, run a&nbsp;<a class=\"reference-link\" href=\"#root/_help_eIg8jdvaoNNd\">Search</a>&nbsp;with <code>#!shareAlias</code>.</li><li>To be able to enter the share alias faster, consider using&nbsp;<a class=\"reference-link\" href=\"#root/_help_OFXdgB2nNk1F\">Promoted Attributes</a>&nbsp;(for example <code>#label:shareAlias(inheritable)=\"promoted,alias=Slug,single,text\"</code>).</li></ul></aside><h3>Setting a custom favicon</h3><p>To customize the favicon for your shared pages, create a relation <code>~shareFavicon</code> pointing to a file note containing the favicon (e.g., in <code>.ico</code> format).</p><h3>Sharing a note as the root</h3><p>You can designate a specific note or folder as the root of your shared content by adding the <code>#shareRoot</code> label. This note will be linked when visiting <code>[http://domain.tld/share](http://domain/share)</code>, making it easier to use Trilium as a fully-fledged website.</p><aside class=\"admonition tip\"><p>Consider combining this with the <code>#shareIndex</code> label, which will display a list of all shared notes.</p></aside><h3>Displaying an index of shared notes</h3><p>When accessing a share, the sub-notes will be displayed in a tree on the left. But since multiple note trees can be shared, it might be useful to display a list of all the different share trees.</p><p>To do so, create a shared text note and apply the <code>shareIndex</code> label. When viewed, the list of shared roots will be displayed at the bottom of the note.</p><h3>Linking to an external website</h3><p>Sometimes it's useful to include a link to an external website alongside your shared notes — for example in the shared navigation or in an index. To do so, add the <code>#shareExternalLink</code> label to a note, with the target URL as its value (e.g. <code>#shareExternalLink=\"https://example.com\"</code>).</p><p>Any link pointing to this note will then redirect to the external website and open in a new browser tab, instead of opening the note's own shared page. Opening the note's shared URL by its ID also redirects to the external website. This applies to:</p><ul><li>the listing produced by the <code>#shareIndex</code> label;</li><li>the navigation tree of the shared site;</li><li>the \"Subpages\" list shown under a parent note;</li><li>inline links to this note from within other shared notes.</li></ul><p>The URL must be absolute and include the scheme (e.g. <code>https://</code>).</p><aside class=\"admonition note\"><p>The note still exists in the share tree and its own page remains reachable by its direct URL — the label only changes how links to it behave.</p></aside><h2>Attribute reference</h2><figure class=\"table\"><table class=\"ck-table-resized\"><colgroup><col style=\"width:18.38%;\"><col style=\"width:81.62%;\"></colgroup><thead><tr><th>Attribute</th><th>Description</th></tr></thead><tbody><tr><td><code>#shareHiddenFromTree</code></td><td>this note is hidden from the left navigation tree, from its parent's list of subpages, from shared note maps and from the share's search, but still accessible with its URL</td></tr><tr><td><code>#shareExternalLink</code></td><td>when a link points to this note (from the share index, a subpage list, or an inline link in another shared note), it redirects to the given external URL in a new tab instead of the note's shared page. Value is the absolute URL, e.g. <code>https://example.com</code>.</td></tr><tr><td><code>#shareAlias</code></td><td>define an alias using which the note will be available under <code>https://your_trilium_host/share/[your_alias]</code></td></tr><tr><td><code>#shareOmitDefaultCss</code></td><td>default share page CSS will be omitted. Use when you make extensive styling changes.</td></tr><tr><td><code>#shareRoot</code></td><td>marks note which is served on /share root.</td></tr><tr><td><code>#shareDescription</code></td><td>define text to be added to the HTML meta tag for description. It also describes the note in the list of subpages of its parent, in place of the start of its text.</td></tr><tr><td><code>#shareRaw</code></td><td>Note will be served in its raw format, without HTML wrapper. See also&nbsp;<a class=\"reference-link\" href=\"#root/_help_Qjt68inQ2bRj\">Serving directly the content of a note</a>&nbsp;for an alternative method without setting an attribute.</td></tr><tr><td><code>#shareDisallowRobotIndexing</code></td><td><p>Indicates to web crawlers that the page should not be indexed of this note by:</p><ul><li>Setting the <code>X-Robots-Tag: noindex</code> HTTP header.</li><li>Setting the <code>noindex, follow</code> meta tag.</li></ul></td></tr><tr><td><code>#shareCredentials</code></td><td>require credentials to access this shared note. Value is expected to be in format <code>username:password</code>. Don't forget to make this inheritable to apply to child-notes/images.</td></tr><tr><td><code>#shareIndex</code></td><td>Note with this label will list all roots of shared notes.</td></tr><tr><td><code>#shareHtmlLocation</code></td><td>defines where custom HTML injected via <code>~shareHtml</code> relation should be placed. Applied to the HTML snippet note itself. Format: <code>location:position</code> where location is <code>head</code>, <code>body</code>, or <code>content</code> and position is <code>start</code> or <code>end</code>. Defaults to <code>content:end</code>.</td></tr></tbody></table></figure><h3>Customizing logo</h3><p>It's possible to adjust the logo which is displayed above the navigation tree (in the header, on a narrow screen).</p><figure class=\"table\"><table><thead><tr><th>Attribute</th><th>Description</th></tr></thead><tbody><tr><td><code>~shareLogo</code></td><td>Relation set to an image to use as logo. The image must be part of the share tree (it can be hidden if needed). Without it, the logo is the icon of the shared root note.</td></tr><tr><td><code>#shareLogoWidth</code></td><td>The width of the logo, as a number without unit. With <code>#shareLogoHeight</code>, it sets the proportions of the logo, which is shown 32 pixels wide. Default is <code>53</code>.</td></tr><tr><td><code>#shareLogoHeight</code></td><td>The height of the logo, as a number without unit. With <code>#shareLogoWidth</code>, it sets the proportions of the logo. Default is <code>40</code>.</td></tr><tr><td><code>#shareRootLink</code></td><td>URL to navigate to when the logo is pressed.</td></tr></tbody></table></figure><h3>Customizing OpenGraph</h3><p>A meta-property is left out of the page when its attribute is not set. Without an image, link previews use a small card.</p><figure class=\"table\"><table><thead><tr><th>Attribute</th><th>Description</th></tr></thead><tbody><tr><td><code>#shareOpenGraphColor</code></td><td>This adjusts the <code>theme-color</code> meta-property.</td></tr><tr><td><code>#shareOpenGraphURL</code></td><td>This adjusts the <code>og:url</code> and <code>twitter:url</code> meta-properties. It is also the address a relative <code>og:image</code> is completed with, so it should be the public address of the shared site, such as <code>https://example.com/share/</code>.</td></tr><tr><td><code>#shareOpenGraphDomain</code></td><td>Adjusts the <code>twitter:domain</code> meta-property.</td></tr><tr><td><code>#shareOpenGraphImage</code>&nbsp; <br><code>~shareOpenGraphImage</code></td><td>Can be either a label with the address of an image, or a relation to an image&nbsp;<a class=\"reference-link\" href=\"#root/_help_W8vYD3Q1zjCR\">File</a>. This controls the <code>og:image</code> meta-property. Sites that show a preview of the link load the image from their own servers, so a relative address, which the relation always gives, is completed with <code>#shareOpenGraphURL</code>; without it, the image does not show in such previews.</td></tr></tbody></table></figure><h2>Credits</h2><p>Since v0.95.0, a new theme was introduced (and enabled by default) which greatly improves the visual aspect of the Share feature, as well as its functionality (such as mobile support, dark/light mode, collapsible tree, etc.). This theme is an adaptation of the <a href=\"https://github.com/zerebos/trilium.rocks\">Trilium Rocks!</a> by <a href=\"https://github.com/zerebos\">zerebos</a>.</p>",
+ "_help_R9pX4DGra2Vt": "<p>Trilium allows you to share selected notes as <strong>publicly accessible</strong> read-only documents. This feature is particularly useful for publishing content directly from your Trilium notes, making it accessible to others online.</p><figure class=\"image\"><img style=\"aspect-ratio:1144/660;\" src=\"{{helpAssets}}/User%20Guide/Advanced%20Usage/Sharing_image.png\" width=\"1144\" height=\"660\"></figure><h2>Features, interaction and limitations</h2><ul><li>Searching by note title.</li><li>Light and dark mode, following the visitor's system setting by default, also while the page is open. The visitor can pick <em>Light</em>, <em>Dark</em> or <em>System</em> with the buttons at the top of the navigation pane; the choice is remembered by the browser.</li><li>A layout centered on wide screens, with the navigation tree and the table of contents at either side of the content, and a mobile-friendly layout on narrow ones. There, the navigation tree slides in from the menu button in the header, and lists the headings of the current page below its entry (at the top of the pane, for a page the tree does not show).</li><li>Collapsible tree with the same note icons as the application. It keeps the sections the visitor expanded and its scroll position while they move between the pages of the site, and shows the current note.</li><li>Customizable logo.</li><li>Quick navigation buttons (previous and next note).</li><li>Notes that hide their children from the tree with <code>#subtreeHidden</code> (such as a <a class=\"reference-link\" href=\"#root/_help_CtBQqbwXDx1w\">Kanban Board</a>) show a badge counting them in place of listing them. The page of one of those children shows only that child below its parent, and the previous and next buttons skip them.</li><li>The subpages of a text or code note shown below its content as cards, as in the application. Each card shows the icon of the subpage and the start of its text (or its <code>#shareDescription</code>), or, for a subpage without text, links to its own first subpages. The cards can be hidden with <code>#hideChildrenOverview</code>.</li><li>Displaying the date of the last update of the note, written out in the application's language.</li><li>Marking the page with the application's language and its text direction, and the content of the note with its own <a href=\"#root/_help_veGu4faJErEM\">content language</a>, for screen readers and right-to-left text.</li></ul><h3>By note type</h3><figure class=\"table\"><table class=\"ck-table-resized\"><colgroup><col style=\"width:19.92%;\"><col style=\"width:41.66%;\"><col style=\"width:38.42%;\"></colgroup><thead><tr><th>&nbsp;</th><th>Supported features</th><th>Limitations</th></tr></thead><tbody><tr><th><a class=\"reference-link\" href=\"#root/_help_iPIMuisry3hd\">Text</a></th><td><ul><li>Table of contents.</li><li>A link next to each heading, shown while the pointer is over the heading. Clicking it shows the address of the section in the address bar of the browser and copies it, to share a link to the section.</li><li>Syntax highlight of code blocks, in the language selected for each block and in the colors of the VS Code light or dark theme, following the page's mode. For “Auto-detected” blocks, the language is guessed among the ones enabled in <a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a> → <em>Code Notes</em>; a language not enabled there is not highlighted.</li><li>Rendering for math equations.</li><li><a href=\"#root/_help_nBAXQFj20hS1\">Including notes</a> (only if the included notes are also shared).</li><li>Drawing canvases, shown as pictures at their own size.</li><li>Mermaid diagrams in code blocks, drawn in the page's light or dark mode and redrawn when the visitor switches it.</li></ul></td><td>&nbsp;</td></tr><tr><th><a class=\"reference-link\" href=\"#root/_help_6f9hih2hXXZk\">Code</a></th><td><ul><li>Syntax highlight with line numbers, in the language of the note and in the colors of the VS Code light or dark theme, following the page's mode. A language not enabled in&nbsp;<a class=\"reference-link\" href=\"#root/_help_4TIF1oA4VQRO\">Options</a>&nbsp;→ <em>Code Notes</em> is not highlighted.</li></ul></td><td>&nbsp;</td></tr><tr><th><a class=\"reference-link\" href=\"#root/_help_m523cpzocqaD\">Saved Search</a></th><td>Not supported.</td><td>&nbsp;</td></tr><tr><th><a class=\"reference-link\" href=\"#root/_help_iRwzGnHPzonm\">Relation Map</a></th><td>Not supported.</td><td>&nbsp;</td></tr><tr><th><a class=\"reference-link\" href=\"#root/_help_bdUJEHsAPYQR\">Note Map</a></th><td>Not supported.</td><td>&nbsp;</td></tr><tr><th><a class=\"reference-link\" href=\"#root/_help_HcABDtFCkbFN\">Render Note</a></th><td>Not supported.</td><td>&nbsp;</td></tr><tr><th><a class=\"reference-link\" href=\"#root/_help_GTwFsgaA0lCt\">Collections</a></th><td><ul><li>The child notes are shown as cards, or as a list when the view type of the collection is <em>List</em>. Each shows its icon and the start of its text (or its <code>#shareDescription</code>), or, for a child note without text, links to its own first child notes.</li></ul></td><td><ul><li>The calendar, table, board, geo map, dashboard and presentation view types are shown as in the app, but read-only.</li></ul></td></tr><tr><th><a class=\"reference-link\" href=\"#root/_help_s1aBHPd79XYj\">Mermaid Diagrams</a></th><td><ul><li>The diagram is drawn in the page's light or dark mode and redrawn when the visitor switches it. In browsers with JavaScript disabled, the image saved when the note was last edited is shown instead, and the source of the diagram can be expanded below it.</li><li>The diagram fills the page and can be zoomed with the <span class=\"tn-icon bx bx-minus-circle\"></span> and <span class=\"tn-icon bx bx-plus-circle\"></span> buttons in its bottom corner or with the mouse wheel, between 50% and 1000% of its fitted size, and on touch screens by pinching. Clicking the percentage between the buttons, or double-clicking the diagram, shows it whole again. The diagram can be panned by dragging it.</li></ul></td><td>&nbsp;</td></tr><tr><th><a class=\"reference-link\" href=\"#root/_help_grjYqerjn243\">Canvas</a></th><td><ul><li>The diagram is displayed as a vector image.</li></ul></td><td><ul><li>No further interaction supported.</li></ul></td></tr><tr><th><a class=\"reference-link\" href=\"#root/_help_1vHRoWCEjj0L\">Web View</a></th><td>Not supported.</td><td>&nbsp;</td></tr><tr><th><a class=\"reference-link\" href=\"#root/_help_gBbsAeiuUxI5\">Mind Map</a></th><td>The diagram is displayed as a vector image.</td><td><ul><li>No further interaction supported.</li></ul></td></tr><tr><th><a class=\"reference-link\" href=\"#root/_help_81SGnPGMk7Xc\">Geo Map</a></th><td>Not supported.</td><td>&nbsp;</td></tr><tr><th><a class=\"reference-link\" href=\"#root/_help_W8vYD3Q1zjCR\">File</a></th><td>Basic interaction (downloading the file).</td><td><ul><li>No further interaction supported.</li></ul></td></tr></tbody></table></figure><p>While the sharing feature is powerful, it has some limitations:</p><ul><li><strong>Static Note Tree</strong></li><li><strong>Protected Notes</strong>: Cannot be shared.</li><li><strong>Include Notes</strong>: Not supported.</li></ul><p>Some of these limitations may be addressed in future updates.</p><h2>Prerequisites</h2><p>To use the sharing feature, you must have a&nbsp;<a class=\"reference-link\" href=\"#root/_help_WOcw2SLH6tbX\">Server Installation</a>&nbsp;of Trilium. This is necessary because the notes will be hosted from the server.</p><h2>Sharing a note</h2><ol><li><p><strong>Enable Sharing</strong>: To share a note, toggle the <code>Shared</code> switch within the note's interface. Once sharing is enabled, an URL will appear, which you can click to access the shared note.</p><p><img src=\"{{helpAssets}}/User%20Guide/Advanced%20Usage/Sharing_share-single-note.png\" alt=\"Share Note\"></p></li><li><p><strong>Access the Shared Note</strong>: The link provided will open the note in your browser. If your server is not configured with a public IP, the URL will refer to <code>localhost (127.0.0.1)</code>.</p></li></ol><h2>Sharing a note subtree</h2><p>When you share a note, you actually share the entire subtree of notes beneath it. If the note has child notes, they will also be included in the shared content. For example, sharing the \"Formatting\" subtree will display a page with basic navigation for exploring all the notes within that subtree.</p><h2>Viewing and managing shared notes</h2><p>You can view a list of all shared notes by clicking on <em>Advanced</em> → \"Show Shared Notes Subtree\" in the&nbsp;<a class=\"reference-link\" href=\"#root/_help_x3i7MxGccDuM\">Global menu</a>. This allows you to manage and navigate through all the notes you have made public.</p><h2>Security considerations</h2><ul><li>Shared notes are published on the open internet and can be accessed by anyone with the URL unless the notes are password-protected.</li><li>The URL's randomness does not provide security, so it is crucial not to share sensitive information through this feature.</li><li>Trilium takes precautions to protect your publicly shared instance from leaking information for non-shared notes, including opening a separate read-only connection to the&nbsp;<a class=\"reference-link\" href=\"#root/_help_wX4HbRucYSDD\">Database</a>. Depending on your threat model, it might make more sense to use&nbsp;<a class=\"reference-link\" href=\"#root/_help_ycBFjKrrwE9p\">Exporting static HTML for web publishing</a>&nbsp;and use battle-tested web servers such as Nginx or Apache to serve static content.</li></ul><h3>Password protection</h3><p>To protect shared notes with a username and password, you can use the <code>#shareCredentials</code> attribute. Add this label to the note with the format <code>#shareCredentials=\"username:password\"</code>. To protect an entire subtree, make sure the label is <a href=\"#root/_help_bwZpz2ajCEwO\">inheritable</a>.</p><h2>Advanced sharing options</h2><h3>Customizing the appearance of shared notes</h3><p>The default design should be a good starting point, but you can customize it using your own CSS:</p><ul><li><strong>Custom CSS</strong>: Link a CSS&nbsp;<a class=\"reference-link\" href=\"#root/_help_6f9hih2hXXZk\">Code</a>&nbsp;note to the shared page by adding a <code>~shareCss</code> relation to the note. If you want this style to apply to the entire subtree, make the label inheritable. You can hide the CSS code note from the tree navigation by adding the <code>#shareHiddenFromTree</code> label.</li><li><strong>Omitting Default CSS</strong>: For extensive styling changes, use the <code>#shareOmitDefaultCss</code> label to avoid conflicts with Trilium's <a href=\"#root/_help_Wy267RK4M69c\">default stylesheet</a>.</li></ul><h3>Adding JavaScript</h3><p>You can inject custom JavaScript into the shared note using the <code>~shareJs</code> relation. This allows you to access note attributes or traverse the note tree using the <code>fetchNote()</code> API, which retrieves note data based on its ID.</p><h3>Adding custom HTML</h3><p>You can inject custom HTML snippets into specific locations of the shared page using the <code>~shareHtml</code> relation. The HTML note should contain the raw HTML content you want to inject, and you can control where it appears by adding the <code>#shareHtmlLocation</code> label to the HTML snippet note itself.</p><p>The <code>#shareHtmlLocation</code> label accepts values in the format <code>location:position</code>:</p><ul><li><strong>Locations</strong>: <code>head</code>, <code>body</code>, <code>content</code></li><li><strong>Positions</strong>: <code>start</code>, <code>end</code></li></ul><p>For example:</p><ul><li><code>#shareHtmlLocation=head:start</code> - Injects HTML at the beginning of the <code>&lt;head&gt;</code> section</li><li><code>#shareHtmlLocation=head:end</code> - Injects HTML at the end of the <code>&lt;head&gt;</code> section (default)</li><li><code>#shareHtmlLocation=body:start</code> - Injects HTML at the beginning of the <code>&lt;body&gt;</code> section</li><li><code>#shareHtmlLocation=content:start</code> - Injects HTML at the beginning of the content area</li><li><code>#shareHtmlLocation=content:end</code> - Injects HTML at the end of the content area</li></ul><p>If no location is specified, the HTML will be injected at <code>content:end</code> by default.</p><p>Example:</p><pre><code class=\"language-text-javascript\">const currentNote = await fetchNote();\nconst parentNote = await fetchNote(currentNote.parentNoteIds[0]);\n\nfor (const attr of parentNote.attributes) {\n console.log(attr.type, attr.name, attr.value);\n}</code></pre><h3>Custom share templates</h3><p>To completely redesign the share, it is possible to create or use an existing <a href=\"#root/_help_Ad7Ku5gOHrDU\">custom share template</a>.</p><h3>Creating human-readable URL aliases</h3><p>Shared notes typically have URLs like <code>http://domain.tld/share/knvU8aJy4dJ7</code>, where the last part is the note's ID. You can make these URLs more user-friendly by adding the <code>#shareAlias</code> label to individual notes (e.g., <code>#shareAlias=highlighting</code>). This will change the URL to <code>http://domain.tld/share/highlighting</code>. The URL with the note's ID keeps working and redirects to the alias.</p><p><strong>Important</strong>:</p><ol><li>Ensure that aliases are unique.</li><li>Using slashes (<code>/</code>) within aliases to create subpaths is not supported.</li></ol><aside class=\"admonition tip\"><ul><li>To easily identify pages that don't have a share alias, run a&nbsp;<a class=\"reference-link\" href=\"#root/_help_eIg8jdvaoNNd\">Search</a>&nbsp;with <code>#!shareAlias</code>.</li><li>To be able to enter the share alias faster, consider using&nbsp;<a class=\"reference-link\" href=\"#root/_help_OFXdgB2nNk1F\">Promoted Attributes</a>&nbsp;(for example <code>#label:shareAlias(inheritable)=\"promoted,alias=Slug,single,text\"</code>).</li></ul></aside><h3>Setting a custom favicon</h3><p>To customize the favicon for your shared pages, create a relation <code>~shareFavicon</code> pointing to a file note containing the favicon (e.g., in <code>.ico</code> format).</p><h3>Sharing a note as the root</h3><p>You can designate a specific note or folder as the root of your shared content by adding the <code>#shareRoot</code> label. This note will be linked when visiting <code>[http://domain.tld/share](http://domain/share)</code>, making it easier to use Trilium as a fully-fledged website.</p><aside class=\"admonition tip\"><p>Consider combining this with the <code>#shareIndex</code> label, which will display a list of all shared notes.</p></aside><h3>Displaying an index of shared notes</h3><p>When accessing a share, the sub-notes will be displayed in a tree on the left. But since multiple note trees can be shared, it might be useful to display a list of all the different share trees.</p><p>To do so, create a shared text note and apply the <code>shareIndex</code> label. When viewed, the list of shared roots will be displayed at the bottom of the note.</p><h3>Linking to an external website</h3><p>Sometimes it's useful to include a link to an external website alongside your shared notes — for example in the shared navigation or in an index. To do so, add the <code>#shareExternalLink</code> label to a note, with the target URL as its value (e.g. <code>#shareExternalLink=\"https://example.com\"</code>).</p><p>Any link pointing to this note will then redirect to the external website and open in a new browser tab, instead of opening the note's own shared page. Opening the note's shared URL by its ID also redirects to the external website. This applies to:</p><ul><li>the listing produced by the <code>#shareIndex</code> label;</li><li>the navigation tree of the shared site;</li><li>the \"Subpages\" list shown under a parent note;</li><li>inline links to this note from within other shared notes.</li></ul><p>The URL must be absolute and include the scheme (e.g. <code>https://</code>).</p><aside class=\"admonition note\"><p>The note still exists in the share tree and its own page remains reachable by its direct URL — the label only changes how links to it behave.</p></aside><h2>Attribute reference</h2><figure class=\"table\"><table class=\"ck-table-resized\"><colgroup><col style=\"width:18.38%;\"><col style=\"width:81.62%;\"></colgroup><thead><tr><th>Attribute</th><th>Description</th></tr></thead><tbody><tr><td><code>#shareHiddenFromTree</code></td><td>this note is hidden from the left navigation tree, from its parent's list of subpages, from shared note maps and from the share's search, but still accessible with its URL</td></tr><tr><td><code>#shareExternalLink</code></td><td>when a link points to this note (from the share index, a subpage list, or an inline link in another shared note), it redirects to the given external URL in a new tab instead of the note's shared page. Value is the absolute URL, e.g. <code>https://example.com</code>.</td></tr><tr><td><code>#shareAlias</code></td><td>define an alias using which the note will be available under <code>https://your_trilium_host/share/[your_alias]</code></td></tr><tr><td><code>#shareOmitDefaultCss</code></td><td>default share page CSS will be omitted. Use when you make extensive styling changes.</td></tr><tr><td><code>#shareRoot</code></td><td>marks note which is served on /share root.</td></tr><tr><td><code>#shareDescription</code></td><td>define text to be added to the HTML meta tag for description. It also describes the note in the list of subpages of its parent, in place of the start of its text.</td></tr><tr><td><code>#shareRaw</code></td><td>Note will be served in its raw format, without HTML wrapper. See also&nbsp;<a class=\"reference-link\" href=\"#root/_help_Qjt68inQ2bRj\">Serving directly the content of a note</a>&nbsp;for an alternative method without setting an attribute.</td></tr><tr><td><code>#shareDisallowRobotIndexing</code></td><td><p>Indicates to web crawlers that the page should not be indexed of this note by:</p><ul><li>Setting the <code>X-Robots-Tag: noindex</code> HTTP header.</li><li>Setting the <code>noindex, follow</code> meta tag.</li></ul></td></tr><tr><td><code>#shareCredentials</code></td><td>require credentials to access this shared note. Value is expected to be in format <code>username:password</code>. Don't forget to make this inheritable to apply to child-notes/images.</td></tr><tr><td><code>#shareIndex</code></td><td>Note with this label will list all roots of shared notes.</td></tr><tr><td><code>#shareHtmlLocation</code></td><td>defines where custom HTML injected via <code>~shareHtml</code> relation should be placed. Applied to the HTML snippet note itself. Format: <code>location:position</code> where location is <code>head</code>, <code>body</code>, or <code>content</code> and position is <code>start</code> or <code>end</code>. Defaults to <code>content:end</code>.</td></tr></tbody></table></figure><h3>Customizing logo</h3><p>It's possible to adjust the logo which is displayed above the navigation tree (in the header, on a narrow screen).</p><figure class=\"table\"><table><thead><tr><th>Attribute</th><th>Description</th></tr></thead><tbody><tr><td><code>~shareLogo</code></td><td>Relation set to an image to use as logo. The image must be part of the share tree (it can be hidden if needed). Without it, the logo is the icon of the shared root note.</td></tr><tr><td><code>#shareLogoWidth</code></td><td>The width of the logo, as a number without unit. With <code>#shareLogoHeight</code>, it sets the proportions of the logo, which is shown 32 pixels wide. Default is <code>53</code>.</td></tr><tr><td><code>#shareLogoHeight</code></td><td>The height of the logo, as a number without unit. With <code>#shareLogoWidth</code>, it sets the proportions of the logo. Default is <code>40</code>.</td></tr><tr><td><code>#shareRootLink</code></td><td>URL to navigate to when the logo is pressed.</td></tr></tbody></table></figure><h3>Customizing OpenGraph</h3><p>A meta-property is left out of the page when its attribute is not set. Without an image, link previews use a small card.</p><figure class=\"table\"><table><thead><tr><th>Attribute</th><th>Description</th></tr></thead><tbody><tr><td><code>#shareOpenGraphColor</code></td><td>This adjusts the <code>theme-color</code> meta-property.</td></tr><tr><td><code>#shareOpenGraphURL</code></td><td>This adjusts the <code>og:url</code> and <code>twitter:url</code> meta-properties. It is also the address a relative <code>og:image</code> is completed with, so it should be the public address of the shared site, such as <code>https://example.com/share/</code>.</td></tr><tr><td><code>#shareOpenGraphDomain</code></td><td>Adjusts the <code>twitter:domain</code> meta-property.</td></tr><tr><td><code>#shareOpenGraphImage</code>&nbsp; <br><code>~shareOpenGraphImage</code></td><td>Can be either a label with the address of an image, or a relation to an image&nbsp;<a class=\"reference-link\" href=\"#root/_help_W8vYD3Q1zjCR\">File</a>. This controls the <code>og:image</code> meta-property. Sites that show a preview of the link load the image from their own servers, so a relative address, which the relation always gives, is completed with <code>#shareOpenGraphURL</code>; without it, the image does not show in such previews.</td></tr></tbody></table></figure><h2>Credits</h2><p>Since v0.95.0, a new theme was introduced (and enabled by default) which greatly improves the visual aspect of the Share feature, as well as its functionality (such as mobile support, dark/light mode, collapsible tree, etc.). This theme is an adaptation of the <a href=\"https://github.com/zerebos/trilium.rocks\">Trilium Rocks!</a> by <a href=\"https://github.com/zerebos\">zerebos</a>.</p>",
"_help_Qjt68inQ2bRj": "<p>When accessing a shared note, Trilium will render it as a web page. Sometimes it's desirable to serve the content directly so that it can be used in a script or downloaded by the user.</p><figure class=\"table\"><table><thead><tr><th>A note displayed as a web page (HTML)</th><th>A note displayed as a raw format</th></tr></thead><tbody><tr><td><figure class=\"image\"><img style=\"aspect-ratio:738/275;\" src=\"{{helpAssets}}/User%20Guide/Advanced%20Usage/Sharing/Serving%20directly%20the%20content%20of%20a%20note_image.png\" width=\"738\" height=\"275\"></figure></td><td><img src=\"{{helpAssets}}/User%20Guide/Advanced%20Usage/Sharing/Serving%20directly%20the%20content%20of%20a%20note_image.jpg\"></td></tr></tbody></table></figure><h2>By adding an attribute to the note</h2><p>Simply add the <code>#shareRaw</code> attribute and the note will always be rendered <em>raw</em> when accessed from the share URL.</p><h2>By altering the URL</h2><p>Append <code>?raw</code> to the URL to display a note in its raw format regardless of whether the <code>#shareRaw</code> attribute is added on the note.</p><p><img src=\"{{helpAssets}}/User%20Guide/Advanced%20Usage/Sharing/Serving%20directly%20the%20content%20of%20a%20note_image.jpg\"></p>",
"_help_ycBFjKrrwE9p": "<p>As described in&nbsp;<a class=\"reference-link\" href=\"#root/_help_R9pX4DGra2Vt\">Sharing</a>, Trilium can act as a public server in which the shared notes are displayed in read-only mode. While this can work in most cases, it's generally not meant for high-traffic websites and since it's running on a Node.js server it can be potentially exploited.</p><p>Another alternative is to generate static HTML files (just like other static site generators such as <a href=\"https://www.mkdocs.org/\">MkDocs</a>). Since the normal HTML ZIP export does not contain any styling or additional functionality, Trilium provides a way to export the same layout and style as the&nbsp;<a class=\"reference-link\" href=\"#root/_help_R9pX4DGra2Vt\">Sharing</a>&nbsp;function into static HTML files.</p><p>Apart from the enhanced security, these HTML files are also easy to deploy on “serverless” deployments such as GitHub Pages or CloudFlare Pages and cache very easily.</p><aside class=\"admonition tip\"><p>Trilium's documentation, available at <a href=\"https://docs.triliumnotes.org/\">docs.triliumnotes.org</a> is built using this function of exporting to static HTML files which are then deployed automatically to CloudFlare Pages.</p><p>The process is <a href=\"https://github.com/TriliumNext/Trilium/blob/main/apps/edit-docs/src/build-docs.ts\">automated</a> by importing the Markdown documentation and exporting it via a script to the static web format.</p></aside><h2>Differences from normal sharing</h2><p>Apart from normal&nbsp;<a class=\"reference-link\" href=\"#root/_help_R9pX4DGra2Vt\">Sharing</a>, exporting to static HTML files comes with a few subtle differences:</p><ul><li>The URL structure is different. Where in normal sharing it's something along the way of <code>example.com/share/noteid</code>, the notes follow an hierarchical structure, such as <code>docs.triliumnotes.org/user-guide/concepts/navigation/tree-concepts</code>.</li><li>The <code>favicon.ico</code> is not handled automatically, it needs to be manually added on the server after the export is generated.</li><li>The “Last updated” for notes is not available.</li><li>The search functionality works slightly different since the normal one requires an active API to work. In the static export, search still works but uses a different mechanism so results might be different.</li></ul><h2>Differences from normal .zip export</h2><ul><li>The name of the files/URLs will prefer <code>shareAlias</code> to allow for clean URLs.</li><li>The export requires a functional web server as the pages will not render properly if accessed locally via a web browser due to the use of module scripts.</li><li>The directory structure is also slightly different:<ul><li>A normal HTML export results in an index file and a single directory.</li><li>Instead, for static exporting the top-root level becomes the index file and the child directories are on the root instead.</li><li>This makes it possible to easily publish to a website, without forcing everything but the root note to be in a sub-directory.</li></ul></li></ul><h2>Testing locally</h2><p>As mentioned previously, the exported static pages require a website to function. In order to test locally, a web server needs to be used.</p><p>One example is to use the Node.js-based <a href=\"https://www.npmjs.com/package/http-server\"><code>http-server</code></a> which can be installed via:</p><pre><code class=\"language-text-x-trilium-auto\">npm i -g http-server</code></pre><p>Once installed simply:</p><ol><li>Extract the exported .zip file.</li><li>Inside the extracted directory, run <code>http-server</code>.</li><li>Access the indicated address (e.g. <a href=\"http://localhost:8080\">http://localhost:8080</a>).</li></ol><h2>Automation</h2><p><a class=\"reference-link\" href=\"#root/_help_pgxEVkzLl1OP\">ETAPI (REST API)</a>&nbsp;could potentially be used to automate an export on a scheduled task.</p>",
"_help_sLIJ6f1dkJYW": "<p>It might be desirable to only expose the share functionality of Trilium to the Internet, and keep the application accessible only within a local network or via VPN.</p><p>To do so, a reverse proxy is required.</p><h2>Caddy</h2><pre><code class=\"language-text-x-trilium-auto\">http://domain.com {\n reverse_proxy /share http://localhost:8080/share\n}</code></pre><p>This is for newer versions where the share functionality is isolated, for older versions it's required to also include <code>/assets</code>.<a href=\"#fn2b8mg20aol8\"><sup>[1]</sup></a></p><ol><li><p><a href=\"#fnref2b8mg20aol8\"><strong><sup>^</sup></strong></a></p><p><a href=\"https://github.com/orgs/TriliumNext/discussions/7341#discussioncomment-14679897\">https://github.com/orgs/TriliumNext/discussions/7341#discussioncomment-14679897</a></p></li></ol>",
diff --git a/docs/User Guide/User Guide/Advanced Usage/Sharing.md b/docs/User Guide/User Guide/Advanced Usage/Sharing.md
index 158b1ac47f..4e61d2ad4c 100644
--- a/docs/User Guide/User Guide/Advanced Usage/Sharing.md
+++ b/docs/User Guide/User Guide/Advanced Usage/Sharing.md
@@ -125,7 +125,7 @@ When you share a note, you actually share the entire subtree of notes beneath it
## Viewing and managing shared notes
-You can view a list of all shared notes by clicking on "Show Shared Notes Subtree" in the <a class="reference-link" href="../Basic%20Concepts%20and%20Features/UI%20Elements/Global%20menu.md">Global menu</a>. This allows you to manage and navigate through all the notes you have made public.
+You can view a list of all shared notes by clicking on _Advanced_ → "Show Shared Notes Subtree" in the <a class="reference-link" href="../Basic%20Concepts%20and%20Features/UI%20Elements/Global%20menu.md">Global menu</a>. This allows you to manage and navigate through all the notes you have made public.
## Security considerations
diff --git a/docs/User Guide/User Guide/Installation & Setup/Mobile Frontend.md b/docs/User Guide/User Guide/Installation & Setup/Mobile Frontend.md
index 487b155cb7..3c89091e71 100644
--- a/docs/User Guide/User Guide/Installation & Setup/Mobile Frontend.md
+++ b/docs/User Guide/User Guide/Installation & Setup/Mobile Frontend.md
@@ -16,6 +16,7 @@ Here is a non-exhaustive list of differences between the desktop version and the
* Press and hold a note to display the <a class="reference-link" href="../Basic%20Concepts%20and%20Features/UI%20Elements/Note%20Tree/Note%20tree%20contextual%20menu.md">Note tree contextual menu</a>.
* The <a class="reference-link" href="../Basic%20Concepts%20and%20Features/Navigation/Quick%20search.md">Quick search</a> bar is also displayed at the top of the note tree.
* The full <a class="reference-link" href="../Basic%20Concepts%20and%20Features/Navigation/Search.md">Search</a> function can be triggered either from either the <a class="reference-link" href="../Basic%20Concepts%20and%20Features/UI%20Elements/Global%20menu.md">Global menu</a> or from the <a class="reference-link" href="../Basic%20Concepts%20and%20Features/UI%20Elements/Launch%20Bar.md">Launch Bar</a>, if configured.
+* The <a class="reference-link" href="../Basic%20Concepts%20and%20Features/UI%20Elements/Global%20menu.md">Global menu</a> is shorter: _Open New Window_ and _Show Cheatsheet_ are left out, and _Switch to Desktop Version_ is under _Advanced_.
* The <a class="reference-link" href="../Basic%20Concepts%20and%20Features/UI%20Elements/Launch%20Bar.md">Launch Bar</a> is displayed at the bottom of the screen.
* The launch bar uses a different configuration for icons than the desktop version. See the dedicated page for more information on how to configure it.
* Most of the note-related actions are grouped in the horizontal dots icon on the top-right of the note.
@@ -86,7 +87,7 @@ If you are running Trilium without a dedicated [server installation](Server%20In
Trilium decides automatically whether to use mobile or desktop front-end. If this is not appropriate, you can use `?mobile` or `?desktop` query param on **login** page (Note: you might need to log out).
-Alternatively, simply select _Switch to Mobile/Desktop Version_ in the <a class="reference-link" href="../Basic%20Concepts%20and%20Features/UI%20Elements/Global%20menu.md">Global menu</a>.
+Alternatively, simply select _Switch to Mobile Version_ in the <a class="reference-link" href="../Basic%20Concepts%20and%20Features/UI%20Elements/Global%20menu.md">Global menu</a>. In the mobile version, select _Advanced_ → _Switch to Desktop Version_ there instead.
## Scripting