Compare commits

...

772 Commits

Author SHA1 Message Date
Elian Doran
62706a6af2 chore(release): 0.92.4 2025-03-16 16:04:21 +02:00
Elian Doran
79c82b16ce feat(docs): document admonitions 2025-03-16 16:00:10 +02:00
Elian Doran
ba96806fab chore(docs): change order of top level elements 2025-03-16 15:56:59 +02:00
Elian Doran
8c1f4b0014 feat(docs): erase unnecessary attachments 2025-03-16 14:45:21 +02:00
Elian Doran
051cba9a6d fix(docs): content language attachment 2025-03-16 14:41:58 +02:00
Elian Doran
800424405a fix(import/zip): support special characters for attachments 2025-03-16 14:39:27 +02:00
Elian Doran
132a8f7c65 chore(docs): update to match new img handling 2025-03-16 14:05:38 +02:00
Elian Doran
3eaa68da23 feat(import/markdown): maintain consistency with CKEditor for images 2025-03-16 13:58:31 +02:00
Elian Doran
8aaf2367e9 feat(in-app-help): hide notes that are hidden from share 2025-03-16 13:33:07 +02:00
Elian Doran
6f799692e0 feat(in-app-help): render note list 2025-03-16 13:24:34 +02:00
Elian Doran
7df86dd60b Merge pull request #1439 from TriliumNext/renovate/better-sqlite3-11.x-lockfile
fix(deps): update dependency better-sqlite3 to v11.9.0
2025-03-16 12:27:32 +02:00
Elian Doran
dd8818f0ac Merge pull request #1438 from TriliumNext/renovate/typedoc-0.x
chore(deps): update dependency typedoc to v0.28.0
2025-03-16 12:26:22 +02:00
Elian Doran
35dad6ffce Merge pull request #1437 from TriliumNext/renovate/mind-elixir-4.x
fix(deps): update dependency mind-elixir to v4.4.2
2025-03-16 12:24:51 +02:00
renovate[bot]
b13cab411b fix(deps): update dependency better-sqlite3 to v11.9.0 2025-03-16 02:48:25 +00:00
renovate[bot]
09a1227b63 chore(deps): update dependency typedoc to v0.28.0 2025-03-16 02:48:13 +00:00
renovate[bot]
511c69bdb0 fix(deps): update dependency mind-elixir to v4.4.2 2025-03-16 02:48:00 +00:00
Elian Doran
2828b39f48 chore(client/ts): port some more files 2025-03-16 00:45:46 +02:00
Elian Doran
ee5eba193a Merge pull request #1395 from TriliumNext/build_improve-electron-forge_v3
build(electron-forge): improve electron-forge build process
2025-03-15 23:53:56 +02:00
Elian Doran
c1acaa0159 Merge branch 'develop' into build_improve-electron-forge_v3 2025-03-15 23:42:43 +02:00
Elian Doran
bb14667bdf fix(text): PHP, Sass, TypeScript/JSX not rendered in code blocks 2025-03-15 23:12:07 +02:00
Elian Doran
7b1299a758 fix(client): error due to typings 2025-03-15 22:45:13 +02:00
Elian Doran
3c93fdc202 feat(markdown/import): remove space in admonition 2025-03-15 22:39:33 +02:00
Elian Doran
40d233dccc chore(deps): remove no longer necessary html-minifier 2025-03-15 22:20:43 +02:00
Elian Doran
182bccad39 chore(client/ts): port some dialogs 2025-03-15 22:14:21 +02:00
Elian Doran
1bf16bfa22 feat(import/markdown): remove spaces in lists 2025-03-15 21:30:19 +02:00
Elian Doran
30593eeeac refactor(import/markdown): change renderer instead of applying an uglifier 2025-03-15 21:07:02 +02:00
Elian Doran
36fa0af706 fix(docs): update calendar view documentation 2025-03-15 19:44:15 +02:00
Elian Doran
00106580ca fix(admonitions): floating images breaking out 2025-03-15 19:31:45 +02:00
Elian Doran
ac419e8ab4 feat(docs): remove inline warnings and apply admonitions 2025-03-15 18:56:55 +02:00
Elian Doran
c27f13d49f fix(test): one more broken test 2025-03-15 18:18:17 +02:00
Elian Doran
2b966afbe1 fix(test): tests that got broken along the way 2025-03-15 17:51:10 +02:00
Elian Doran
bc8cca664b feat(ci): trigger dev workflow on PR and main branch 2025-03-15 17:14:17 +02:00
Elian Doran
e9a0c68a28 Merge branch 'develop' into build_improve-electron-forge_v3 2025-03-15 17:00:53 +02:00
Elian Doran
103b29d3de Revert "fix(flatpak): try setting different bin to avoid sandbox issue"
This reverts commit a778ec617f.
2025-03-15 13:44:30 +02:00
Panagiotis Papadopoulos
3b8c645cca Merge branch 'develop' into build_improve-electron-forge_v3 2025-03-15 12:09:52 +01:00
Elian Doran
a778ec617f fix(flatpak): try setting different bin to avoid sandbox issue 2025-03-15 13:01:28 +02:00
Elian Doran
df5939b201 feat(share): add basic support for admonitions 2025-03-15 12:30:07 +02:00
Elian Doran
f841b139d9 fix(admonitions): missing style on mobile 2025-03-15 12:25:48 +02:00
Elian Doran
535233fec8 feat(import/markdown): basic support for admonitions 2025-03-15 11:58:11 +02:00
Elian Doran
6d67e69e2f feat(export/markdown): basic support for admonitions 2025-03-15 11:30:56 +02:00
Elian Doran
b1e3ea4c80 fix(admonition): inserting new admonitions of given type not working 2025-03-15 10:50:04 +02:00
Elian Doran
0f41afe841 fix(tmp): files not cleaned up 2025-03-15 10:34:17 +02:00
Elian Doran
aa6ee3fd60 fix(global_menu): double separator on mobile 2025-03-15 10:34:07 +02:00
Elian Doran
0f28bbb1be feat(server): use custom temporary directory within trilium-data 2025-03-15 10:11:54 +02:00
Elian Doran
45b7d51db9 fix(zen): missing edit read-only note (closes #1371) 2025-03-15 02:21:00 +02:00
Elian Doran
6c1f631ddb fix(right_pane): buttons disappearing (force min width, closes #1419). 2025-03-15 02:08:46 +02:00
Elian Doran
6acb490df4 feat(editor): move code formatting back to main level (closes #1375) 2025-03-15 02:00:42 +02:00
Elian Doran
598413b56d test(editor): ensure both toolbars have same items 2025-03-15 01:57:53 +02:00
Elian Doran
fd029ac451 fix(ribbon): exception about focusing 2025-03-15 01:40:46 +02:00
Elian Doran
b4ea96b7c7 Merge pull request #1428 from pchemguy/bat-files-fixes
Fixes missing quotes in the `bat` files.
2025-03-15 01:20:37 +02:00
Elian Doran
63ad784021 feat(math/display): allow inserting in display in a list 2025-03-15 01:07:59 +02:00
Elian Doran
4db2aab47f feat(admonition): integrate autoformatting 2025-03-14 23:09:46 +02:00
Elian Doran
9ff1ea4b8f style(admonition): bottom margin for last item 2025-03-14 22:29:24 +02:00
Elian Doran
265d54e44b fix(export): remove non-functional PDF export type 2025-03-14 22:24:10 +02:00
Elian Doran
d9764365cb feat(import): allow importing .excalidraw files 2025-03-14 22:13:31 +02:00
Elian Doran
ad8c1a4a29 feat(export): use right extension for canvas 2025-03-14 22:01:04 +02:00
Elian Doran
abddde910c refactor(canvas): use better approach to disabling export 2025-03-14 21:59:02 +02:00
Elian Doran
3c146cdb20 fix(canvas): unable to export as image (closes #1431) 2025-03-14 21:53:23 +02:00
Elian Doran
ae3f0e0e4b fix(types): add missing dependency 2025-03-14 21:43:37 +02:00
Elian Doran
56d3cd038c fix(deps): add missing dependency 2025-03-14 21:42:59 +02:00
Elian Doran
a2f0896c2a feat(import/markdown): collapse unnecessary whitespace when importing 2025-03-14 19:50:26 +02:00
Elian Doran
c892c95aae chore(docs): collapse unnecessary whitespace 2025-03-14 19:47:08 +02:00
Elian Doran
bbf6ae6aab feat(sql_console): preserve whitespace in columns 2025-03-14 18:53:04 +02:00
Elian Doran
8b0ddf6f9d chore(docs): update markdown documentation with proper keyboard shortcuts 2025-03-14 18:01:53 +02:00
Elian Doran
6b89bffffb feat(export/markdown): preserve keyboard shortcuts 2025-03-14 17:59:50 +02:00
Elian Doran
80421bb220 refactor(server): rename md -> markdown for consistency 2025-03-14 16:25:10 +02:00
PChemGuy
df9a413ef8 Strip trailing backslash
%~dp0 always contains a trailing backslash. The way %DIR% is used in the following line, the trailing slash should be stripped. Alternatively, `%DIR%\\` may be replaced with `%DIR%`, but I would advice against. It is ok to have `%~dp0trilium-data`, which is a conventional pattern. Once %~dp0 is replaced with %DIR% (which is not really warranted here), stripping the trailing slash right after assignment is preferable.
2025-03-14 14:29:37 +03:00
PChemGuy
4971619b69 Missing quotes 2025-03-14 14:19:11 +03:00
Elian Doran
875e65284c feat(docs): use <kbd> for keyboard shortcuts 2025-03-14 12:11:09 +02:00
Elian Doran
806cd7129a fix(docs): rtl image 2025-03-14 11:34:27 +02:00
Elian Doran
c8725ce6ef feat(docs): align documentation with new settings 2025-03-14 11:32:07 +02:00
Elian Doran
0c55b1eee8 feat(editor): rewrite <i> to <em> for compatibility with Markdown 2025-03-14 11:31:46 +02:00
Elian Doran
9b217a5b82 Merge pull request #1366 from rom1dep/calendar_enh_displayed
feat(calendar) improvements
2025-03-14 11:17:44 +02:00
Elian Doran
a50b8c7f0a Merge pull request #1425 from TriliumNext/renovate/mermaid-11.x
fix(deps): update dependency mermaid to v11.5.0
2025-03-14 11:15:51 +02:00
Elian Doran
5efb5fd303 Merge pull request #1424 from TriliumNext/renovate/i18next-24.x
fix(deps): update dependency i18next to v24.2.3
2025-03-14 11:15:12 +02:00
Elian Doran
3656b1e0eb Merge pull request #1423 from TriliumNext/renovate/force-graph-1.x
fix(deps): update dependency force-graph to v1.49.4
2025-03-14 11:14:47 +02:00
Elian Doran
b2060799c4 Merge pull request #1422 from TriliumNext/renovate/axios-1.x
fix(deps): update dependency axios to v1.8.3
2025-03-14 11:14:13 +02:00
Elian Doran
b18e5a34c4 Merge pull request #1421 from TriliumNext/renovate/electron-34.x
chore(deps): update dependency electron to v34.3.3
2025-03-14 11:13:57 +02:00
Elian Doran
2578c2d4f6 Merge pull request #1398 from TriliumNext/renovate/happy-dom-monorepo
chore(deps): update dependency happy-dom to v17.4.4
2025-03-14 11:13:17 +02:00
renovate[bot]
618bba71da fix(deps): update dependency mermaid to v11.5.0 2025-03-14 02:53:05 +00:00
renovate[bot]
8bff71fed4 fix(deps): update dependency i18next to v24.2.3 2025-03-14 02:52:56 +00:00
renovate[bot]
839cfac2ac fix(deps): update dependency force-graph to v1.49.4 2025-03-14 02:52:45 +00:00
renovate[bot]
ded979b6ff fix(deps): update dependency axios to v1.8.3 2025-03-14 02:52:32 +00:00
renovate[bot]
948c60277d chore(deps): update dependency electron to v34.3.3 2025-03-14 02:52:20 +00:00
Elian Doran
f487348cc5 chore(admonitions): remove formatting plugin for now 2025-03-14 00:04:23 +02:00
Elian Doran
ee76e81d1f feat(admonitions): integrate custom admonitions plugin 2025-03-14 00:02:55 +02:00
Elian Doran
507a594198 feat(admonitions): color the icon 2025-03-13 16:22:05 +02:00
Elian Doran
732252df5b feat(admonitions): add custom color per admonition 2025-03-13 16:19:58 +02:00
Elian Doran
ba39769174 feat(admonitions): add icon 2025-03-13 16:13:16 +02:00
Panagiotis Papadopoulos
6a9342abce build(Docker): add a temporary exception for files that copy-dist tries to copy for electron-forge, as otherwise copy-dist will fail inside Docker build
this will be fixed in an upcoming PR where I overhaul copy-dist to allow for build target specific copying of files
2025-03-13 08:44:31 +01:00
Panagiotis Papadopoulos
67c752c11b ci: adjust build-electron action to use the newly introduced outDir "./dist" for electron-forge 2025-03-13 08:21:12 +01:00
Elian Doran
adf5bee98f feat(admonitions): apply basic styling & configure for paragraphs 2025-03-13 09:15:11 +02:00
Panagiotis Papadopoulos
cc0931b402 build(electron-forge): set outDir to ./dist, to have the same behaviour as the Server builds
since we run electron-forge inside the ./build folder, we need to go up a directory (using ../dist), to have it output to ./dist
2025-03-13 08:09:53 +01:00
Panagiotis Papadopoulos
b48fbbe583 build(copy-dist): copy over desktop.ejs for electron-forge as well
it is required for Flatpak/Deb/RPM Linux packages
2025-03-13 07:59:12 +01:00
Panagiotis Papadopoulos
1877d26296 chore(scripts): electron-forge:prepare -> copy node_modules folder as is
electron-forge does not like, if we get rid of devDeps ourselves already it seems.
It *wants* to do it itself, otherwise build fails…

It does seem to correctly strip all the devDeps though, at least there's that.
2025-03-13 07:59:12 +01:00
Panagiotis Papadopoulos
4ce2c10d72 build(copy-dist): copy over the start scripts for now 2025-03-13 07:59:12 +01:00
Panagiotis Papadopoulos
11772860b6 build(electron-forge): stop copying unused .anonymize-database.sql as ressource 2025-03-13 07:59:12 +01:00
Panagiotis Papadopoulos
6b9d8f0d67 build(electron-forge): execute electron-forge commands in our "build" output context
since we build TS and webpack ourselves and are not using any electron-forge plugins (at least at the moment) -> we should use the "build" folder as build context for electron-forge:

in comparison to running electron-forge in the root folder of the project, this avoids electron-forge from packing the source code multiple times (e.g. once as uncompiled TS, then as compiled JS, and then (partially) a third time as webpack bundled JS files), same as some of the assets.

to achieve this, we run our usual TS/Webpack build process, but then install the npm dependencies *inside* the build folder (as otherwise electron-forge would choke on the missing node_modules it and abort building).

In theory we could avoid cd-ing into the build folder, by providing the "dir" as argument to electron-forge's CLI -- BUT that wouldn't play well with our CI, where we are passing --arch and --platform options to it, which need to come *before* the dir argument.

since we now cd into the "build" folder, we also need to adjust the path in package.json "main" again
2025-03-13 07:59:12 +01:00
Adorian Doran
10de4e798b client/options: fix failing test 2025-03-13 06:10:09 +02:00
Adorian Doran
eb630c80d6 client/options: format code 2025-03-13 05:50:29 +02:00
Adorian Doran
5cab7eb403 client/options: reorder sections 2025-03-13 05:46:34 +02:00
Adorian Doran
04c6813b0a client/options: relocate the "Localization" section to the "Language & Region" page 2025-03-13 05:35:43 +02:00
Adorian Doran
1369a44d9b style/options/ETAPI: add an icon to the create token button 2025-03-13 05:25:34 +02:00
Adorian Doran
88aa9a4e79 client/options/code notes: create the "Editor" section, reorganize 2025-03-13 05:20:58 +02:00
Adorian Doran
0e748fbce0 style/options/ETAPI: update the icon of the edit token button 2025-03-13 04:30:42 +02:00
Adorian Doran
6c6d20a830 style: fix note title input overlapping with the zen mode exit button 2025-03-13 04:19:42 +02:00
Adorian Doran
69f95068f1 style(next)/shell/right pane: minor restyle 2025-03-13 04:04:08 +02:00
Adorian Doran
2066f821cb style(next)/ribbon/image properties: improve the layout 2025-03-13 03:24:04 +02:00
Adorian Doran
25a787f9dc Merge branch 'develop' of https://github.com/TriliumNext/Notes into develop 2025-03-12 22:30:51 +02:00
Adorian Doran
a2b73feb25 style/image properties: add icons to buttons 2025-03-12 22:30:49 +02:00
Elian Doran
062955aa81 feat(editor): integrate styles support 2025-03-12 22:08:23 +02:00
Elian Doran
b8cbd79ae1 refactor(client): rename ckeditor config file 2025-03-12 22:08:23 +02:00
Adorian Doran
fc4712240c Merge branch 'develop' of https://github.com/TriliumNext/Notes into develop 2025-03-12 21:42:43 +02:00
Adorian Doran
18882d0b7e style(next)/toasts: change the dark mode colors 2025-03-12 21:42:39 +02:00
Elian Doran
d469670a46 feat(docs): document formatting keyboard shortcuts + fix broken image 2025-03-12 19:03:33 +02:00
Elian Doran
e0cebf1c00 style(next): apply kbd style to content 2025-03-12 18:08:39 +02:00
Elian Doran
383408e884 style(editor): add some separators to formatting toolbar 2025-03-12 18:06:34 +02:00
Elian Doran
87d28c8c2f style(editor): group some formatting options for floating toolbar 2025-03-12 18:04:20 +02:00
Elian Doran
bec7a526ad feat(editor): add support for marking keyboard shortcuts 2025-03-12 17:58:12 +02:00
Adorian Doran
bb8325cf8d Merge branch 'develop' of https://github.com/TriliumNext/Notes into develop 2025-03-12 15:08:26 +02:00
Adorian Doran
da9a029f8f style(next)/note list: remove a no longer needed border 2025-03-12 15:08:22 +02:00
Elian Doran
c02b5468a6 feat(docs): clean up RTL and reorder 2025-03-12 14:47:42 +02:00
Elian Doran
5dd5e8da91 feat(docs): document adjusting image alignment 2025-03-12 13:36:30 +02:00
Adorian Doran
f991cee3ac Merge branch 'develop' of https://github.com/TriliumNext/Notes into develop 2025-03-12 13:31:07 +02:00
Adorian Doran
1426e43fb8 style(next): move color variables to color scheme-related stylesheets 2025-03-12 13:31:04 +02:00
Elian Doran
61899aa32d chore(edit-docs): ignore document.db 2025-03-12 13:14:09 +02:00
Elian Doran
e90bbe31ba feat(docs): document the launch bar 2025-03-12 13:14:09 +02:00
Elian Doran
034998fa97 feat(docs): document vertical vs horizontal layout 2025-03-12 13:14:08 +02:00
Elian Doran
3a41d8fd11 feat(docs): improve note tree documentation 2025-03-12 13:14:08 +02:00
Elian Doran
e9175d60ec feat(docs): improve documentation for code notes, code blocks 2025-03-12 13:14:08 +02:00
Adorian Doran
4f87bd101e Merge branch 'develop' of https://github.com/TriliumNext/Notes into develop 2025-03-12 12:55:57 +02:00
Adorian Doran
9c78415a1f style(next): restyle toasts 2025-03-12 12:55:55 +02:00
Elian Doran
06d848ba17 feat(code): support mips (closes #1406) 2025-03-12 10:54:44 +02:00
Elian Doran
42821d47c8 refactor(mime): sort alphabetically 2025-03-12 10:54:19 +02:00
Panagiotis Papadopoulos
d7aedfbd36 build(copy-dist): exit on any caught error to make sure copy-dist fails during CI if any error occurs
if we don't exit, it will just log the issue - however we *want* it to fail it there is an error, so that it doesn't continue in the CI

alternative would be to rethrow the error, but then we'd print the error into the logs twice :-)

closes https://github.com/TriliumNext/Notes/issues/1413
2025-03-12 09:52:42 +01:00
Adorian Doran
b730ca0033 Merge branch 'develop' of https://github.com/TriliumNext/Notes into develop 2025-03-12 10:44:04 +02:00
Adorian Doran
bad7776076 style/toasts: get rid of some !important properties 2025-03-12 10:43:53 +02:00
Panagiotis Papadopoulos
d088c8e5b2 build(copy-dist): fix path to excalidraw fonts 2025-03-12 08:57:05 +01:00
Elian Doran
2463e44bf8 chore(deps): downgrade to react 18 2025-03-12 09:15:37 +02:00
renovate[bot]
b600b51fe8 chore(deps): update dependency happy-dom to v17.4.4 2025-03-12 02:59:14 +00:00
Adorian Doran
ddd2babe21 style/content renderer: localize some strings 2025-03-12 03:40:56 +02:00
Adorian Doran
b082f95d42 style/content renderer: add icons to the "download" and "open" buttons 2025-03-12 03:32:54 +02:00
Adorian Doran
79fb87d9ff style(next)/search: refactor 2025-03-12 03:13:41 +02:00
Adorian Doran
027577c709 style(next)/search: change the alignment of the search-related buttons 2025-03-12 03:12:22 +02:00
Adorian Doran
dd62979d65 style/attachments page: add an icon to the upload button 2025-03-12 02:49:40 +02:00
Adorian Doran
f86170f553 style/note revisions dialog: add icons to buttons 2025-03-12 02:38:34 +02:00
Adorian Doran
82b012a38b style(next)/ribbon/file properties: refactor 2025-03-12 02:13:32 +02:00
Adorian Doran
4b6998975f style(next)/ribbon/file properties: improve the layout 2025-03-12 02:06:29 +02:00
Adorian Doran
600585bfd3 style(next)/ribbon/file properties: improve the layout 2025-03-12 02:02:18 +02:00
Adorian Doran
0c8e7806f4 style/ribbon/file properties: add icons to buttons 2025-03-12 02:01:19 +02:00
Adorian Doran
62b5bbc9ce style(next): fix the submenu arrows overlapping the keyboard shortcuts 2025-03-12 00:57:16 +02:00
Elian Doran
3ae48bba00 chore(deps): update react to latest 2025-03-12 00:06:11 +02:00
Elian Doran
cf76358dd7 fix(canvas): font loading 2025-03-11 23:03:34 +02:00
Elian Doran
c2cb48a25c chore(deps): update to excalidraw 0.18.0 2025-03-11 22:59:16 +02:00
Elian Doran
39f3cb47fa Merge pull request #1393 from TriliumNext/build_hotfix-electron
fix(build/electron): hotfix for failing nightly electron builds
2025-03-11 22:20:17 +02:00
Elian Doran
15c04c38b9 chore(docs): add HTML user guide 2025-03-11 22:04:19 +02:00
Elian Doran
3723824246 chore(scripts): downgrade Electron to 33 for Nix 2025-03-11 22:02:05 +02:00
Elian Doran
5ee13623ee feat(edit-docs): generate HTML documentation as well 2025-03-11 21:58:32 +02:00
Elian Doran
9d161a007e feat(etc/reddit): add icon 2025-03-11 21:57:43 +02:00
Elian Doran
3457c2e4d8 feat(content_renderer): render docnotes 2025-03-11 21:57:33 +02:00
Elian Doran
32f84e8378 refactor(client): extract doc rendering to dedicated service 2025-03-11 21:32:48 +02:00
Panagiotis Papadopoulos
4494662d2a fix(build/electron): hot fix for failing nightly electron builds
this is caused by recently reverting the output of "build:prepare-dist" from "dist" to "build"

-> this is just a temporary fix -> I am working in parallel already on an improved electron-forge build process, whihc will be ready by end of the week
2025-03-11 20:24:11 +01:00
Elian Doran
4124c96e02 fix(docs): syntax highlighting for Nginx 2025-03-11 21:12:42 +02:00
Elian Doran
b278bc8ce4 refactor(test): use matrix for testing import/export 2025-03-11 21:11:23 +02:00
Elian Doran
8c71e6aa90 fix(export/markdown): proper language tag for Nginx 2025-03-11 21:05:55 +02:00
Elian Doran
09c081fdcf feat(edit-docs): remove input file 2025-03-11 20:48:40 +02:00
Elian Doran
ba17ce8616 fix(docs): numbering in Nginx 2025-03-11 20:46:50 +02:00
Elian Doran
34ffba54ac feat(edit-docs): do proper becca cleaning before starting 2025-03-11 20:42:53 +02:00
Elian Doran
d3cfc1c88b feat(edit-docs): ignore options change 2025-03-11 20:40:25 +02:00
Elian Doran
4969cf7d5b feat(edit-docs): wait for import to finish before starting electron 2025-03-11 20:39:30 +02:00
Elian Doran
ac4a8a44d4 chore(docs): import canvas note documentation 2025-03-11 20:27:54 +02:00
Elian Doran
69a39bca2f fix(docs): clean up documentation 2025-03-11 20:23:36 +02:00
Elian Doran
c79eeea060 fix(docs): few broken image references 2025-03-11 19:50:29 +02:00
Elian Doran
f86434523e fix(export): maintain same order of attachments 2025-03-11 18:27:08 +02:00
Elian Doran
bb288c5c68 fix(edit-docs): consistency check issues 2025-03-11 18:26:49 +02:00
Elian Doran
0af357ece8 chore(docs): update with deterministic order 2025-03-11 18:05:42 +02:00
Elian Doran
a2795f3440 fix(import/markdown): title deduplication breaking special chars 2025-03-11 17:51:35 +02:00
Elian Doran
3d10ac5e1f chore(docs): solve import/export errors 2025-03-11 17:36:42 +02:00
Elian Doran
997e962fbe fix(edit-docs): attachments duplication 2025-03-11 17:24:29 +02:00
Elian Doran
e939b7b3d9 fix(docs): unescaped URL in images 2025-03-11 17:24:15 +02:00
Elian Doran
a441ea2461 feat(md): rewrite image URL with spaces 2025-03-11 17:12:56 +02:00
Elian Doran
f67e2ebcd5 chore(edit-docs): move Markdown documentation outside src for now 2025-03-11 16:11:16 +02:00
Elian Doran
971b388d1a Merge pull request #1392 from TriliumNext/Note_Revisions
Fix the bug where note revisions cannot be previewed.
2025-03-11 13:39:00 +02:00
Elian Doran
a33d532958 Merge pull request #1382 from TriliumNext/renovate/happy-dom-monorepo
chore(deps): update dependency happy-dom to v17.4.3
2025-03-11 13:38:25 +02:00
Elian Doran
80d1985882 Merge pull request #1381 from TriliumNext/renovate/autoprefixer-10.x
chore(deps): update dependency autoprefixer to v10.4.21
2025-03-11 13:38:05 +02:00
Elian Doran
ecc5e0f3b8 Merge pull request #1388 from TriliumNext/build_electron-dump-db
build(electron-forge): stop packing dump-db folder
2025-03-11 13:37:19 +02:00
Elian Doran
5252fe3d1e Merge pull request #1390 from TriliumNext/renovate/typescript-eslint-monorepo
chore(deps): update dependency typescript-eslint to v8.26.1
2025-03-11 13:34:45 +02:00
Elian Doran
182da7717f Merge pull request #1389 from TriliumNext/renovate/electron-34.x
chore(deps): update dependency electron to v34.3.2
2025-03-11 13:34:21 +02:00
Elian Doran
6b3bf1151a Merge branch 'develop' into renovate/happy-dom-monorepo 2025-03-11 13:27:41 +02:00
Elian Doran
c16f240f31 Merge branch 'develop' into renovate/autoprefixer-10.x 2025-03-11 13:27:38 +02:00
SiriusXT
4b269c2859 Fix the bug where note revisions cannot be previewed. 2025-03-11 16:24:35 +08:00
renovate[bot]
5299da6525 chore(deps): update dependency typescript-eslint to v8.26.1 2025-03-11 02:37:37 +00:00
renovate[bot]
ca6253f3bb chore(deps): update dependency electron to v34.3.2 2025-03-11 02:37:19 +00:00
Elian Doran
d639798fa8 refactor(server): deduplicate options init 2025-03-10 21:21:59 +02:00
Elian Doran
e79f18f001 fix(edit-docs): convert to Markdown 2025-03-10 21:15:33 +02:00
Elian Doran
d134ee0552 fix(edit-docs): preserve attachment IDs 2025-03-10 20:50:57 +02:00
Elian Doran
b412f06b79 fix(edit-docs): doubly nested directories 2025-03-10 20:16:56 +02:00
Elian Doran
7a4b1b41b4 feat(edit-docs): periodic export 2025-03-10 19:34:10 +02:00
Elian Doran
841bc54f78 feat(edit-docs): preserve IDs when importing 2025-03-10 19:14:46 +02:00
Panagiotis Papadopoulos
02a00000fb build(electron-forge): stop packing dump-db folder
see https://github.com/TriliumNext/Notes/issues/1115
2025-03-10 18:11:56 +01:00
Elian Doran
966ad36919 fix(edit-docs): allow import of contents 2025-03-10 18:56:00 +02:00
Elian Doran
8ac5d01f43 feat(edit-docs): start importing zip 2025-03-10 18:51:40 +02:00
Elian Doran
15936ff8b8 fix(edit-docs): relative path 2025-03-10 17:57:56 +02:00
Elian Doran
a1918ad491 feat(edit-docs): start creating input zip file 2025-03-10 17:50:58 +02:00
Elian Doran
2b891adc34 feat(edit-docs): create child note for importing 2025-03-10 17:41:13 +02:00
Elian Doran
42d3236fe7 fix(edit-docs): stop initializing if DB is already so 2025-03-10 17:08:40 +02:00
Elian Doran
f3d753cc46 feat(edit-docs): initialize database automatically 2025-03-10 17:04:17 +02:00
Elian Doran
6a549af34a feat(edit-docs): clean up meta 2025-03-10 16:37:39 +02:00
Elian Doran
bffb0963df feat(edit-docs): clean up ZIP file 2025-03-10 16:31:44 +02:00
Elian Doran
df2a9aed44 feat(edit-docs): automatically write documentation on start-up 2025-03-10 16:20:48 +02:00
Elian Doran
2530c01a31 chore(docs): update in-app documentation 2025-03-10 16:20:13 +02:00
Elian Doran
054a919fad chore(docs): small structure update 2025-03-10 15:04:04 +02:00
Elian Doran
9fa19469fd chore(docs): improvements + new doc 2025-03-10 14:21:53 +02:00
Elian Doran
b9c409ec33 chore(scripts): edit documentation with Nix 2025-03-10 10:53:49 +02:00
Elian Doran
6c845102d3 fix(build): missing arguments in eslint.spec.ts 2025-03-10 09:25:33 +02:00
Elian Doran
e6c04e70e4 Merge pull request #1369 from TriliumNext/build_improve-server-build
build: fix/improve server build
2025-03-10 09:19:09 +02:00
renovate[bot]
9dcfae56a1 chore(deps): update dependency happy-dom to v17.4.3 2025-03-10 02:33:38 +00:00
renovate[bot]
05b2f8c097 chore(deps): update dependency autoprefixer to v10.4.21 2025-03-10 02:33:29 +00:00
Romain DEP.
5658f22f9a feat(calendar): do no longer require # or ~ to be specified by the user
to signify that the provided attribute is a label or a relation. It will now
work either way, giving preference to the label if one is found.
2025-03-09 22:44:45 +01:00
Elian Doran
0232fee905 chore(docs): reorder and improve slightly 2025-03-09 23:29:01 +02:00
Romain DEP.
85917d7207 feat(calendar): support displaying of attributes and realtions with multiple cardinality 2025-03-09 21:26:41 +01:00
Elian Doran
e129e0369d server(attachments): render empty SVGs properly (closes #1378) 2025-03-09 22:23:01 +02:00
Elian Doran
be6e56fbe8 feat(eslint): add support for module.exports 2025-03-09 21:41:13 +02:00
Elian Doran
1fb4634b7b feat(eslint): add globals for jQuery 2025-03-09 21:38:16 +02:00
Panagiotis Papadopoulos
afe4fc2d1a build(build-server): add more detail to status "echo"s 2025-03-09 18:59:54 +01:00
Panagiotis Papadopoulos
3450066214 build(build.sh): remove unused build script
this is not used anymore at all, it was replaced by GitHub CI Actions

it even mentions several other scripts, that got removed in the meantime as well
2025-03-09 18:59:54 +01:00
Panagiotis Papadopoulos
36fad35be5 build(build-server): rename archive name to the same naming scheme used in the Github CI 2025-03-09 18:59:54 +01:00
Panagiotis Papadopoulos
56340009ca build(build-server): remove now unused DONTCOPY check 2025-03-09 18:59:54 +01:00
Panagiotis Papadopoulos
d110c8b067 build(build-server): add some status "echo"s 2025-03-09 18:59:54 +01:00
Panagiotis Papadopoulos
d8ad018819 build(build-server): also delete electron map files 2025-03-09 18:59:54 +01:00
Panagiotis Papadopoulos
33de342842 build(build-server): download and extract node in a single step 2025-03-09 18:59:54 +01:00
Panagiotis Papadopoulos
4bba061629 build(build-server): get rid of now unnecessary arch handling for node
directly use "ARCH" instead of creating 2 variables with the identical content as "ARCH"
2025-03-09 18:59:54 +01:00
Panagiotis Papadopoulos
87d37366e4 build(build-server): remove unnecessary copying of translations
already happens during build:prepare-dist step
2025-03-09 18:59:54 +01:00
Panagiotis Papadopoulos
1324cc2e53 build(build-server): add TODO remark 2025-03-09 18:59:54 +01:00
Panagiotis Papadopoulos
80d6cd0356 build(build-server): delete temp build dir copy in dist folder 2025-03-09 18:59:54 +01:00
Panagiotis Papadopoulos
e0413b528f build(build-server): use a single "rm" command 2025-03-09 18:59:54 +01:00
Panagiotis Papadopoulos
19abd14058 build(build-server): use build dir for build and dist for final archive output 2025-03-09 18:59:54 +01:00
Panagiotis Papadopoulos
9bd31698e1 build(copy-trilium): use "|" as sed separator
allows us to avoid having to escape "/"
2025-03-09 18:59:54 +01:00
Panagiotis Papadopoulos
1ae5c43010 build(copy-trilium): do all the work inside build dir, no target directory needed anymore
-> all of these steps will eventually be merged with copy-dist script to have a unified copying script
2025-03-09 18:59:54 +01:00
Panagiotis Papadopoulos
f8b06f0634 build(copy-trilium): get rid of unecessary copying of files
-> already handled by "build:prepare-dist" step
2025-03-09 18:59:54 +01:00
Panagiotis Papadopoulos
930be2de05 build(copy-dist): copy LICENSE and README as well
copied over from copy-trilium.sh script
2025-03-09 18:59:54 +01:00
Panagiotis Papadopoulos
c89d86acb1 build(copy-trilium): use "build:prepare-dist" build script 2025-03-09 18:59:54 +01:00
Panagiotis Papadopoulos
d65281bfa5 build(copy-trilium): use npm ci 2025-03-09 18:59:54 +01:00
Panagiotis Papadopoulos
607f9096aa build: output into "build" folder again → "dist" will be used for the final output in archive form
this will allow for cleaner separation -> build for the output from the build stage (i.e. TS/Webpack + asset copying) and dist for the archive format of the build folder
2025-03-09 18:59:54 +01:00
Romain DEP.
6c1cb71c9f feat(calendar): make it so that events with customized calendar:startDate and calendar:endDate can be drag&dropped on the calendar view 2025-03-09 13:03:15 +01:00
Elian Doran
064799e8cb feat(docs): add v1 of the full documentation 2025-03-09 13:19:48 +02:00
Elian Doran
b7cb2e6e97 feat(docs): basic integration with shared db 2025-03-09 13:19:38 +02:00
Elian Doran
b00224c63c Merge pull request #1367 from TriliumNext/renovate/node-22.x
chore(deps): update dependency @types/node to v22.13.10
2025-03-09 09:41:29 +02:00
Elian Doran
5b5fb6bbd9 Merge pull request #1368 from TriliumNext/renovate/happy-dom-monorepo
chore(deps): update dependency happy-dom to v17.4.2
2025-03-09 09:40:42 +02:00
renovate[bot]
4ef1c5d4e2 chore(deps): update dependency happy-dom to v17.4.2 2025-03-09 01:53:34 +00:00
renovate[bot]
56c575cec2 chore(deps): update dependency @types/node to v22.13.10 2025-03-09 01:53:24 +00:00
Romain DEP.
3fe78cad61 feat(calendar): rename "promotedAttributes" into "displayedAttributes" and permit non-promoted attributes to be displayed 2025-03-08 22:17:58 +01:00
Adorian Doran
eb9d7dd172 style/login: prevent the page content being rendered before the stylesheet is loaded 2025-03-08 20:53:54 +02:00
Adorian Doran
7434fb372e style/login: prevent the icon from being dragged 2025-03-08 20:45:12 +02:00
Adorian Doran
d17513bec0 style(next): tweak the style of the login page 2025-03-08 20:40:00 +02:00
Adorian Doran
fc87f64840 style(next)/options: restyle the warning boxes 2025-03-08 19:32:56 +02:00
Adorian Doran
f6e869f2ac Merge branch 'develop' of https://github.com/TriliumNext/Notes into develop 2025-03-08 19:17:13 +02:00
Adorian Doran
69fab9a6d6 style(next)/options/shortcuts: improve the appearance of the page 2025-03-08 19:16:48 +02:00
Elian Doran
14c3fd5892 Merge pull request #1347 from TriliumNext/chore_eslint-fixes_src-routes
chore(lint): fix eslint issues in `src/routes`
2025-03-08 18:25:47 +02:00
Panagiotis Papadopoulos
c120132cbb Merge branch 'develop' into chore_eslint-fixes_src-routes 2025-03-08 17:15:53 +01:00
Panagiotis Papadopoulos
ecf1a0e4ad refactor(utils): add safeExtractMessageAndStackFromError util to remove code duplication 2025-03-08 17:07:25 +01:00
Panagiotis Papadopoulos
e20b662ea7 chore(routes): fix no-explicit-any lint/ts error for restoreRevision 2025-03-08 16:12:37 +01:00
Panagiotis Papadopoulos
7bd9be7b29 chore: use more narrow NoteType for RevisionRow 2025-03-08 16:11:58 +01:00
Panagiotis Papadopoulos
e3d0c53d03 chore(routes): fix no-explicit-any lint/ts error for catch blocks 2025-03-08 16:03:30 +01:00
Panagiotis Papadopoulos
272d7cd652 chore(routes/api/clipper): fix prefer-const lint errors 2025-03-08 15:31:12 +01:00
Panagiotis Papadopoulos
dd9e1e69d7 fix(routes/api/clipper): fix typo in error message 2025-03-08 15:27:39 +01:00
Panagiotis Papadopoulos
08a6053c38 refactor(routes/api/clipper): get rid of second htmlSanitizer call for pageUrl
-> the value is already sanitized in line 112, there's no need to call htmlSanitizer a second time here
2025-03-08 15:27:04 +01:00
Elian Doran
4cffc50218 Merge pull request #1361 from TriliumNext/themeUseNextAsBase
Theme use next as base
2025-03-08 09:55:11 +02:00
SiriusXT
1a54b8f5a5 Add themes that can be base 2025-03-08 15:10:38 +08:00
SiriusXT
e2c317f59c Add themes that can be base 2025-03-08 14:58:19 +08:00
Adorian Doran
1e81831ea0 style(next)/options: improve (again) the layout of the option cards 2025-03-08 05:49:18 +02:00
Adorian Doran
240ee2b6ac style(next)/options: improve the layout of the option cards 2025-03-08 05:34:43 +02:00
Adorian Doran
d47350363a style(next): remove no longer unused style 2025-03-08 04:45:55 +02:00
Adorian Doran
6a1f1948f0 Merge branch 'develop' of https://github.com/TriliumNext/Notes into develop 2025-03-08 04:44:26 +02:00
Adorian Doran
db4c5bcac2 client/options/advanced: use a table for "Existing anonymized databases" 2025-03-08 04:44:23 +02:00
Elian Doran
268b666d52 feat(template): duplicate content for geomap & mindmap (closes #357) 2025-03-08 04:28:24 +02:00
Elian Doran
ed06a3ee97 feat(template): duplicate content for relation map 2025-03-08 04:26:30 +02:00
Elian Doran
5d9bea8987 feat(template): duplicate content for canvas 2025-03-08 04:24:09 +02:00
Elian Doran
c7b99adb6a feat(template): duplicate content for mermaid diagrams 2025-03-08 04:23:05 +02:00
Adorian Doran
82a63a65da style(next)/options/shortcuts: tweak group headings 2025-03-08 04:17:16 +02:00
Adorian Doran
7582b1c43d style/options/appearance: fix the width of the "Main font" combo box 2025-03-08 04:01:49 +02:00
Adorian Doran
fa60e66a75 Merge branch 'develop' of https://github.com/TriliumNext/Notes into develop 2025-03-08 03:52:31 +02:00
Adorian Doran
d16708cf75 style(next)/options: tweak labels 2025-03-08 03:52:14 +02:00
Elian Doran
4f671738e6 fix(client): remove misleading message about removing revisions (closes #1308) 2025-03-08 03:45:02 +02:00
Adorian Doran
decf62c58c style: add a gap between consecutive radios / check boxes 2025-03-08 03:33:02 +02:00
Adorian Doran
9626b42443 style(next): add a gap between consecutive radios / check boxes 2025-03-08 03:27:59 +02:00
Adorian Doran
15d3285a90 client/options/text notes: convert the "Heading Style" combo box into radio buttons 2025-03-08 03:21:32 +02:00
Adorian Doran
a694017c87 Merge branch 'develop' of https://github.com/TriliumNext/Notes into develop 2025-03-08 03:18:57 +02:00
Adorian Doran
2cfb83a93c client/options/appearance: convert the "First day of the week" combo box into radio buttons 2025-03-08 03:18:42 +02:00
Elian Doran
4839edb3d7 feat(dump-db): use tsx instead of esrun 2025-03-08 03:14:38 +02:00
Elian Doran
9db5557cc1 Merge pull request #1359 from TriliumNext/renovate/eslint-monorepo
chore(deps): update eslint monorepo to v9.22.0
2025-03-08 03:10:33 +02:00
Elian Doran
acedb0e94c Merge pull request #1225 from TriliumNext/build_improve-ts-webpack
build: improvements for TS & Webpack & Docker
2025-03-08 03:08:30 +02:00
Elian Doran
d2ffd4a8cd Merge pull request #1358 from TriliumNext/renovate/happy-dom-monorepo
chore(deps): update dependency happy-dom to v17.4.0
2025-03-08 03:05:41 +02:00
Elian Doran
2ff7d7bc6d Merge branch 'develop' into renovate/eslint-monorepo 2025-03-08 03:03:00 +02:00
Elian Doran
7ade401018 feat(eslint): downgrade unused variables to warning 2025-03-08 03:02:25 +02:00
Elian Doran
3756524ad3 feat(test): basic tests for ESLint 2025-03-08 02:55:59 +02:00
Elian Doran
770b4afff3 Merge pull request #1360 from TriliumNext/renovate/eslint-linter-browserify-9.x
fix(deps): update dependency eslint-linter-browserify to v9.22.0
2025-03-08 02:50:24 +02:00
renovate[bot]
e530df8645 fix(deps): update dependency eslint-linter-browserify to v9.22.0 2025-03-08 00:46:50 +00:00
renovate[bot]
9d6adef5bf chore(deps): update dependency happy-dom to v17.4.0 2025-03-08 00:46:41 +00:00
Elian Doran
79adb0b20e feat(client): add recommended rules 2025-03-08 02:45:40 +02:00
Elian Doran
0273fad0ba refactor(deps): use different approach for eslint 2025-03-08 02:37:29 +02:00
renovate[bot]
7d21bcd611 chore(deps): update eslint monorepo to v9.22.0 2025-03-08 00:37:21 +00:00
Elian Doran
c4f8e9605f fix(client): update ESLint to latest 2025-03-08 02:20:56 +02:00
Elian Doran
3c84d0558d fix(style): login in dark mode not rendering correctly 2025-03-08 02:10:14 +02:00
Elian Doran
f8d759cbc3 chore(lock): version 2025-03-08 02:10:14 +02:00
Elian Doran
c297f88395 chore(server): remove unnecessary log 2025-03-08 02:10:14 +02:00
Adorian Doran
e74de6105a client/options: minor tweaks 2025-03-08 01:59:29 +02:00
Panagiotis Papadopoulos
91c37fa235 chore(routes/electron): disable lint rule for specific line
in this case using "{}" allows all primitive values, which seems to be what is required here.
so let's disable the rule "@typescript-eslint/no-empty-object-type" for this line
2025-03-08 00:54:29 +01:00
Panagiotis Papadopoulos
b56ff558a4 refactor(routes/api/import): get rid of "any" type in catch blocks 2025-03-08 00:39:01 +01:00
Panagiotis Papadopoulos
07fd5327b1 refactor(routes/custom): get rid of "any" type catch blocks 2025-03-08 00:22:12 +01:00
Panagiotis Papadopoulos
4b6972fb21 refactor(error_handlers): get rid of "any" type in csrf error handler 2025-03-08 00:15:46 +01:00
Panagiotis Papadopoulos
76574f0938 refactor(error_handlers): use HttpError classes in errorHandler
also gets rid of "any" type :-)
2025-03-08 00:14:24 +01:00
Adorian Doran
6d39c404c4 client/options/appearance/ribbon widgets: place checkboxes on separate lines 2025-03-08 01:01:05 +02:00
Adorian Doran
d24b5a232f style: fix the form text color 2025-03-08 00:54:53 +02:00
Adorian Doran
9a09a89066 client/options/appearance: change the layout of the "Native title bar" and "Enable background effects" options 2025-03-08 00:52:02 +02:00
Panagiotis Papadopoulos
0c8df7f885 refactor(error_handlers): use newly added ForbiddenError class 2025-03-07 23:30:12 +01:00
Panagiotis Papadopoulos
70e227f4c3 build(Docker): improve image size, by deleting node-compile-cache 2025-03-07 23:14:56 +01:00
Panagiotis Papadopoulos
907b8c503e build: copy package-lock.json into dist folder as well 2025-03-07 23:14:56 +01:00
Panagiotis Papadopoulos
38690053a8 build(Docker): improve image size, by deleting unnecessary node_modules fodler from dist folder
added a TODO as well, to get rid of this strange step here at some point
2025-03-07 23:14:56 +01:00
Panagiotis Papadopoulos
3553d64060 build(Docker/ci): get rid of running partial build locally
this is now handled fully inside Docker.

exception for "test_docker" job in "main-docker"
-> it seems that one needs to be there still, since it runs Playwright tests from outside the container
2025-03-07 23:14:56 +01:00
Panagiotis Papadopoulos
f544a84f6d build(Docker): simplify Docker alpine build and runtime stage
same changes as for the "non-alpine" Dockerfile previously commited, but adapted to Alpine.

this Dockerfile is aimed at production builds, i.e. trying to keep size as small as possible at the cost of "rebuild speed", due to missed docker cache opportunities.

Build Stage:
* do the complete build inside docker as oposed to the previous "hybrid", where tsc was run locally and the output got copied into the Docker build stage → you can now build this with Docker, without having to install the whole node/TS env locally

* build into a "build" subfolder, for easier clean up during build stage

* get rid of now unnecessary extra file/asset handling, as this is now handled by `npm run build:prepare-dist`

* no `npm prune` needed here, as we delete the whole build folder anyways in the last build step

Runtime stage:
* move the "electron" dep removal from the builder stage to the runtime stage, before installing the dependencies

* move to `npm ci` for reproducible installations – but only installing runtime deps here

* get rid of now unnecessary copying commands from the builder stage, as everything is now neatly available in "/usr/src/app"
2025-03-07 23:14:56 +01:00
Panagiotis Papadopoulos
68875683af build(Docker): get rid of apparently unused packages at build stage 2025-03-07 23:14:56 +01:00
Panagiotis Papadopoulos
e9824c4568 build(dockerignore): ignore unnecessary files 2025-03-07 23:14:56 +01:00
Panagiotis Papadopoulos
c68b0b02e4 build(Docker): simplify Docker build and runtime stage
this Dockerfile is aimed at production builds, i.e. trying to keep size as small as possible at the cost of "rebuild speed", due to missed docker cache opportunities.

Build Stage:
* do the complete build inside docker as oposed to the previous "hybrid", where tsc was run locally and the output got copied into the Docker build stage → you can now build this with Docker, without having to install the whole node/TS env locally

* build into a "build" subfolder, for easier clean up during build stage

* get rid of now unnecessary extra file/asset handling, as this is now handled by `npm run build:prepare-dist`

* no `npm prune` needed here, as we delete the whole build folder anyways in the last build step

Runtime stage:
* move the "electron" dep removal from the builder stage to the runtime stage, before installing the dependencies

* move to `npm ci` for reproducible installations – but only installing runtime deps here

* get rid of now unnecessary copying commands from the builder stage, as everything is now neatly available in "/usr/src/app"
2025-03-07 23:14:56 +01:00
Panagiotis Papadopoulos
2973d38db0 build(Docker): move server-package.json preparation into Dockerfile 2025-03-07 23:14:56 +01:00
Panagiotis Papadopoulos
bb7a4f9bc3 build(Docker): comment out seemingly useless installation of build dependencies 2025-03-07 23:14:56 +01:00
Panagiotis Papadopoulos
e389592017 build(copy-dist): copying build folder is not required anymore
TS and Webpack build into the dist folder directly now
2025-03-07 23:14:56 +01:00
Panagiotis Papadopoulos
5e289ea12d build: get rid of intermediary "build" folder -> use "dist" directly 2025-03-07 23:14:56 +01:00
Panagiotis Papadopoulos
3032156b45 build(copy-dist): execute code in try/catch -> get rid of function
since we don't export this anywhere, might as well just call the steps directly
2025-03-07 23:14:56 +01:00
Panagiotis Papadopoulos
d75cf8c11e build(copy-dist): consolidate nodeModules copying into a single loop 2025-03-07 23:14:56 +01:00
Panagiotis Papadopoulos
a816abb372 build(copy-dist): use sync copying
since this is a "standalone" script we are running and no other JS scritps are running "in the background", there's no real benefit for async here.
2025-03-07 23:14:56 +01:00
Panagiotis Papadopoulos
37f1525d0e build(copy-dist): remove unused paths 2025-03-07 23:14:56 +01:00
Panagiotis Papadopoulos
dbeae62709 build(copy-dist): simplify "copyNodeModuleFileOrFolder" copying
there's no benefit from stripping "node_modules/" from the string, to later add it again using the `DEST_DIR_NODE_MODULES` constant

=> just copy directly into the `DEST_DIR` folder and preserver the `node_modules` part in the path
2025-03-07 23:14:56 +01:00
Panagiotis Papadopoulos
ac3e96291a build(copy-dist): simplify "build" copying
there's no need to read the folder structure and then copy each single file in a loop

=> just copy the whole folder and be done with it :-)
2025-03-07 23:14:56 +01:00
Panagiotis Papadopoulos
9ac451e2b2 build(copy-dist): consolidate files and folder copying into one asset copying job
there's no benefit in having them split up like before
2025-03-07 23:14:56 +01:00
Panagiotis Papadopoulos
dbc2df0820 build(copy-dist): consolidate folder copying
the "srcDirsToCopy" block is useless now, we can just use the previous dirsToCopy to achieve the exact same thing
2025-03-07 23:14:56 +01:00
Panagiotis Papadopoulos
24382d8176 build(copy-dist): avoid copying over the app dir into dist
we have the bundled "app-dist" already in the "dist", copying over the original unbundled "app" folder serves no benefit here
2025-03-07 23:14:56 +01:00
Panagiotis Papadopoulos
af5e4ee3b5 build(copy-dist): copy over required folders/files from "public" folder 2025-03-07 23:14:56 +01:00
Panagiotis Papadopoulos
135101f57b build(copy-dist): do not copy build folder into src folder
stop the build folder from being copied into the dist/src subfolder
→ there is no sense in doing that
→ the contents of the build folder are corretly copied previously already (see line 26ff)
2025-03-07 23:14:56 +01:00
Panagiotis Papadopoulos
60a2b56636 chore(copy-dist): removee unnecesary copy of tsconfig.webpack.json
webpack bundling already ran before this script, so there is no need to copy this file over
2025-03-07 23:14:56 +01:00
Panagiotis Papadopoulos
e483cbca3c build(tsconfig): remove unnecessary exclude lines
these folder are already "excluded" implicitly, since we only include "./src" folder
2025-03-07 23:14:56 +01:00
Panagiotis Papadopoulos
3e307f4711 build(scripts): add "build:clean" script for removing dist and build folders 2025-03-07 23:14:56 +01:00
Panagiotis Papadopoulos
6c4a1732ad build(copy-trilium): use npm run build:ts 2025-03-07 23:14:56 +01:00
Panagiotis Papadopoulos
d0bb5f9768 build(scripts): add webpack progress flag 2025-03-07 23:14:56 +01:00
Panagiotis Papadopoulos
3a87d71073 build(scripts): add build:ts and update build:prepare-dist
since we build into the build folder -> we should also clean the folder before building as well

also it makes sense to run tsc first, as it runs faster, so if there's any TS errors, we will have a faster failing build
2025-03-07 23:14:56 +01:00
Panagiotis Papadopoulos
e0c0086eb3 build(tsconfig): fix glob for build config
not sure why, but seems like it doesn't like `[jt]s` – which causes it to skip certain .d.ts files, making tsc fail
2025-03-07 23:14:56 +01:00
Panagiotis Papadopoulos
2be9389f3b build(webpack): change to nosources-source-map
as per https://webpack.js.org/configuration/devtool/#production

serving the `source-map` file to "normal" users seems to be not recommended, so instead let's go with `nosources-source-map`:

a) this drastically reduces app-dist folder size from 20MB down to 8.7MB
b) it still allows for stack traces
2025-03-07 23:14:56 +01:00
Panagiotis Papadopoulos
745b294ca1 build(webpack): output webpack build in build folder
output the bundled files directly in the build folder
a) keeps the src folder clean from build output
b) it saves us some "manual" copying work
2025-03-07 23:14:56 +01:00
Panagiotis Papadopoulos
cefc402263 build: add separate tsconfig.build.json
this prevents tsc from unnecessarily transpiling the frontend part as well:
previously it was transpiled by tsc, but the files got discarded and replaced by the files built by webpack.

speeds up tsc command a bit as well:
from 14 seconds to ~8 secs
2025-03-07 23:14:56 +01:00
Elian Doran
a6e7f98f69 chore(release): 0.92.3-beta 2025-03-07 23:59:10 +02:00
Elian Doran
e76601cd21 fix(bin): empty package.json 2025-03-07 23:58:41 +02:00
Elian Doran
e252b491ba chore(bin): make less error-tolerant 2025-03-07 23:57:31 +02:00
Elian Doran
555dcc956e chore(release): 0.92.3-beta 2025-03-07 23:55:26 +02:00
Panagiotis Papadopoulos
2c91f6e7bc refactor(errors): add HttpError class and extend existing errors from it 2025-03-07 22:47:03 +01:00
Panagiotis Papadopoulos
39d45dc11b refactor(error_handlers): use existing NotFoundError class
also gets rid of "any" type :-)
2025-03-07 22:31:55 +01:00
Panagiotis Papadopoulos
d8ce385134 refactor(routes): refactor handleException and get rid of "any" type 2025-03-07 22:27:13 +01:00
Panagiotis Papadopoulos
ba5152de40 refactor(errors): extend errors from Error and add/assign statusCode
this is in preparation for updating the routes/handleException method, to get rid of "any" (and improve in general)
2025-03-07 22:22:44 +01:00
Elian Doran
3958312651 fix(e2e): flaky test due to navigation 2025-03-07 20:34:08 +02:00
Elian Doran
eb19e31fc3 fix(e2e): tests failing when run locally 2025-03-07 20:34:01 +02:00
Elian Doran
9d05fedc69 Merge pull request #1355 from TriliumNext/renovate/npm-axios-vulnerability
fix(deps): update dependency axios to v1.8.2 [security]
2025-03-07 20:25:21 +02:00
Elian Doran
cbd6278a0b Merge pull request #1348 from TriliumNext/renovate/electron-34.x
chore(deps): update dependency electron to v34.3.1
2025-03-07 20:14:30 +02:00
Elian Doran
f6b52f5ce9 Merge pull request #1349 from TriliumNext/renovate/vitest-monorepo
chore(deps): update vitest monorepo to v3.0.8
2025-03-07 20:14:17 +02:00
renovate[bot]
efc57e383c fix(deps): update dependency axios to v1.8.2 [security] 2025-03-07 18:13:51 +00:00
Elian Doran
40d6a28751 Merge pull request #1350 from TriliumNext/renovate/force-graph-1.x
fix(deps): update dependency force-graph to v1.49.3
2025-03-07 20:13:43 +02:00
Elian Doran
73791211c5 Merge pull request #1351 from TriliumNext/renovate/playwright-monorepo
chore(deps): update dependency @playwright/test to v1.51.0
2025-03-07 20:13:18 +02:00
Elian Doran
b0f86af57e Merge branch 'develop' into renovate/playwright-monorepo 2025-03-07 20:13:10 +02:00
Elian Doran
4c6556cf18 Merge pull request #1352 from TriliumNext/renovate/happy-dom-monorepo
chore(deps): update dependency happy-dom to v17.3.0
2025-03-07 20:12:57 +02:00
Elian Doran
3465bc3f1a Merge branch 'develop' into renovate/happy-dom-monorepo 2025-03-07 19:44:26 +02:00
Elian Doran
c1c9bf9122 Merge branch 'develop' into renovate/playwright-monorepo 2025-03-07 19:44:24 +02:00
Elian Doran
02b50703b2 Merge branch 'develop' into renovate/force-graph-1.x 2025-03-07 19:44:19 +02:00
Elian Doran
ab104af9ac Merge branch 'develop' into renovate/vitest-monorepo 2025-03-07 19:44:16 +02:00
Elian Doran
178a58375a Merge branch 'develop' into renovate/electron-34.x 2025-03-07 19:43:42 +02:00
Elian Doran
313d418345 fix(test): rollback database version 2025-03-07 10:23:02 +02:00
renovate[bot]
633369b5bd chore(deps): update dependency happy-dom to v17.3.0 2025-03-07 01:27:34 +00:00
renovate[bot]
06d5abded4 chore(deps): update dependency @playwright/test to v1.51.0 2025-03-07 01:27:24 +00:00
renovate[bot]
41368db8b6 fix(deps): update dependency force-graph to v1.49.3 2025-03-07 01:27:12 +00:00
renovate[bot]
4ff3b87f23 chore(deps): update vitest monorepo to v3.0.8 2025-03-07 01:27:02 +00:00
renovate[bot]
a40dc2047b chore(deps): update dependency electron to v34.3.1 2025-03-07 01:26:47 +00:00
Panagiotis Papadopoulos
04f3b637f9 chore(lint): fix no-explicit-any in export.ts 2025-03-06 23:32:05 +01:00
Panagiotis Papadopoulos
7feb38ffa1 chore(lint): fix no-unused-vars errors 2025-03-06 23:21:47 +01:00
Panagiotis Papadopoulos
c8e36942fc chore(lint): get rid of "any" in attachments
req.file is of type "Express.Multer.File | undefined".
Returning with an "uploaded: false" type object -> same handling as in
image.ts
2025-03-06 23:09:24 +01:00
Elian Doran
00e576b052 Revert "Merge pull request #1234 from TriliumNext/feature/task_list"
This reverts commit 58a8821c22, reversing
changes made to 50d491b432.
2025-03-06 23:52:01 +02:00
Elian Doran
ee7b97ae56 revert(db): back to 228 (no tasks) 2025-03-06 23:45:06 +02:00
Panagiotis Papadopoulos
dfb8982a99 chore(lint): improve type and get rid of "any" 2025-03-06 22:44:54 +01:00
Elian Doran
89767d0135 feat(client): allow triggering search on hash change 2025-03-06 22:21:50 +02:00
Elian Doran
79cc1cbf17 fix(link): search from URL not working (closes #1335) 2025-03-06 22:17:14 +02:00
Elian Doran
1ba6104e36 feat(vscode): set XML formatter 2025-03-06 21:19:35 +02:00
Elian Doran
f209e4f14d feat(vscode): add vitest integration 2025-03-06 21:19:28 +02:00
Elian Doran
a162fbfe42 fix(mermaid): <br> breaking diagram rendering (closes #1345) 2025-03-06 21:18:36 +02:00
Elian Doran
e795caa2f3 fix(note_language): no separator when no languages 2025-03-06 20:50:58 +02:00
Elian Doran
ddd0c3a878 Merge pull request #1319 from TriliumNext/feature/rtl
Right-to-left support
2025-03-06 18:12:44 +02:00
Elian Doran
7c5430ba49 Merge pull request #1341 from TriliumNext/renovate/node-22.x
chore(deps): update dependency @types/node to v22.13.9
2025-03-06 08:22:03 +02:00
Elian Doran
c155702d91 Merge pull request #1342 from TriliumNext/renovate/ws-8.x
chore(deps): update dependency @types/ws to v8.18.0
2025-03-06 08:21:37 +02:00
renovate[bot]
ab578f9379 chore(deps): update dependency @types/ws to v8.18.0 2025-03-06 02:50:55 +00:00
renovate[bot]
ebaa909488 chore(deps): update dependency @types/node to v22.13.9 2025-03-06 02:50:47 +00:00
Adorian Doran
c463106ccc style(next): tweak modals 2025-03-06 03:02:41 +02:00
Adorian Doran
283d192fe8 style(next)/jump to note: fix modal footer background 2025-03-06 02:30:32 +02:00
Adorian Doran
fbba1021cc style(next): restyle modals 2025-03-06 02:28:19 +02:00
Elian Doran
a3a34cfab0 fix(rtl): wrong content when switching to an empty note 2025-03-05 23:06:18 +02:00
Elian Doran
77d6cdc546 fix(note_language): double separator when only RTL languages 2025-03-05 23:00:48 +02:00
Elian Doran
deb5d82c02 fix(test): broken after adding content-only languages 2025-03-05 22:18:24 +02:00
Elian Doran
ca757b20d5 fix(note_language): duplicate separators if no language selected 2025-03-05 22:16:31 +02:00
Elian Doran
15075c8626 fix(build): tests failing due to cyclic dependencies 2025-03-05 22:11:03 +02:00
Elian Doran
07dbacb61f fix(build): incorrect import 2025-03-05 22:05:12 +02:00
Elian Doran
1976fe6729 Merge remote-tracking branch 'origin/develop' into feature/rtl
; Conflicts:
;	src/public/app/widgets/floating_buttons/help_button.ts
2025-03-05 21:57:53 +02:00
Elian Doran
c99c4a4302 Revert "feat(rtl): add language switcher toolbar"
This reverts commit e930ae5f40.
2025-03-05 21:57:08 +02:00
Elian Doran
8d60429b9c style(note_language): size and positioning of the help button 2025-03-05 21:51:08 +02:00
Elian Doran
84c480c4c6 feat(in-app-help): remove "contextual-help" suffix 2025-03-05 21:44:40 +02:00
Elian Doran
01f9ddaea7 fix(in-app-help): unnecessary bottom padding 2025-03-05 21:39:26 +02:00
Elian Doran
07b1f69f7a fix(in-app-help): fix image max width 2025-03-05 21:38:56 +02:00
Elian Doran
dd28ce9e5d feat(note_language): add in-app help 2025-03-05 21:38:41 +02:00
Elian Doran
e514396c42 feat(docs): prepare documentation for RTL text support 2025-03-05 21:27:53 +02:00
Adorian Doran
f2d1726852 style(next)/tab bar: do not use a distinct visual state for tabs being dragged in horizontal toolbar layout 2025-03-05 21:15:35 +02:00
Adorian Doran
6b9311f9ef style(next)/toolbar: rollback the sync status icon animation 2025-03-05 21:03:23 +02:00
Elian Doran
9ced699751 feat(rtl): reposition buttons for read-only language change 2025-03-05 19:23:04 +02:00
Elian Doran
c217d1c037 chore(i18n: rename localization setting 2025-03-05 19:20:34 +02:00
Panagiotis Papadopoulos
0f0e55deb2 chore(lint): fix lint issues in src/routes 2025-03-05 18:09:44 +01:00
Elian Doran
a9938cbf7d feat(options/language): improve description & add translations 2025-03-05 18:54:59 +02:00
Elian Doran
3d600c885a feat(note_language): refresh rtl for read-only notes 2025-03-05 17:33:46 +02:00
Elian Doran
24c2b54bc9 feat(note_language): reload list of languages when changed 2025-03-05 17:23:22 +02:00
Elian Doran
8e2517459f feat(rtl): align floating buttons properly 2025-03-05 17:12:14 +02:00
Elian Doran
25c9f52cf4 feat(note_language): add a button to configure the language 2025-03-05 16:44:36 +02:00
Elian Doran
4a75f9f48b feat(rtl): adjust padding for read-only text 2025-03-05 14:39:26 +02:00
Elian Doran
51813099b3 feat(note_language): reinitialize editor when switching between RTL and LTR notes 2025-03-05 14:35:05 +02:00
Elian Doran
93e2515190 Merge pull request #1332 from TriliumNext/port_dialogs
port dialogs
2025-03-05 14:21:02 +02:00
JYC333
883a67bcfe Merge branch 'develop' into port_dialogs 2025-03-05 13:09:00 +01:00
Elian Doran
17e3bd9f6d Merge pull request #1339 from TriliumNext/build_server-build-dump-db
build(build-server): stop copying dump-db during build
2025-03-05 13:48:13 +02:00
Jin
d4fe8cf4b9 refactor: 💡 add event data and remove redundant code 2025-03-05 12:44:36 +01:00
Elian Doran
4c0ecc4df9 Merge pull request #1315 from TriliumNext/chore_add-eslint
chore: add eslint as linter
2025-03-05 12:55:48 +02:00
Elian Doran
2b0cb8225f Merge branch 'develop' into build_server-build-dump-db 2025-03-05 12:55:14 +02:00
Elian Doran
3d7798859f Merge pull request #1338 from TriliumNext/chore_move-deps-to-dev
chore(deps): move deps to devDeps
2025-03-05 12:54:59 +02:00
Panagiotis Papadopoulos
f8c8b9eb3f build(build-server): stop copying dump-db during build 2025-03-05 09:28:41 +01:00
Panagiotis Papadopoulos
33eb8fe820 chore(deps): move deps to devDeps
* happy-dom → only needed for tests
* knockout → this is now bundled by webpack during build stage
* ts-loader → only needed during build stage
2025-03-05 09:24:20 +01:00
Panagiotis Papadopoulos
d8ea415b84 Merge branch 'develop' into chore_add-eslint 2025-03-05 09:16:02 +01:00
Elian Doran
7bcbf29f21 fix(canvas): unable to copy-paste 2025-03-05 09:27:20 +02:00
Elian Doran
ea3364ab09 feat(note_language): support RTL in read-only text 2025-03-04 23:13:23 +02:00
Elian Doran
115c3bbeb0 chore(client/ts): port read_only_text 2025-03-04 22:59:46 +02:00
Elian Doran
f150ec15bc refactor(client): move finding by locale in service 2025-03-04 22:45:38 +02:00
Elian Doran
d582fdea02 feat(settings/i18n): filter only display languages 2025-03-04 22:19:37 +02:00
Elian Doran
775fd3f22b feat(note_language): filter by enabled languages 2025-03-04 21:56:21 +02:00
Elian Doran
9f6b97cdfa feat(note_language): display checkbox to the right 2025-03-04 21:31:19 +02:00
Elian Doran
d31ba6f47c feat(note_language): add checkbox 2025-03-04 21:04:50 +02:00
Elian Doran
b150a05a55 feat(note_language): group right-to-left languages 2025-03-04 20:58:32 +02:00
Elian Doran
4c89a2ac27 feat(i18n): sort languages alphabetically 2025-03-04 20:51:22 +02:00
Elian Doran
951f4c4921 feat(note_language): align list of languages to the right 2025-03-04 20:48:36 +02:00
Elian Doran
856410120c feat(note_language): improve layout of list of languages 2025-03-04 20:39:30 +02:00
Elian Doran
427b7fe992 feat(note_language): rebuild editor when language is switched 2025-03-04 20:34:36 +02:00
Elian Doran
c6b3c1bf88 feat(note_language): add right-to-left languages 2025-03-04 20:31:51 +02:00
Elian Doran
42d3334c9d feat(note_language): initialize CKEditor with right language 2025-03-04 19:29:02 +02:00
Elian Doran
3546ac6ded refactor(note_language): remove unnecessary fields 2025-03-04 18:40:26 +02:00
Elian Doran
b81fd69981 fix(note_language): crash if user entered invalid locale 2025-03-04 18:38:07 +02:00
Elian Doran
bb42b5fb19 feat(note_language): allow removing language tag 2025-03-04 18:35:42 +02:00
Elian Doran
598586f735 feat(note_language): update value of combobox 2025-03-04 18:30:43 +02:00
Elian Doran
bccfeed431 feat(note_language): set language attribute for note 2025-03-04 17:54:52 +02:00
Elian Doran
dbea35f9f3 feat(note_language): set a default value for the combo 2025-03-04 17:49:58 +02:00
Elian Doran
acc76f9b74 feat(note_language): add an option for no language set 2025-03-04 17:48:04 +02:00
Elian Doran
5b4d323936 feat(client): display list of languages 2025-03-04 17:43:24 +02:00
Elian Doran
fd652ea7a5 feat(client): hide language for non-text notes 2025-03-04 17:29:37 +02:00
Elian Doran
642b84ce6b feat(client): create an empty language switcher at note level 2025-03-04 17:27:00 +02:00
Elian Doran
c0c85e96ce chore(client/ts): port basic_properties 2025-03-04 17:18:17 +02:00
Panagiotis Papadopoulos
2c7a25b7fc chore(eslint): add rule for unused vars
this is already used across codebase: using "_" as placeholder for deliberately unused vars (e.g. when destructuring arrays)
2025-03-04 12:19:23 +01:00
Panagiotis Papadopoulos
6a5e622637 scripts(linter): remove "--cache" flag
using it is not recommended for ts-eslint:
https://typescript-eslint.io/troubleshooting/faqs/eslint#can-i-use-eslints---cache-with-typescript-eslint
2025-03-04 12:19:23 +01:00
Panagiotis Papadopoulos
b2ac5b6337 chore(eslint): ignore certain folders 2025-03-04 12:19:23 +01:00
Panagiotis Papadopoulos
40144fc171 deps: update typescript-eslint to 8.26.0 2025-03-04 12:19:23 +01:00
Panagiotis Papadopoulos
1e599af480 chore(eslint): disable 'no-undef' rule
For TS projects this is already enforced by tsc, see:
https://eslint.org/docs/latest/rules/no-undef#handled_by_typescript
2025-03-04 12:19:23 +01:00
Panagiotis Papadopoulos
744a0b8042 chore: ignore build related folder in eslint config 2025-03-04 12:19:23 +01:00
Panagiotis Papadopoulos
0d66f9d4eb chore(scripts): add dev:linter-check and dev:linter-fix
purposely *not* named as dev:eslint, just to "decouple" the script from eslint, in case there ever is the need to change that :-)
2025-03-04 12:19:23 +01:00
Panagiotis Papadopoulos
aed835b6c2 chore: add initial eslint configuration
rules will need some finetuning still
2025-03-04 12:19:23 +01:00
Adorian Doran
ce2961ebd6 style(next)/toolbar: animate the sync status icon 2025-03-04 11:55:37 +02:00
Adorian Doran
b03c75c09b style(next): fix note menu artifacts in split view 2025-03-04 11:19:33 +02:00
Adorian Doran
77c4b50215 style(next)/SQL Console: tweak appearance 2025-03-04 11:14:10 +02:00
Elian Doran
901d2d72ae feat(print): improve code block style 2025-03-04 09:29:53 +02:00
Adorian Doran
6555add2aa client/options/other: tweak the "HTML Import Tags" section 2025-03-04 01:48:09 +02:00
Jin
c4d2c2b8de refactor: 💡 remove redundant code 2025-03-04 00:42:31 +01:00
Jin
f1ecab84d9 refactor: 💡 remove unused code 2025-03-04 00:35:29 +01:00
Jin
f1f55fd4f8 fix: 🐛 fix add external link
fix can't add external link from add link dialog
2025-03-04 00:33:09 +01:00
Adorian Doran
a97c8087a1 style(next)/shell: correct border offset, add entrance animation for notes 2025-03-04 01:31:36 +02:00
Adorian Doran
ee40bb3b33 style(next)/ribbon/note info: improve the layout on constrained width 2025-03-04 00:55:24 +02:00
Jin
5543650166 chore: 🤖 (ts) port add_link dialog 2025-03-03 23:54:09 +01:00
Adorian Doran
dcea67fa9d Merge branch 'develop' of https://github.com/TriliumNext/Notes into develop 2025-03-04 00:12:15 +02:00
Adorian Doran
3d2801096f style(next): add a border to separate note splits 2025-03-04 00:12:02 +02:00
Elian Doran
c41fbe8e45 fix(client): build error due to null 2025-03-03 23:40:32 +02:00
Elian Doran
3855f0e75f Revert "port tab manager to ts"
This reverts commit 45a50f3aa1.
2025-03-03 23:34:54 +02:00
Adorian Doran
3f641c98fb Merge branch 'develop' of https://github.com/TriliumNext/Notes into develop 2025-03-03 23:08:25 +02:00
Adorian Doran
9ca43aceed style(next)/search in note: tweak the border line 2025-03-03 23:08:16 +02:00
Jin
0e81f086c0 chore: 🤖 (ts) port about dialog 2025-03-03 22:06:04 +01:00
Elian Doran
5289f94553 Merge pull request #1320 from TriliumNext/porting_js
chore: port more js to ts
2025-03-03 23:04:14 +02:00
Adorian Doran
d779cc1854 Merge branch 'develop' of https://github.com/TriliumNext/Notes into develop 2025-03-03 22:49:16 +02:00
Adorian Doran
3b16ad508e style(next)/search in note: gracefully handle narrow widths 2025-03-03 22:47:32 +02:00
Elian Doran
cf554fc4af Merge branch 'develop' into porting_js 2025-03-03 22:46:10 +02:00
Jin
1b76442367 chore: 🤖 fix webpack build error 2025-03-03 21:03:45 +01:00
Elian Doran
2213c500c2 fix(client): allow overriding position using getter (closes #1321) 2025-03-03 21:03:45 +01:00
Elian Doran
3c290c9fc5 fix(client): allow overriding position using getter (closes #1321) 2025-03-03 21:20:42 +02:00
Elian Doran
8e66dc300f Merge branch 'develop' into porting_js 2025-03-03 20:30:15 +02:00
Elian Doran
ef9eebc030 Merge pull request #1283 from TriliumNext/chore_prettier
chore: fix prettier code style issues
2025-03-03 20:28:33 +02:00
Elian Doran
65a51153b3 Merge remote-tracking branch 'origin/develop' into chore_prettier 2025-03-03 20:21:47 +02:00
Elian Doran
741a4af570 fix(build): an argument was not provided 2025-03-03 20:00:52 +02:00
Elian Doran
2a4d3b71f2 Merge pull request #1324 from TriliumNext/renovate/prettier-3.x
chore(deps): update dependency prettier to v3.5.3
2025-03-03 19:57:33 +02:00
JYC333
0d5bef422a Merge branch 'develop' into renovate/prettier-3.x 2025-03-03 18:30:58 +01:00
Adorian Doran
605d99a7e8 style(next): horizontal toolbar layout tweaks 2025-03-03 18:17:13 +02:00
Elian Doran
e930ae5f40 feat(rtl): add language switcher toolbar 2025-03-03 18:12:15 +02:00
Adorian Doran
4d6e115208 style(next)/attribute detail dialog: tweak input labels 2025-03-03 18:04:21 +02:00
Adorian Doran
495a394d79 style(next)/search in note: remove the italic font style from the match counters 2025-03-03 17:50:59 +02:00
Adorian Doran
e55708f79f client/settings/appearance: fix restart application button style 2025-03-03 16:04:23 +02:00
Adorian Doran
c7e9963db1 client/setup dialog: add a margin after the password field 2025-03-03 16:00:03 +02:00
Jin
ad711ff00c chore: 🤖 clean up debug code 2025-03-03 11:29:37 +01:00
renovate[bot]
125eef234b chore(deps): update dependency prettier to v3.5.3 2025-03-03 02:26:21 +00:00
Jin
45a50f3aa1 port tab manager to ts 2025-03-03 01:04:42 +01:00
Jin
8e0b9d17a4 port split note container to ts 2025-03-02 21:52:48 +01:00
Elian Doran
b99ead6a84 feat(setings): add option section for settings 2025-03-02 22:23:47 +02:00
Elian Doran
e7d2be4663 feat(options/language): store list of languages 2025-03-02 21:58:40 +02:00
Panagiotis Papadopoulos
2efc1a0e2e chore(prettier): ignore public/app/doc_notes 2025-03-02 20:48:07 +01:00
Panagiotis Papadopoulos
2beaaa95bf chore(prettier): fix code style 2025-03-02 20:47:57 +01:00
Elian Doran
bc787213f4 feat(options/language): display list of languages 2025-03-02 21:47:53 +02:00
Elian Doran
73daec6644 feat(settings): create a language settings section 2025-03-02 21:24:31 +02:00
Elian Doran
43d8affcc8 feat(i18n): translate unknown content widget message 2025-03-02 21:17:04 +02:00
Elian Doran
67509bc92f fix(migration): no such table "tasks" 2025-03-02 20:43:52 +02:00
Elian Doran
1ca485e4b5 fix(migration): using async in transaction 2025-03-02 20:43:01 +02:00
Elian Doran
16ad054d2a refactor(migration): remove async import from migration scripts 2025-03-02 20:28:41 +02:00
Elian Doran
b4310b5275 fix(migration): ESM imports not working on Windows 2025-03-02 20:23:38 +02:00
Elian Doran
f04e747786 fix(migration): TypeScript migrations not run 2025-03-02 19:59:50 +02:00
Elian Doran
a80c3e32f1 fix(migration): JavaScript-based migrations not working 2025-03-02 19:39:06 +02:00
Elian Doran
01ff3d396d chore(test): add database testing migration 2025-03-02 17:11:07 +02:00
Elian Doran
49a22bce80 Merge pull request #1316 from TriliumNext/renovate/force-graph-1.x
fix(deps): update dependency force-graph to v1.49.2
2025-03-02 11:43:36 +02:00
renovate[bot]
436788cf96 fix(deps): update dependency force-graph to v1.49.2 2025-03-02 02:33:14 +00:00
Elian Doran
c8a7f893e1 Merge pull request #1312 from TriliumNext/renovate/node-22.x
chore(deps): update dependency @types/node to v22.13.8
2025-03-01 10:18:47 +02:00
Elian Doran
17884558ad fix(server): build errors after newer types 2025-03-01 10:16:24 +02:00
Elian Doran
8e4530293d Merge pull request #1314 from hasecilu/i18n/Spanish
chore(i18n): update Spanish translation
2025-03-01 10:07:11 +02:00
Elian Doran
072b5b2035 Merge pull request #1313 from TriliumNext/renovate/typescript-5.x
chore(deps): update dependency typescript to v5.8.2
2025-03-01 10:06:30 +02:00
renovate[bot]
455b2bf338 chore(deps): update dependency @types/node to v22.13.8 2025-03-01 08:05:52 +00:00
Elian Doran
9a5c08f117 Merge pull request #1304 from TriliumNext/chore_ts-port_read_only_code
chore(ts): start porting read_only_code
2025-03-01 10:05:11 +02:00
hasecilu
038e3a15cd chore(i18n): update Spanish translation 2025-02-28 22:44:48 -06:00
renovate[bot]
6c67c9a41f chore(deps): update dependency typescript to v5.8.2 2025-03-01 01:31:56 +00:00
Panagiotis Papadopoulos
d6b164413e chore(ts): port read_only_code 2025-02-28 23:19:42 +01:00
Elian Doran
259ce440c5 fix(build): type error due to test 2025-02-28 22:02:41 +02:00
Elian Doran
2a75819734 chore(docs): start writing entrypoint for editing docs 2025-02-28 22:02:29 +02:00
Elian Doran
4211e4e11c chore(deps): npm audit fix 2025-02-28 21:24:26 +02:00
Elian Doran
f76f679800 feat(calendar): allow relations in promoted attributes 2025-02-28 20:46:41 +02:00
Elian Doran
e7d06fceba test(calendar): labels as promoted attributes 2025-02-28 20:34:30 +02:00
Elian Doran
a8b119e4df test(calendar): relation as custom title with attribute relation 2025-02-28 20:13:37 +02:00
Elian Doran
f953f6514f test(calendar): relation as custom title with attribute label 2025-02-28 20:11:45 +02:00
Elian Doran
ca7cff45c9 test(calendar): relation as custom title 2025-02-28 19:55:02 +02:00
Elian Doran
6f2a0f9ee1 refactor(types): better type definitions 2025-02-28 19:44:32 +02:00
Elian Doran
5b9bfac1f8 test(calendar): custom label as title 2025-02-28 19:36:50 +02:00
Elian Doran
f674ba0d4a test(calendar): custom start/end date 2025-02-28 19:32:32 +02:00
Elian Doran
5731cb9b4d test(calendar): start date & end date 2025-02-28 19:23:45 +02:00
Elian Doran
d83b2a6a38 refactor(test): dedicated helper for froca 2025-02-28 19:18:37 +02:00
Elian Doran
ad18916973 refactor(test): dedicated folder for test support 2025-02-28 19:13:33 +02:00
Elian Doran
2531e5617f refactor(test): remove need for async import 2025-02-28 19:12:19 +02:00
Elian Doran
f646e0f724 refactor(test): global initialisation 2025-02-28 19:11:12 +02:00
Elian Doran
7a34a2f59c Merge branch 'develop' of ssh://github.com/TriliumNext/Notes into develop 2025-02-28 19:03:50 +02:00
Elian Doran
85882d843b chore(test): basic test harness for calendar view event testing 2025-02-28 19:03:08 +02:00
Elian Doran
f60667b618 Merge pull request #1306 from clsty/develop
Translation: Fix, improve and finish for zh-CN
2025-02-28 18:56:19 +02:00
clsty
c8c7680a10 Fix missing translation on zh-CN translation 2025-03-01 00:13:25 +08:00
Elian Doran
6df588da22 chore(client/ts): port backend_log 2025-02-28 17:59:38 +02:00
Elian Doran
423037b9d6 chore(client/ts): port search_options 2025-02-28 17:58:51 +02:00
Elian Doran
2c714afa21 chore(client/ts): port floating buttons 2025-02-28 17:55:47 +02:00
Elian Doran
83d25964c7 Merge pull request #1307 from TriliumNext/porting_js
porting js
2025-02-28 17:49:35 +02:00
Elian Doran
e58a61051b Merge pull request #1302 from TriliumNext/build_webpack-i18n-dayjs-splitjs
build: let webpack handle `dayjs`, `split.js` and `i18next`
2025-02-28 17:44:33 +02:00
clsty
77c0bfe93b Minor improves on zh-CN translation 2025-02-28 23:23:29 +08:00
clsty
9826256e29 Fix indent 2025-02-28 23:03:59 +08:00
Jin
a3d9b04d96 port history navigation, remove redundance 2025-02-28 15:45:26 +01:00
Jin
c67445f511 optimize month selector behavior 2025-02-28 15:09:28 +01:00
Jin
a99c86ea9f port calender to ts 2025-02-28 15:09:01 +01:00
clsty
23553692ac Update zh-CN translation. 2025-02-28 19:30:14 +08:00
Panagiotis Papadopoulos
1450e57a6a chore(deps): move "i18next-http-backend" to devDependencies
since it is not used in server side code and it is bundled by webpack, it is only needed during build stage -> devDependency
on server-side we use i18next and i18next-fs-backend -> so these need to stay in dependencies
2025-02-28 08:35:57 +01:00
Panagiotis Papadopoulos
d3283746fc fix(type_widgets/doc): import i18next
since we don't export the full i18n object (not sure why?),
I had to add an additional export "getCurrentLanguage"

-> needs to be a function, because otherwise it will be a static value (being set to undefined),
which is *not* what we want
2025-02-28 08:30:35 +01:00
Panagiotis Papadopoulos
f3148bf478 build: let webpack bundle i18next 2025-02-28 08:26:48 +01:00
Panagiotis Papadopoulos
b60f22c6b9 chore(deps): move "split.js" to devDependencies
since it is not used in server side code and it is bundled by webpack, it is only needed during build stage -> devDependency
2025-02-28 08:09:36 +01:00
Panagiotis Papadopoulos
559517ace1 build: let webpack bundle split.js 2025-02-27 23:00:44 +01:00
Panagiotis Papadopoulos
49a2eb0ccf build: let webpack bundle dayjs 2025-02-27 22:44:18 +01:00
Elian Doran
06a439e95d feat(options/apperance): hide layout orientation section 2025-02-27 19:31:36 +02:00
Elian Doran
a615b473a7 Merge pull request #1297 from TriliumNext/renovate/force-graph-1.x
fix(deps): update dependency force-graph to v1.49.1
2025-02-27 19:17:05 +02:00
Elian Doran
1a9c28f9bd Merge pull request #1298 from TriliumNext/renovate/electron-34.x
chore(deps): update dependency electron to v34.3.0
2025-02-27 19:16:29 +02:00
Elian Doran
93d5b20362 Merge pull request #1299 from TriliumNext/renovate/axios-1.x
fix(deps): update dependency axios to v1.8.1
2025-02-27 19:14:51 +02:00
Elian Doran
6501b95eac Merge pull request #1300 from TriliumNext/renovate/mind-elixir-4.x
fix(deps): update dependency mind-elixir to v4.4.1
2025-02-27 19:14:08 +02:00
renovate[bot]
b0fa70870c fix(deps): update dependency mind-elixir to v4.4.1 2025-02-27 02:27:48 +00:00
renovate[bot]
74fc5562b2 fix(deps): update dependency axios to v1.8.1 2025-02-27 02:27:39 +00:00
renovate[bot]
c033ad261c chore(deps): update dependency electron to v34.3.0 2025-02-27 02:27:30 +00:00
renovate[bot]
fe7f2e43be fix(deps): update dependency force-graph to v1.49.1 2025-02-27 02:27:17 +00:00
Elian Doran
5435b3c8fd feat(calendar): allow customisable start & end dates 2025-02-27 00:02:58 +02:00
Elian Doran
7d5b0f825c Merge pull request #1295 from TriliumNext/feat_add-link-to-swagger-ui
feat(options/etapi): improve etapi options page description
2025-02-26 23:42:38 +02:00
Elian Doran
fd66da95f3 fix(options/etapi): comments being visible to the user 2025-02-26 23:42:03 +02:00
Elian Doran
8e5762b125 chore(i18n/ro): translate new messages 2025-02-26 23:09:39 +02:00
Elian Doran
bee1df4fdf feat(options/etapi): open swagger UI in in-app-help 2025-02-26 23:06:35 +02:00
Elian Doran
4df76fafe1 Merge branch 'develop' into feat_add-link-to-swagger-ui 2025-02-26 22:46:31 +02:00
Elian Doran
3d36d6d121 Merge pull request #1276 from TriliumNext/renovate/apple-actions-import-codesign-certs-3.x
chore(deps): update apple-actions/import-codesign-certs action to v3
2025-02-26 22:46:15 +02:00
Elian Doran
995d963450 Merge pull request #1294 from TriliumNext/fix-macos-artifact-names
Fix MacOS artifact names
2025-02-26 22:45:02 +02:00
Elian Doran
5d61f9fb12 fix(tasks): alignment of checkbox 2025-02-26 22:43:38 +02:00
Elian Doran
09f7645925 feat(tasks): improve layout 2025-02-26 22:43:38 +02:00
Elian Doran
2ea85dc238 feat(tasks): trim task name 2025-02-26 22:43:38 +02:00
Elian Doran
d0c703515b feat(tasks): display due date without time 2025-02-26 22:43:38 +02:00
Elian Doran
d73c9308a9 chore(server/test): adjust includes/excludes 2025-02-26 22:43:38 +02:00
Elian Doran
89eab387ba chore(test): html coverage 2025-02-26 22:43:38 +02:00
Elian Doran
6f9fd76465 fix(share): double request of credentials 2025-02-26 22:43:38 +02:00
Elian Doran
7ea3cb71f3 chore(server/test): password protected share 2025-02-26 22:43:38 +02:00
Elian Doran
fa60295ab2 feat(note_list): improve file footer 2025-02-26 22:43:38 +02:00
Elian Doran
ab5df9e010 feat(note_list): improve video preview 2025-02-26 22:43:38 +02:00
Elian Doran
e330d91df2 feat(file): display videos in full width 2025-02-26 22:43:38 +02:00
Elian Doran
07c2342b7b feat(file): display video in full-width & full-height 2025-02-26 22:43:38 +02:00
Elian Doran
9cc3598095 chore(ci): separate client & server coverage 2025-02-26 22:43:38 +02:00
Panagiotis Papadopoulos
0f1b4614fb chore(options/etapi): add TODO notice to get rid of current workaround 2025-02-26 21:07:56 +01:00
Panagiotis Papadopoulos
f1f5839ea2 feat(options/etapi): link to the swagger UI that we ship
since we are shipping it, why not link to it as well :-)
2025-02-26 21:07:56 +01:00
Panagiotis Papadopoulos
ba84c694b2 i18n(options/etapi): improve translatability of description string
convert the split up string into a single interpolated string,
which improves translatability (and allows LTR translations)
2025-02-26 21:07:56 +01:00
perf3ct
5109f865c7 Fix MacOS artifact names 2025-02-26 20:06:18 +00:00
Elian Doran
47f84fe4b4 Merge pull request #1292 from TriliumNext/bugfix/macos-fix2
Pass the required `APPLE` secrets to the `build-electron` action
2025-02-26 21:01:29 +02:00
perf3ct
1056176624 we have to pass the secret values to the composite github actions 2025-02-26 18:51:14 +00:00
perf3ct
634b57ce5d let's see if we can contain the signing explosion to just build-electron 2025-02-26 18:33:57 +00:00
Elian Doran
6fcd229b52 chore(ci): run unit tests in dev workflow 2025-02-26 18:58:27 +02:00
Elian Doran
bd933dde28 chore(test): disable download of images 2025-02-26 18:58:08 +02:00
Elian Doran
ef736edf09 chore(test): separate client & server tests 2025-02-26 18:39:00 +02:00
Elian Doran
909a74e8ac chore(test): disable regularly scheduled backup 2025-02-26 18:00:53 +02:00
Elian Doran
180c02d647 chore(test): migrate database to new version 2025-02-26 18:00:45 +02:00
Elian Doran
d92959e23a chore(i18n): reach 100% for Romanian 2025-02-26 17:44:25 +02:00
Elian Doran
3c8a42ed73 Merge pull request #1289 from Potjoe-97/FR-tra
Translation : FR update & tweaks
2025-02-26 17:33:27 +02:00
Elian Doran
43b1b8a306 Merge pull request #1286 from TriliumNext/fix_views_appPath_#1285
fix: EJS crash after failed login
2025-02-26 17:32:53 +02:00
Elian Doran
bb8277d035 Merge pull request #1281 from TriliumNext/porting_js
port toc widget button
2025-02-26 17:28:36 +02:00
Potjoe-97
9d188f9ecc Merge pull request #8 from Potjoe-97/patch-2
Translation: Update FR translation.json
2025-02-26 15:52:15 +01:00
Potjoe-97
f04d749440 Update translation.json 2025-02-26 15:47:25 +01:00
Potjoe-97
631a4ed9b2 Update server.json 2025-02-26 15:13:20 +01:00
Panagiotis Papadopoulos
1a0c35f43d refactor(routes/login): use "shorter" syntax for passing to ejs render 2025-02-26 08:50:36 +01:00
Panagiotis Papadopoulos
0aa1d602a1 fix(routes/login): add missing "appPath" to ejs render 2025-02-26 08:45:35 +01:00
Jin
d28dfc2b64 port toc widget button 2025-02-26 00:53:15 +01:00
Elian Doran
8b2788fa8c chore(scripts): fix start-prod environment 2025-02-25 20:44:10 +02:00
Elian Doran
ea04457c06 chore(i18n): refine error message for DB migration 2025-02-25 20:18:23 +02:00
Elian Doran
c935cb65a0 fix(tasks): not being able to mark tasks as done 2025-02-25 20:10:57 +02:00
Elian Doran
e7601f65bb feat(tasks): highlight overdue tasks 2025-02-25 19:55:10 +02:00
Elian Doran
64647df043 feat(tasks): sort by due date 2025-02-25 19:48:26 +02:00
Elian Doran
5838ac3bca feat(tasks): display due date in calendar-relative format 2025-02-25 19:38:15 +02:00
Elian Doran
7bc9114976 feat(tasks): display due date 2025-02-25 19:19:09 +02:00
Elian Doran
637ba78100 feat(tasks): display due date in editable textbox 2025-02-25 18:40:20 +02:00
Elian Doran
fcd7b986aa feat(tasks): make due date editable 2025-02-25 18:36:46 +02:00
Elian Doran
84e8559401 feat(tasks): allow only one editable section at one time 2025-02-25 17:46:17 +02:00
Elian Doran
06831ddc76 feat(tasks): start implementing expandable edit container 2025-02-25 17:43:28 +02:00
Elian Doran
cd78955080 Merge pull request #1270 from TriliumNext/porting_js
port js to ts
2025-02-25 17:21:22 +02:00
Elian Doran
175852f6cb refactor(client): remove unnecessary return type 2025-02-25 17:20:13 +02:00
Elian Doran
4149ebdc69 Merge pull request #1277 from TriliumNext/build_fix-missing-types-webpack
build(webpack): fix missing type declarations
2025-02-25 17:19:29 +02:00
Elian Doran
6d52d7943b Merge pull request #1275 from TriliumNext/renovate/chardet-2.x
fix(deps): update dependency chardet to v2.1.0
2025-02-25 17:18:26 +02:00
Elian Doran
8e4aead110 Merge pull request #1274 from TriliumNext/renovate/vitest-monorepo
chore(deps): update vitest monorepo to v3.0.7
2025-02-25 17:17:51 +02:00
Elian Doran
d434b416f3 Merge pull request #1273 from TriliumNext/renovate/typedoc-0.x
chore(deps): update dependency typedoc to v0.27.9
2025-02-25 17:17:28 +02:00
Elian Doran
ac050bca3b Merge pull request #1272 from TriliumNext/renovate/sass-1.x
chore(deps): update dependency sass to v1.85.1
2025-02-25 17:17:05 +02:00
Panagiotis Papadopoulos
194640db66 build(webpack): fix missing type declarations 2025-02-25 08:58:37 +01:00
renovate[bot]
05975a02fb chore(deps): update apple-actions/import-codesign-certs action to v3 2025-02-25 02:37:14 +00:00
renovate[bot]
7345cddc0a fix(deps): update dependency chardet to v2.1.0 2025-02-25 02:37:10 +00:00
renovate[bot]
a01da98b37 chore(deps): update vitest monorepo to v3.0.7 2025-02-25 02:37:01 +00:00
renovate[bot]
c80ec03126 chore(deps): update dependency typedoc to v0.27.9 2025-02-25 02:36:48 +00:00
renovate[bot]
cd5df24e6a chore(deps): update dependency sass to v1.85.1 2025-02-25 02:36:38 +00:00
Jin
1be92baf4a remove edit_button.js 2025-02-25 02:11:53 +01:00
Jin
16b58a58a3 port js to ts 2025-02-25 02:02:20 +01:00
Elian Doran
34762236d1 fix(build): errors due to missing command 2025-02-24 22:50:16 +02:00
Elian Doran
4240af6c43 Merge pull request #1267 from perfectra1n/develop
Enable MacOS code signing and notarization in GitHub Actions
2025-02-24 22:37:09 +02:00
Elian Doran
d85c670d7b Merge pull request #1268 from TriliumNext/port/client_ts
Port note tree to TypeScript
2025-02-24 21:59:31 +02:00
Elian Doran
23d01ec351 fix(build): type definitions for context menu 2025-02-24 21:35:35 +02:00
Elian Doran
7874e88b4a fix(build): fancytree's JQuery UI interfering with bootstrap 2025-02-24 21:35:23 +02:00
Jon Fuller
9d6caa84cd Merge branch 'develop' into develop 2025-02-24 08:13:59 -08:00
perf3ct
36ce2a3342 add back prettier-ignore comment for pano 2025-02-24 16:12:53 +00:00
Elian Doran
65804f9c2a chore(deps): revert changges to package-lock 2025-02-24 17:46:44 +02:00
Elian Doran
28ed616fa6 feat(search): focus on search string by default 2025-02-24 13:51:02 +02:00
Elian Doran
675a5e96e6 chore(client/ts): port search_string 2025-02-24 13:50:08 +02:00
Elian Doran
8ab0084e10 chore(client/ts): port search_definition 2025-02-24 13:45:36 +02:00
Elian Doran
2ab22e7b0e fix(client): type errors due to command change 2025-02-24 12:39:40 +02:00
Elian Doran
147c340529 Merge remote-tracking branch 'origin/develop' into port/client_ts 2025-02-24 10:14:52 +02:00
Elian Doran
87e687147d Merge remote-tracking branch 'origin/develop' into port/client_ts 2025-02-24 10:10:34 +02:00
perf3ct
b88980ea49 Clean up some of the verbosity 2025-02-24 00:59:08 +00:00
perf3ct
fe93ee90c7 Update Entitlements for MacOS 2025-02-24 00:59:02 +00:00
perf3ct
e9d4356492 Now we'll try the name with a space in it? 2025-02-24 00:44:50 +00:00
perf3ct
226cf8dfd7 Set up Signing and Notarizing for MacOS 2025-02-23 23:36:30 +00:00
Elian Doran
b91b243432 fix(tasks): selection contains spaces 2025-02-23 22:00:50 +02:00
Elian Doran
0ba4c9b9c7 fix(tasks): content flash when updating list of tasks 2025-02-23 21:54:58 +02:00
Elian Doran
31fcf7ea60 feat(tasks): clear text box when entering a task 2025-02-23 21:39:05 +02:00
Elian Doran
24c02e013b fix(import/enex): "Missing or wrong content type for resource" (fixes #943) 2025-02-23 19:58:43 +02:00
Elian Doran
d319eede1f style(views/calendar): disable link underline 2025-02-23 19:23:00 +02:00
Elian Doran
143b91936c Merge pull request #1261 from rom1dep/calendar_enh_attributes
feat(view/calendar): let the user specify attributes to be promoted o…
2025-02-23 19:16:35 +02:00
Elian Doran
95e6919dcf chore(calendar/view): remove unnecessary comment 2025-02-23 19:15:33 +02:00
Elian Doran
07147bf857 fix(view/calendar): add basic support for promoted attributes 2025-02-23 19:14:09 +02:00
Elian Doran
249c42e781 fix(view/calendar): guard condition breaking recursion 2025-02-23 18:39:34 +02:00
Elian Doran
2578d480a8 Merge remote-tracking branch 'origin/develop' into calendar_enh_attributes 2025-02-23 18:38:11 +02:00
Elian Doran
937a314260 Merge pull request #1260 from TriliumNext/chore_port-to-ts_attach
chore(ts): port various attachment related files to TS
2025-02-23 18:33:41 +02:00
Elian Doran
560b7ebe35 refactor(client): use workaround for TS error 2025-02-23 18:32:53 +02:00
Elian Doran
4883debd8d Merge remote-tracking branch 'origin/develop' into chore_port-to-ts_attach 2025-02-23 18:28:29 +02:00
Elian Doran
637845c396 Merge pull request #1258 from TriliumNext/fix_zenmode-ui-fixes
fix/i18n: tiny zen mode UI fixes
2025-02-23 18:27:56 +02:00
Elian Doran
d16026f8e6 Merge pull request #1257 from TriliumNext/chore_deps-update
chore: package.json maintenance
2025-02-23 18:26:59 +02:00
Elian Doran
e5aed0a3fc Merge pull request #1167 from TriliumNext/chore_ts-port_sync_status
chore(ts): port sync_status.ts
2025-02-23 18:26:23 +02:00
Elian Doran
8a08664dd5 Merge pull request #1263 from TriliumNext/renovate/prettier-3.x
chore(deps): update dependency prettier to v3.5.2
2025-02-23 18:24:51 +02:00
Elian Doran
b9f30fc501 chore(build): update Electron version for nix 2025-02-23 18:22:56 +02:00
Adorian Doran
70af260f0f style(next): note map: tweak the color of the "fix nodes" button while toggled 2025-02-23 17:48:58 +02:00
Adorian Doran
474b44608b style(next): forms: remove the background for range inputs 2025-02-23 17:13:56 +02:00
Adorian Doran
12f7119427 style(next): forms: fix tool buttons wrapped inside button groups 2025-02-23 17:01:32 +02:00
Panagiotis Papadopoulos
223a1fb203 refactor: FAttachment/Attachment_details - make fields public and get rid of getters
as per
https://github.com/TriliumNext/Notes/pull/1260#discussion_r1966615186
2025-02-23 12:52:37 +01:00
Panagiotis Papadopoulos
fb0487ca36 chore(ts): port widgets/attachment_detail to TS 2025-02-23 12:52:37 +01:00
Panagiotis Papadopoulos
add6f80aeb chore(ts/content_renderer): add FAttachment types as used in attachment_detail 2025-02-23 12:52:37 +01:00
Panagiotis Papadopoulos
5d4dc91cc3 chore(ts/Fattachment): add getContentLength, since contentLength is private 2025-02-23 12:52:37 +01:00
Panagiotis Papadopoulos
99e520cbbc chore(ts/Fattachment): add getUtcDateScheduledForErasureSince, since UtcDateScheduledForErasureSince is private 2025-02-23 12:52:37 +01:00
Panagiotis Papadopoulos
1e7dee51fc chore(ts/Fattachment): add getOwnerId, since ownerId is private 2025-02-23 12:52:37 +01:00
Panagiotis Papadopoulos
4ddc36f6b8 chore(ts): import AttachmentRow type in load_results 2025-02-23 12:52:37 +01:00
Panagiotis Papadopoulos
3f2ae81fe4 chore(ts): start port of widgets/attachment_detail 2025-02-23 12:52:37 +01:00
Panagiotis Papadopoulos
d99a44867c chore(ts): add temporary ts-ignore to widgets/buttons/attachments_actions 2025-02-23 12:52:37 +01:00
Panagiotis Papadopoulos
8f643c62e3 chore(ts): port of type_widgets/attachment_list 2025-02-23 12:52:37 +01:00
Panagiotis Papadopoulos
f6785f7980 chore(ts): add missing isDeleted and deleteId types to AttachmentRow 2025-02-23 12:52:37 +01:00
Panagiotis Papadopoulos
bf15192b25 chore(ts): start port of widgets/buttons/attachment_actions 2025-02-23 12:52:37 +01:00
Panagiotis Papadopoulos
70756fe795 chore(ts): start port of type_widgets/attachment_detail 2025-02-23 12:52:36 +01:00
Panagiotis Papadopoulos
31170744d1 chore(ts): allow link.createLink notePath type to accept undefined
it can also accept undefined -> it is even handled in that first if block.
change required for upcoming port of attachment_*.js files
2025-02-23 12:52:36 +01:00
Adorian Doran
1dfa4a8bc2 client: note map: improve the appearance 2025-02-23 06:17:57 +02:00
renovate[bot]
e9f5272d98 chore(deps): update dependency prettier to v3.5.2 2025-02-23 02:09:16 +00:00
Romain DEP.
07443042a1 feat(view/calendar): let the user specify attributes to be promoted onto the calendar view, and render them inside the event title 2025-02-22 23:34:14 +01:00
Panagiotis Papadopoulos
4523307ead i18n(close_zen_button): add a translatable title to the button
previously it only displayed the keyboard shortcut, without any extra info
2025-02-22 16:12:12 +01:00
Panagiotis Papadopoulos
755b20bbab fix(global_menu): add missing <kbd> to zen mode 2025-02-22 16:01:49 +01:00
Panagiotis Papadopoulos
49b52d3124 chore: run npm audit fix
1 vuln fixed, 6 still open, but there is no fix for these yet
https://github.com/advisories/GHSA-67mh-4wv8-2f99
2025-02-22 15:47:30 +01:00
Panagiotis Papadopoulos
da69ee3285 chore(types): move types to devDependencies 2025-02-22 15:44:35 +01:00
Panagiotis Papadopoulos
9fb95585f5 chore(ts): port sync_status.ts 2025-02-22 14:21:56 +01:00
Elian Doran
2380d0af85 Merge pull request #1254 from TriliumNext/ci_remove-extra-arm64-handling
ci: remove unneeded extra arm64 handling
2025-02-22 14:58:50 +02:00
Elian Doran
f6224d9ec4 Merge pull request #1168 from TriliumNext/chore_bootstrap-ts-ignore
build: bundle bootstrap with webpack
2025-02-22 14:57:47 +02:00
Elian Doran
58a8821c22 Merge pull request #1234 from TriliumNext/feature/task_list
Task List
2025-02-22 14:37:44 +02:00
Elian Doran
fc27c4fc7b feat(db): create task database in schema 2025-02-22 14:36:15 +02:00
Elian Doran
0b11f4d9c7 chore(server): bump sync version 2025-02-22 14:34:44 +02:00
Elian Doran
50d491b432 build(release): update master branch automatically 2025-02-22 14:25:31 +02:00
Panagiotis Papadopoulos
2492bf60df chore(ci): add zip to description 2025-02-22 13:15:45 +01:00
Panagiotis Papadopoulos
49550e8e69 chore(ci): remove now unneeded arm64 workaround
the change is now part of electron-forge 7.7.0 which we depend on since
fa05f15753
2025-02-22 13:15:45 +01:00
Panagiotis Papadopoulos
a0442ded58 chore: get rid of bootstrap related ts-ignore 2025-02-22 13:09:28 +01:00
Panagiotis Papadopoulos
cdb988ff64 webpack: revert accidental changing of devtool 2025-02-22 13:02:40 +01:00
Elian Doran
899ad6450a build(release): use different commit message 2025-02-22 14:02:13 +02:00
Panagiotis Papadopoulos
e7d204dfd2 chore(copy-dist): remove now unneeded manual copying of bootstrap dir
webpack is taking care of that for us
2025-02-22 11:56:56 +01:00
Panagiotis Papadopoulos
1ded78975e deps: remove now unused style-loader 2025-02-22 11:56:56 +01:00
Panagiotis Papadopoulos
55bdd4fffc views: add TODO comment 2025-02-22 11:56:56 +01:00
Panagiotis Papadopoulos
0b4f5e998e webpack: add filename option to miniCssExtractPlugin
commented out for now, because it currently does not make sense yet.
This will be working, when I change webpack output to the "build" folder
instead of the current (messy) way, where it outputs into src/public/app-dist
2025-02-22 11:56:56 +01:00
Panagiotis Papadopoulos
dde24785b8 entrypoint: add missing login entry point and port to TS 2025-02-22 11:56:56 +01:00
Panagiotis Papadopoulos
f6d9b42911 entrypoint: add missing, currently required set_password entry point
TODO: I think this can actually be part of the setup entrypoint/view at some point
2025-02-22 11:56:56 +01:00
Panagiotis Papadopoulos
f78a6ed14b views: import webpack created entrypoint css
→ this is currently only consisting of bootstrap, but should in future be more useful
2025-02-22 11:56:56 +01:00
Panagiotis Papadopoulos
837697c503 bootstrap: import bootstrap css in entry points 2025-02-22 11:56:56 +01:00
Panagiotis Papadopoulos
1b309675c8 fix(webpackMiddleware): add (now) missing plugins declaration from productionConfig
required since we used `mini-css-extract-plugin` now
2025-02-22 11:56:56 +01:00
Panagiotis Papadopoulos
ac53079a39 webpack: replace style-loader with mini-css-extract-plugin
will allow to have css files instead of style blocks in the html file
2025-02-22 11:56:56 +01:00
Panagiotis Papadopoulos
19e19ca052 assets: remove bootstrap reference 2025-02-22 11:56:56 +01:00
Panagiotis Papadopoulos
5361161433 views: remove bootstrap references 2025-02-22 11:56:56 +01:00
Panagiotis Papadopoulos
762c7dab83 build: add bootstrap webpack related dependencies
https://getbootstrap.com/docs/5.3/getting-started/webpack/
2025-02-22 11:56:56 +01:00
Panagiotis Papadopoulos
ba3599911f chore(bootstrap): import Bootstrap modules 2025-02-22 11:56:56 +01:00
Panagiotis Papadopoulos
fc6b9e00bc webpack: add bootstrap webpack config
https://getbootstrap.com/docs/5.3/getting-started/webpack/
2025-02-22 11:56:56 +01:00
Panagiotis Papadopoulos
17860e6715 fix(note_type_choosers): fix glob.activeDialog assignment
the same thing is done in `confirm.ts` as well, where glob.activeDialog is set to `this.$widget`
2025-02-22 11:56:56 +01:00
Panagiotis Papadopoulos
ad8adeda0a fix(global_menu): fix non-existing option (according to TS) 2025-02-22 11:56:56 +01:00
Panagiotis Papadopoulos
bc28f323b8 chore(ts): get rid of bootstrap related ts-ignores 2025-02-22 11:56:56 +01:00
Panagiotis Papadopoulos
4f171fd966 chore(ts): get rid of bootstrap related ts-ignores 2025-02-22 11:56:56 +01:00
Panagiotis Papadopoulos
65ad4c3a2b chore(ts): get rid of bootstrap related ts-ignores 2025-02-22 11:56:56 +01:00
Panagiotis Papadopoulos
cc1a01955a chore(ts): get rid of bootstrap related ts-ignores 2025-02-22 11:56:56 +01:00
Panagiotis Papadopoulos
cf11be7f35 chore(ts): get rid of bootstrap related ts-ignores 2025-02-22 11:56:56 +01:00
Elian Doran
a3fbf15902 Merge remote-tracking branch 'origin/develop' into feature/task_list 2025-02-22 11:03:18 +02:00
Elian Doran
0e5b8af3a4 Merge remote-tracking branch 'origin/develop' into feature/task_list 2025-02-21 08:53:51 +02:00
Elian Doran
ef487f46d1 Merge branch 'develop' into feature/task_list 2025-02-20 17:34:36 +02:00
Elian Doran
a433c9c189 feat(tasks): add SQL migration 2025-02-20 12:07:10 +02:00
Elian Doran
62c96fc95e feat(tasks): implement basic refresh support 2025-02-19 22:34:52 +02:00
Elian Doran
c0d3e8d834 feat(tasks): filter by parent note 2025-02-19 22:13:13 +02:00
Elian Doran
bb822126cd feat(tasks): store parent note ID 2025-02-19 21:52:33 +02:00
Elian Doran
034b93c99c feat(tasks): support entities reloaded properly 2025-02-19 21:30:53 +02:00
Elian Doran
f743f634b4 feat(tasks): hide completed tasks for now 2025-02-19 20:33:20 +02:00
Elian Doran
9ed075b675 fix(tasks): task list not clearing properly 2025-02-19 20:02:43 +02:00
Elian Doran
7f0df441b5 fix(tasks): initial state for checkbox 2025-02-19 19:45:23 +02:00
Elian Doran
2de46eb5d2 fix(build): task row should be optional 2025-02-19 19:37:07 +02:00
Elian Doran
2a3546edd5 feat(client/tasks): display completed tasks 2025-02-19 19:27:04 +02:00
Elian Doran
7c0b43db85 feat(tasks): mark tasks as completed 2025-02-19 19:22:38 +02:00
Elian Doran
d4ef15212f style(tasks): improve individual items design 2025-02-19 18:40:26 +02:00
Elian Doran
ad492619f5 style(tasks): floating header 2025-02-19 18:30:39 +02:00
Elian Doran
35af12b6e7 fix(vscode): F5 to start server 2025-02-19 18:18:28 +02:00
Elian Doran
0baa804544 fix(server/tasks): becca not updating on task creation 2025-02-19 18:18:20 +02:00
Elian Doran
575ef5e10e fix(build): missing note type in help button 2025-02-19 18:14:49 +02:00
Elian Doran
0b8e3b976f fix(client/tasks): error due to froca update 2025-02-18 21:16:32 +02:00
Elian Doran
373e0b45f2 fix(server/tasks): missing utcDateModified causing errors on create 2025-02-18 21:07:06 +02:00
Elian Doran
c00505cd7b feat(client/tasks): create flow for creating a task 2025-02-18 21:06:51 +02:00
Elian Doran
fc1ee7c6f0 feat(client/tasks): add a text box for adding a new task 2025-02-18 20:01:04 +02:00
Elian Doran
7cba5a7c7d feat(client/tasks): display tasks 2025-02-18 19:58:00 +02:00
Elian Doran
1024733252 feat(client/tasks): create task list note type 2025-02-18 19:42:27 +02:00
Elian Doran
17f9fa7e89 feat(tasks): add POST API 2025-02-18 19:30:02 +02:00
Elian Doran
98dff61305 feat(tasks): add GET API 2025-02-18 19:06:02 +02:00
Elian Doran
c0e42e23a6 feat(tasks): create backend model for task 2025-02-18 18:42:26 +02:00
Elian Doran
565989dd4c feat(client/ts): port tree (WIP) 2025-01-30 10:14:10 +02:00
978 changed files with 40820 additions and 119072 deletions

View File

@@ -1,10 +1,42 @@
.git
.idea
# ignored Files
.dockerignore
.editorconfig
.git*
.prettier*
electron*
entitlements.plist
nodemon.json
renovate.json
trilium.iml
Dockerfile
Dockerfile.*
npm-debug.log
/src/**/*.spec.ts
# ignored folders
/.cache
/.git
/.github
/.idea
/.vscode
/bin
/build
/dist
/docs
/npm-debug.log
node_modules
/dump-db
/e2e
/integration-tests
/spec
/test
/test-etapi
/node_modules
src/**/*.ts
!src/services/asset_path.ts
# exceptions
!/bin/copy-dist.ts
# temporary exception to make copy-dist inside Docker build not fail
# TriliumNextTODO: make copy-dist *not* requiring to copy this file for builds other than electron-forge
!forge.config.cjs
!/bin/tpl
!/bin/electron-forge/desktop.ejs

1
.gitattributes vendored
View File

@@ -1,3 +1,4 @@
package-lock.json linguist-generated=true
**/package-lock.json linguist-generated=true
src/public/app/doc_notes/en/User[[:space:]]Guide/** linguist-generated=true
libraries/** linguist-vendored

View File

@@ -1,3 +1,6 @@
name: "Build Electron App"
description: "Builds and packages the Electron app for different platforms"
inputs:
os:
description: "One of the supported platforms: macos, linux, windows"
@@ -6,15 +9,47 @@ inputs:
description: "The architecture to build for: x64, arm64"
required: true
extension:
description: "Platform specific extensions to copy in the output: dmg, deb, rpm, exe"
description: "Platform specific extensions to copy in the output: dmg, deb, rpm, exe, zip"
required: true
runs:
using: composite
steps:
- name: Set up Python for appdmg to be installed
# Certificate setup
- name: Import Apple certificates
if: inputs.os == 'macos'
uses: apple-actions/import-codesign-certs@v3
with:
p12-file-base64: ${{ env.APPLE_APP_CERTIFICATE_BASE64 }}
p12-password: ${{ env.APPLE_APP_CERTIFICATE_PASSWORD }}
keychain: build
keychain-password: ${{ github.run_id }}
- name: Install Installer certificate
if: inputs.os == 'macos'
uses: apple-actions/import-codesign-certs@v3
with:
p12-file-base64: ${{ env.APPLE_INSTALLER_CERTIFICATE_BASE64 }}
p12-password: ${{ env.APPLE_INSTALLER_CERTIFICATE_PASSWORD }}
keychain: build
keychain-password: ${{ github.run_id }}
# We don't need to create a keychain here because we're using the build keychain that was created in the previous step
create-keychain: false
- name: Verify certificates
if: inputs.os == 'macos'
shell: bash
run: |
echo "Available signing identities:"
security find-identity -v -p codesigning build.keychain
- name: Set up Python and other macOS dependencies
if: ${{ inputs.os == 'macos' }}
shell: bash
run: brew install python-setuptools
run: |
brew install python-setuptools
brew install create-dmg
- name: Install dependencies for RPM and Flatpak package building
if: ${{ inputs.os == 'linux' }}
shell: bash
@@ -24,25 +59,155 @@ runs:
FLATPAK_ARCH=$(if [[ ${{ inputs.arch }} = 'arm64' ]]; then echo 'aarch64'; else echo 'x86_64'; fi)
FLATPAK_VERSION='24.08'
flatpak install --user --no-deps --arch $FLATPAK_ARCH --assumeyes runtime/org.freedesktop.Platform/$FLATPAK_ARCH/$FLATPAK_VERSION runtime/org.freedesktop.Sdk/$FLATPAK_ARCH/$FLATPAK_VERSION org.electronjs.Electron2.BaseApp/$FLATPAK_ARCH/$FLATPAK_VERSION
# Build setup
- name: Install dependencies
shell: bash
run: npm ci
- name: Temporary Flatpak arm64 workaround till https://github.com/electron/forge/pull/3839 is merged
if: ${{ inputs.os == 'linux' && inputs.arch == 'arm64' }}
shell: bash
run: sed -e "s/case 'armv7l'/case 'arm64'/g" -e "s/return 'arm'/return 'aarch64'/g" -i node_modules/@electron-forge/maker-flatpak/dist/MakerFlatpak.js
- name: Update build info
shell: bash
run: npm run chore:update-build-info
- name: Run electron-forge
# Critical debugging configuration
- name: Run electron-forge build with enhanced logging
shell: bash
run: npm run electron-forge:make -- --arch=${{ inputs.arch }}
env:
# Pass through required environment variables for signing and notarization
APPLE_TEAM_ID: ${{ env.APPLE_TEAM_ID }}
APPLE_ID: ${{ env.APPLE_ID }}
APPLE_ID_PASSWORD: ${{ env.APPLE_ID_PASSWORD }}
run: |
# Map OS names to Electron Forge platform names
if [ "${{ inputs.os }}" = "macos" ]; then
PLATFORM="darwin"
elif [ "${{ inputs.os }}" = "windows" ]; then
PLATFORM="win32"
else
PLATFORM="${{ inputs.os }}"
fi
npm run electron-forge:make -- \
--arch=${{ inputs.arch }} \
--platform=$PLATFORM
# Add DMG signing step
- name: Sign DMG
if: inputs.os == 'macos'
shell: bash
run: |
echo "Signing DMG file..."
dmg_file=$(find ./dist -name "*.dmg" -print -quit)
if [ -n "$dmg_file" ]; then
echo "Found DMG: $dmg_file"
# Get the first valid signing identity from the keychain
SIGNING_IDENTITY=$(security find-identity -v -p codesigning build.keychain | grep "Developer ID Application" | head -1 | sed -E 's/.*"([^"]+)".*/\1/')
if [ -z "$SIGNING_IDENTITY" ]; then
echo "Error: No valid Developer ID Application certificate found in keychain"
exit 1
fi
echo "Using signing identity: $SIGNING_IDENTITY"
# Sign the DMG
codesign --force --sign "$SIGNING_IDENTITY" --options runtime --timestamp "$dmg_file"
# Notarize the DMG
xcrun notarytool submit "$dmg_file" --apple-id "$APPLE_ID" --password "$APPLE_ID_PASSWORD" --team-id "$APPLE_TEAM_ID" --wait
# Staple the notarization ticket
xcrun stapler staple "$dmg_file"
else
echo "No DMG found to sign"
fi
- name: Verify code signing
if: inputs.os == 'macos'
shell: bash
run: |
echo "Verifying code signing for all artifacts..."
# First check the .app bundle
echo "Looking for .app bundle..."
app_bundle=$(find ./dist -name "*.app" -print -quit)
if [ -n "$app_bundle" ]; then
echo "Found app bundle: $app_bundle"
echo "Verifying app bundle signing..."
codesign --verify --deep --strict --verbose=2 "$app_bundle"
echo "Displaying app bundle signing info..."
codesign --display --verbose=2 "$app_bundle"
echo "Checking entitlements..."
codesign --display --entitlements :- "$app_bundle"
echo "Checking notarization status..."
xcrun stapler validate "$app_bundle" || echo "Warning: App bundle not notarized yet"
else
echo "No .app bundle found to verify"
fi
# Then check DMG if it exists
echo "Looking for DMG..."
dmg_file=$(find ./dist -name "*.dmg" -print -quit)
if [ -n "$dmg_file" ]; then
echo "Found DMG: $dmg_file"
echo "Verifying DMG signing..."
codesign --verify --deep --strict --verbose=2 "$dmg_file"
echo "Displaying DMG signing info..."
codesign --display --verbose=2 "$dmg_file"
echo "Checking DMG notarization..."
xcrun stapler validate "$dmg_file" || echo "Warning: DMG not notarized yet"
else
echo "No DMG found to verify"
fi
# Finally check ZIP if it exists
echo "Looking for ZIP..."
zip_file=$(find ./dist -name "*.zip" -print -quit)
if [ -n "$zip_file" ]; then
echo "Found ZIP: $zip_file"
echo "Note: ZIP files are not code signed, but their contents should be"
fi
- name: Prepare artifacts
shell: bash
run: |
mkdir -p upload;
for ext in ${{ inputs.extension }};
do
file=$(find out/make -name "*.$ext" -print -quit);
cp "$file" "upload/TriliumNextNotes-${{ github.ref_name }}-${{ inputs.os }}-${{ inputs.arch }}.$ext";
done
mkdir -p upload
if [ "${{ inputs.os }}" = "macos" ]; then
# For macOS, we need to look in specific directories based on the maker
echo "Collecting macOS artifacts..."
# Look for DMG files recursively
echo "Looking for DMG files..."
dmg_file=$(find ./dist -name "*.dmg" -print -quit)
if [ -n "$dmg_file" ]; then
echo "Found DMG: $dmg_file"
cp "$dmg_file" "upload/TriliumNextNotes-${{ github.ref_name }}-macos-${{ inputs.arch }}.dmg"
else
echo "Warning: No DMG file found"
fi
# Look for ZIP files recursively
echo "Looking for ZIP files..."
zip_file=$(find ./dist -name "*.zip" -print -quit)
if [ -n "$zip_file" ]; then
echo "Found ZIP: $zip_file"
cp "$zip_file" "upload/TriliumNextNotes-${{ github.ref_name }}-macos-${{ inputs.arch }}.zip"
else
echo "Warning: No ZIP file found"
fi
else
# For other platforms, use the existing logic but with better error handling
echo "Collecting artifacts for ${{ inputs.os }}..."
for ext in ${{ inputs.extension }}; do
echo "Looking for .$ext files..."
file=$(find ./dist -name "*.$ext" -print -quit)
if [ -n "$file" ]; then
echo "Found $file for extension $ext"
cp "$file" "upload/TriliumNextNotes-${{ github.ref_name }}-${{ inputs.os }}-${{ inputs.arch }}.$ext"
else
echo "Warning: No file found with extension .$ext"
fi
done
fi
echo "Final contents of upload directory:"
ls -la upload/

View File

@@ -1,9 +1,9 @@
name: Dev
on:
push:
branches-ignore:
- 'develop'
- 'feature/update**'
branches: [ develop ]
pull_request:
branches: [ develop ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
@@ -33,6 +33,10 @@ jobs:
- name: Run the TypeScript build
run: npx tsc
- name: Run the unit tests
run: npm run test
build_docker:
name: Build Docker image
runs-on: ubuntu-latest
@@ -40,22 +44,12 @@ jobs:
- test_dev
steps:
- uses: actions/checkout@v4
- name: Set up node & dependencies
uses: actions/setup-node@v4
with:
node-version: 20
cache: "npm"
- run: npm ci
- name: Run the TypeScript build
run: npx tsc
- name: Create server-package.json
run: cat package.json | grep -v electron > server-package.json
- uses: docker/setup-buildx-action@v3
- uses: docker/build-push-action@v6
with:
context: .
cache-from: type=gha
cache-to: type=gha,mode=max
cache-to: type=gha,mode=max
test_docker:
name: Check Docker build
runs-on: ubuntu-latest
@@ -69,7 +63,7 @@ jobs:
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Set IMAGE_NAME to lowercase
run: echo "IMAGE_NAME=${IMAGE_NAME,,}" >> $GITHUB_ENV
- name: Set TEST_TAG to lowercase
@@ -78,20 +72,6 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Set up node & dependencies
uses: actions/setup-node@v4
with:
node-version: 20
cache: "npm"
- run: npm ci
- name: Run the TypeScript build
run: npx tsc
- name: Create server-package.json
run: cat package.json | grep -v electron > server-package.json
- name: Build and export to Docker
uses: docker/build-push-action@v6
with:
@@ -101,12 +81,12 @@ jobs:
tags: ${{ env.TEST_TAG }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Validate container run output
run: |
CONTAINER_ID=$(docker run -d --log-driver=journald --rm --name trilium_local ${{ env.TEST_TAG }})
echo "Container ID: $CONTAINER_ID"
- name: Wait for the healthchecks to pass
uses: stringbean/docker-healthcheck-action@v3
with:

View File

@@ -57,9 +57,6 @@ jobs:
- name: Run the TypeScript build
run: npx tsc
- name: Create server-package.json
run: cat package.json | grep -v electron > server-package.json
- name: Build and export to Docker
uses: docker/build-push-action@v6
with:
@@ -154,18 +151,6 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Set up node & dependencies
uses: actions/setup-node@v4
with:
node-version: 20
cache: "npm"
- run: npm ci
- name: Run the TypeScript build
run: npx tsc
- name: Create server-package.json
run: cat package.json | grep -v electron > server-package.json
- name: Login to GHCR
uses: docker/login-action@v3
with:

View File

@@ -43,6 +43,21 @@ jobs:
os: ${{ matrix.os.name }}
arch: ${{ matrix.arch }}
extension: ${{ matrix.os.extension }}
env:
APPLE_APP_CERTIFICATE_BASE64: ${{ secrets.APPLE_APP_CERTIFICATE_BASE64 }}
APPLE_APP_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_APP_CERTIFICATE_PASSWORD }}
APPLE_INSTALLER_CERTIFICATE_BASE64: ${{ secrets.APPLE_INSTALLER_CERTIFICATE_BASE64 }}
APPLE_INSTALLER_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_INSTALLER_CERTIFICATE_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
# Clean up keychain after build
- name: Clean up keychain
if: matrix.os.name == 'macos' && always()
run: |
security delete-keychain build.keychain
- name: Publish artifacts
uses: actions/upload-artifact@v4
with:

View File

@@ -2,7 +2,7 @@ name: Nightly Release
on:
# This can be used to automatically publish nightlies at UTC nighttime
schedule:
- cron: '0 2 * * *' # run at 2 AM UTC
- cron: "0 2 * * *" # run at 2 AM UTC
# This can be used to allow manually triggering nightlies from the web interface
workflow_dispatch:
env:
@@ -45,6 +45,14 @@ jobs:
os: ${{ matrix.os.name }}
arch: ${{ matrix.arch }}
extension: ${{ join(matrix.os.extension, ' ') }}
env:
APPLE_APP_CERTIFICATE_BASE64: ${{ secrets.APPLE_APP_CERTIFICATE_BASE64 }}
APPLE_APP_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_APP_CERTIFICATE_PASSWORD }}
APPLE_INSTALLER_CERTIFICATE_BASE64: ${{ secrets.APPLE_INSTALLER_CERTIFICATE_BASE64 }}
APPLE_INSTALLER_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_INSTALLER_CERTIFICATE_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
- name: Publish release
uses: softprops/action-gh-release@v2

View File

@@ -40,6 +40,15 @@ jobs:
os: ${{ matrix.os.name }}
arch: ${{ matrix.arch }}
extension: ${{ join(matrix.os.extension, ' ') }}
env:
APPLE_APP_CERTIFICATE_BASE64: ${{ secrets.APPLE_APP_CERTIFICATE_BASE64 }}
APPLE_APP_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_APP_CERTIFICATE_PASSWORD }}
APPLE_INSTALLER_CERTIFICATE_BASE64: ${{ secrets.APPLE_INSTALLER_CERTIFICATE_BASE64 }}
APPLE_INSTALLER_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_INSTALLER_CERTIFICATE_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
- name: Publish release
uses: softprops/action-gh-release@v2
with:

9
.gitignore vendored
View File

@@ -11,6 +11,7 @@ po-*/
.flatpak-builder/
*.db
!test/**/*.db
!integration-tests/db/document.db
!integration-tests/db/config.ini
integration-tests/db/log
@@ -35,4 +36,10 @@ images/app-icons/mac/*.png
/playwright-report/
/blob-report/
/playwright/.cache/
/playwright/.auth/
/playwright/.auth/
data-docs/backup
data-docs/log
data-docs/session
data-docs/session_secret.txt
data-docs/document.*

View File

@@ -2,4 +2,5 @@
*.md
*.yml
libraries/*
docs/*
docs/*
src/public/app/doc_notes/**/*

View File

@@ -1,3 +1,7 @@
{
"recommendations": ["lokalise.i18n-ally", "editorconfig.editorconfig"]
"recommendations": [
"lokalise.i18n-ally",
"editorconfig.editorconfig",
"vitest.explorer"
]
}

View File

@@ -19,5 +19,12 @@
"[css]": {
"editor.defaultFormatter": "vscode.css-language-features"
},
"npm.exclude": ["**/build", "**/dist", "**/out/**"]
"npm.exclude": [
"**/build",
"**/dist",
"**/out/**"
],
"[xml]": {
"editor.defaultFormatter": "redhat.vscode-xml"
}
}

View File

@@ -1,62 +1,46 @@
# Build stage
FROM node:22.14.0-bullseye-slim AS builder
# Configure build dependencies in a single layer
RUN apt-get update && apt-get install -y --no-install-recommends \
autoconf \
automake \
g++ \
gcc \
libtool \
make \
nasm \
libpng-dev \
python3 \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /usr/src/app
WORKDIR /usr/src/app/build
# Copy only necessary files for build
COPY . .
COPY server-package.json package.json
# Build and cleanup in a single layer
RUN cp -R build/src/* src/. && \
cp build/docker_healthcheck.js . && \
rm docker_healthcheck.ts && \
npm install && \
npm run build:webpack && \
npm prune --omit=dev && \
RUN npm ci && \
npm run build:prepare-dist && \
npm cache clean --force && \
cp -r src/public/app/doc_notes src/public/app-dist/. && \
rm -rf src/public/app/* && \
mkdir -p src/public/app/services && \
cp -r build/src/public/app/services/mime_type_definitions.js src/public/app/services/mime_type_definitions.js && \
rm src/services/asset_path.ts && \
rm -r build
rm -rf build/node_modules && \
mv build/* \
start-docker.sh \
/usr/src/app/ && \
rm -rf \
/usr/src/app/build \
/tmp/node-compile-cache
#TODO: improve node_modules handling in copy-dist/Dockerfile -> remove duplicated work
# currently copy-dist will copy certain node_module folders, but in the Dockerfile we delete them again (to keep image size down),
# as we install necessary dependencies in runtime buildstage anyways
# Runtime stage
FROM node:22.14.0-bullseye-slim
# Install only runtime dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
gosu \
&& rm -rf /var/lib/apt/lists/* && \
rm -rf /var/cache/apt/*
WORKDIR /usr/src/app
# Copy only necessary files from builder
COPY --from=builder /usr/src/app/node_modules ./node_modules
COPY --from=builder /usr/src/app/src ./src
COPY --from=builder /usr/src/app/db ./db
COPY --from=builder /usr/src/app/docker_healthcheck.js .
COPY --from=builder /usr/src/app/start-docker.sh .
COPY --from=builder /usr/src/app/package.json .
COPY --from=builder /usr/src/app/config-sample.ini .
COPY --from=builder /usr/src/app/images ./images
COPY --from=builder /usr/src/app/translations ./translations
COPY --from=builder /usr/src/app/libraries ./libraries
# Install only runtime dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends \
gosu && \
rm -rf \
/var/lib/apt/lists/* \
/var/cache/apt/*
COPY --from=builder /usr/src/app ./
RUN sed -i "/electron/d" package.json && \
npm ci --omit=dev && \
npm cache clean --force && \
rm -rf /tmp/node-compile-cache
# Configure container
EXPOSE 8080

View File

@@ -1,38 +1,26 @@
# Build stage
FROM node:22.14.0-alpine AS builder
# Configure build dependencies
RUN apk add --no-cache --virtual .build-dependencies \
autoconf \
automake \
g++ \
gcc \
libtool \
make \
nasm \
libpng-dev \
python3
WORKDIR /usr/src/app
WORKDIR /usr/src/app/build
# Copy only necessary files for build
COPY . .
COPY server-package.json package.json
# Build and cleanup in a single layer
RUN cp -R build/src/* src/. && \
cp build/docker_healthcheck.js . && \
rm docker_healthcheck.ts && \
npm install && \
npm run build:webpack && \
npm prune --omit=dev && \
RUN npm ci && \
npm run build:prepare-dist && \
npm cache clean --force && \
cp -r src/public/app/doc_notes src/public/app-dist/. && \
rm -rf src/public/app && \
mkdir -p src/public/app/services && \
cp -r build/src/public/app/services/mime_type_definitions.js src/public/app/services/mime_type_definitions.js && \
rm src/services/asset_path.ts && \
rm -r build
rm -rf build/node_modules && \
mv build/* \
start-docker.sh \
/usr/src/app/ && \
rm -rf \
/usr/src/app/build \
/tmp/node-compile-cache
#TODO: improve node_modules handling in copy-dist/Dockerfile -> remove duplicated work
# currently copy-dist will copy certain node_module folders, but in the Dockerfile we delete them again (to keep image size down),
# as we install necessary dependencies in runtime buildstage anyways
# Runtime stage
FROM node:22.14.0-alpine
@@ -42,17 +30,12 @@ RUN apk add --no-cache su-exec shadow
WORKDIR /usr/src/app
# Copy only necessary files from builder
COPY --from=builder /usr/src/app/node_modules ./node_modules
COPY --from=builder /usr/src/app/src ./src
COPY --from=builder /usr/src/app/db ./db
COPY --from=builder /usr/src/app/docker_healthcheck.js .
COPY --from=builder /usr/src/app/start-docker.sh .
COPY --from=builder /usr/src/app/package.json .
COPY --from=builder /usr/src/app/config-sample.ini .
COPY --from=builder /usr/src/app/images ./images
COPY --from=builder /usr/src/app/translations ./translations
COPY --from=builder /usr/src/app/libraries ./libraries
COPY --from=builder /usr/src/app ./
RUN sed -i "/electron/d" package.json && \
npm ci --omit=dev && \
npm cache clean --force && \
rm -rf /tmp/node-compile-cache
# Add application user
RUN adduser -s /bin/false node; exit 0

View File

@@ -5,11 +5,6 @@ set -e # Fail on any command error
VERSION=`jq -r ".version" package.json`
SERIES=${VERSION:0:4}-latest
cat package.json | grep -v electron > server-package.json
echo "Compiling typescript..."
npx tsc
sudo docker build -t triliumnext/notes:$VERSION --network host -t triliumnext/notes:$SERIES .
if [[ $VERSION != *"beta"* ]]; then

View File

@@ -22,55 +22,42 @@ echo "Selected Arch: $ARCH"
# Set Node.js version and architecture-specific filename
NODE_VERSION=20.15.1
NODE_ARCH=$ARCH
# Debug output
echo "Node arch: $NODE_ARCH"
BUILD_DIR="./build"
DIST_DIR="./dist"
# Special case for x64 in Node.js downloads
if [ "$NODE_ARCH" = "x64" ]; then
NODE_FILENAME="x64"
elif [ "$NODE_ARCH" = "arm64" ]; then
NODE_FILENAME="arm64"
fi
./bin/copy-trilium.sh
# Debug output
echo "Node filename: $NODE_FILENAME"
NODE_FILENAME=node-v${NODE_VERSION}-linux-${ARCH}
PKG_DIR=dist/trilium-linux-${ARCH}-server
echo "Package directory: $PKG_DIR"
if [ "$1" != "DONTCOPY" ]
then
# Need to modify copy-trilium.sh to accept the target directory
./bin/copy-trilium.sh "$PKG_DIR"
fi
cd dist
wget https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-${NODE_FILENAME}.tar.xz
tar xfJ node-v${NODE_VERSION}-linux-${NODE_FILENAME}.tar.xz
rm node-v${NODE_VERSION}-linux-${NODE_FILENAME}.tar.xz
echo "Downloading Node.js runtime $NODE_FILENAME..."
cd $BUILD_DIR
wget -qO- https://nodejs.org/dist/v${NODE_VERSION}/${NODE_FILENAME}.tar.xz | tar xfJ -
mv $NODE_FILENAME node
cd ..
mv dist/node-v${NODE_VERSION}-linux-${NODE_FILENAME} $PKG_DIR/node
rm -r $PKG_DIR/node/lib/node_modules/npm
rm -r $PKG_DIR/node/include/node
rm -r $BUILD_DIR/node/lib/node_modules/npm \
$BUILD_DIR/node/include/node \
$BUILD_DIR/node_modules/electron* \
$BUILD_DIR/electron*.{js,map}
rm -r $PKG_DIR/node_modules/electron*
rm -r $PKG_DIR/electron*.js
printf "#!/bin/sh\n./node/bin/node src/main" > $BUILD_DIR/trilium.sh
chmod 755 $BUILD_DIR/trilium.sh
printf "#!/bin/sh\n./node/bin/node src/main" > $PKG_DIR/trilium.sh
chmod 755 $PKG_DIR/trilium.sh
cp bin/tpl/anonymize-database.sql $PKG_DIR/
cp -r translations $PKG_DIR/
cp -r dump-db $PKG_DIR/
rm -rf $PKG_DIR/dump-db/node_modules
# TriliumNextTODO: is this still required? If yes → move to copy-dist/copy-trilium
cp bin/tpl/anonymize-database.sql $BUILD_DIR/
VERSION=`jq -r ".version" package.json`
cd dist
tar cJf trilium-linux-${ARCH}-server-${VERSION}.tar.xz trilium-linux-${ARCH}-server
ARCHIVE_NAME="TriliumNextNotes-Server-${VERSION}-linux-${ARCH}"
echo "Creating Archive $ARCHIVE_NAME..."
mkdir $DIST_DIR
cp -r "$BUILD_DIR" "$DIST_DIR/$ARCHIVE_NAME"
cd $DIST_DIR
tar cJf "$ARCHIVE_NAME.tar.xz" "$ARCHIVE_NAME"
rm -rf "$ARCHIVE_NAME"
echo "Server Build Completed!"

View File

@@ -1,53 +0,0 @@
#!/usr/bin/env bash
set -e # Fail on any command error
if ! command -v jq &> /dev/null; then
echo "Missing command: jq"
exit 1
fi
if ! command -v fakeroot &> /dev/null; then
echo "Missing command: fakeroot"
exit 1
fi
if ! command -v dpkg-deb &> /dev/null; then
echo "Missing command: dpkg-deb"
exit 1
fi
if dpkg-deb 2>&1 | grep BusyBox &> /dev/null; then
echo "The dpkg-deb binary provided by BusyBox is not compatible. The Debian tool needs to be used instead."
exit 1
fi
if ! command -v wine &> /dev/null; then
echo "Missing command: wine"
exit 1
fi
echo "Deleting existing builds"
rm -rf dist/*
SRC_DIR=dist/trilium-src
bin/copy-trilium.sh $SRC_DIR
# we'll just copy the same SRC dir to all the builds so we don't have to do npm install in each separately
cp -r $SRC_DIR ./dist/trilium-linux-x64-src
cp -r $SRC_DIR ./dist/trilium-linux-x64-server
cp -r $SRC_DIR ./dist/trilium-windows-x64-src
cp -r $SRC_DIR ./dist/trilium-mac-x64-src
cp -r $SRC_DIR ./dist/trilium-mac-arm64-src
bin/build-win-x64.sh DONTCOPY
bin/build-mac-x64.sh DONTCOPY
bin/build-mac-arm64.sh DONTCOPY
bin/build-linux-x64.sh DONTCOPY
bin/build-server.sh DONTCOPY

View File

@@ -1,9 +1,7 @@
import fs from "fs-extra";
import path from "path";
const DEST_DIR = "./dist";
const DEST_DIR_SRC = path.join(DEST_DIR, "src");
const DEST_DIR_NODE_MODULES = path.join(DEST_DIR, "node_modules");
const DEST_DIR = "./build";
const VERBOSE = process.env.VERBOSE;
@@ -13,43 +11,42 @@ function log(...args: any[]) {
}
}
async function copyNodeModuleFileOrFolder(source: string) {
const adjustedSource = source.substring(13);
const destination = path.join(DEST_DIR_NODE_MODULES, adjustedSource);
function copyNodeModuleFileOrFolder(source: string) {
const destination = path.join(DEST_DIR, source);
log(`Copying ${source} to ${destination}`);
await fs.ensureDir(path.dirname(destination));
await fs.copy(source, destination);
fs.ensureDirSync(path.dirname(destination));
fs.copySync(source, destination);
}
const copy = async () => {
for (const srcFile of fs.readdirSync("build")) {
const destFile = path.join(DEST_DIR, path.basename(srcFile));
log(`Copying source ${srcFile} -> ${destFile}.`);
fs.copySync(path.join("build", srcFile), destFile, { recursive: true });
}
try {
const filesToCopy = [
"config-sample.ini",
"tsconfig.webpack.json",
const assetsToCopy = new Set([
"./images",
"./libraries",
"./translations",
"./db",
"./config-sample.ini",
"./package-lock.json",
"./package.json",
"./LICENSE",
"./README.md",
"./forge.config.cjs",
"./bin/tpl/",
"./bin/electron-forge/desktop.ejs",
"./src/views/",
"./src/etapi/etapi.openapi.yaml",
"./src/routes/api/openapi.json"
];
for (const file of filesToCopy) {
log(`Copying ${file}`);
await fs.copy(file, path.join(DEST_DIR, file));
}
"./src/routes/api/openapi.json",
"./src/public/icon.png",
"./src/public/manifest.webmanifest",
"./src/public/robots.txt",
"./src/public/fonts",
"./src/public/stylesheets",
"./src/public/translations"
]);
const dirsToCopy = ["images", "libraries", "translations", "db"];
for (const dir of dirsToCopy) {
log(`Copying ${dir}`);
await fs.copy(dir, path.join(DEST_DIR, dir));
}
const srcDirsToCopy = ["./src/public", "./src/views", "./build"];
for (const dir of srcDirsToCopy) {
log(`Copying ${dir}`);
await fs.copy(dir, path.join(DEST_DIR_SRC, path.basename(dir)));
for (const asset of assetsToCopy) {
log(`Copying ${asset}`);
fs.copySync(asset, path.join(DEST_DIR, asset));
}
/**
@@ -58,10 +55,10 @@ const copy = async () => {
const publicDirsToCopy = ["./src/public/app/doc_notes"];
const PUBLIC_DIR = path.join(DEST_DIR, "src", "public", "app-dist");
for (const dir of publicDirsToCopy) {
await fs.copy(dir, path.join(PUBLIC_DIR, path.basename(dir)));
fs.copySync(dir, path.join(PUBLIC_DIR, path.basename(dir)));
}
const nodeModulesFile = [
const nodeModulesFile = new Set([
"node_modules/react/umd/react.production.min.js",
"node_modules/react/umd/react.development.js",
"node_modules/react-dom/umd/react-dom.production.min.js",
@@ -71,14 +68,10 @@ const copy = async () => {
"node_modules/katex/dist/contrib/auto-render.min.js",
"node_modules/@highlightjs/cdn-assets/highlight.min.js",
"node_modules/@mind-elixir/node-menu/dist/node-menu.umd.cjs"
];
]);
for (const file of nodeModulesFile) {
await copyNodeModuleFileOrFolder(file);
}
const nodeModulesFolder = [
"node_modules/@excalidraw/excalidraw/dist/",
const nodeModulesFolder = new Set([
"node_modules/@excalidraw/excalidraw/dist/prod/fonts/",
"node_modules/katex/dist/",
"node_modules/dayjs/",
"node_modules/boxicons/css/",
@@ -95,7 +88,6 @@ const copy = async () => {
"node_modules/mark.js/dist/",
"node_modules/normalize.css/",
"node_modules/jquery.fancytree/dist/",
"node_modules/bootstrap/dist/",
"node_modules/autocomplete.js/dist/",
"node_modules/codemirror/lib/",
"node_modules/codemirror/addon/",
@@ -105,13 +97,16 @@ const copy = async () => {
"node_modules/@highlightjs/cdn-assets/languages",
"node_modules/@highlightjs/cdn-assets/styles",
"node_modules/leaflet/dist"
];
]);
for (const folder of nodeModulesFolder) {
await copyNodeModuleFileOrFolder(folder);
for (const nodeModuleItem of [...nodeModulesFile, ...nodeModulesFolder]) {
copyNodeModuleFileOrFolder(nodeModuleItem);
}
};
console.log("Copying complete!")
copy()
.then(() => console.log("Copying complete!"))
.catch((err) => console.error("Error during copy:", err));
} catch(err) {
console.error("Error during copy:", err)
process.exit(1)
}

View File

@@ -3,72 +3,42 @@
set -e # Fail on any command error
shopt -s globstar
if [[ $# -eq 0 ]] ; then
echo "Missing argument of target directory"
exit 1
fi
BUILD_DIR="./build"
if ! [[ $(which npm) ]]; then
echo "Missing npm"
exit 1
fi
# Trigger the TypeScript build
echo TypeScript build start
npx tsc
echo TypeScript build finished
# Copy the TypeScript artifacts
DIR="$1"
rm -rf "$DIR"
mkdir -pv "$DIR"
echo Webpack start
npm run build:webpack
echo Webpack finish
echo "Copying Trilium to build directory $DIR"
for d in 'images' 'libraries' 'src' 'db'; do
cp -r "$d" "$DIR"/
done
for f in 'package.json' 'package-lock.json' 'README.md' 'LICENSE' 'config-sample.ini'; do
cp "$f" "$DIR"/
done
# Trigger the build
echo Build start
npm run build:prepare-dist
echo Build finished
# Patch package.json main
sed -i 's/.\/dist\/electron-main.js/electron-main.js/g' "$DIR/package.json"
script_dir=$(realpath $(dirname $0))
cp -R "$script_dir/../build/src" "$DIR"
cp "$script_dir/../build/electron-main.js" "$DIR"
sed -i 's|./dist/electron-main.js|electron-main.js|g' "$BUILD_DIR/package.json"
# run in subshell (so we return to original dir)
(cd $DIR && npm install --omit=dev --legacy-peer-deps)
(cd $BUILD_DIR && npm ci --omit=dev)
if [[ -d "$DIR"/node_modules ]]; then
if [[ -d "$BUILD_DIR"/node_modules ]]; then
# cleanup of useless files in dependencies
for d in 'image-q/demo' \
'@excalidraw/excalidraw/dist/excalidraw-assets-dev' '@excalidraw/excalidraw/dist/excalidraw.development.js' '@excalidraw/excalidraw/dist/excalidraw-with-preact.development.js' \
'mermaid/dist/mermaid.js' \
'boxicons/svg' 'boxicons/node_modules/react'/* \
'@jimp/plugin-print/fonts' 'jimp/browser' 'jimp/fonts'; do
[[ -e "$DIR"/node_modules/"$d" ]] && rm -r "$DIR"/node_modules/"$d"
[[ -e "$BUILD_DIR"/node_modules/"$d" ]] && rm -r "$BUILD_DIR"/node_modules/"$d"
done
# delete all tests (there are often large images as test file for jimp etc.)
for d in 'test' 'docs' 'demo' 'example'; do
find "$DIR"/node_modules -name "$d" -exec rm -rf {} +
find "$BUILD_DIR"/node_modules -name "$d" -exec rm -rf {} +
done
fi
find $DIR/libraries -name "*.map" -type f -delete
find $DIR/node_modules -name "*.map" -type f -delete
find $DIR -name "*.ts" -type f -delete
find $BUILD_DIR/libraries -name "*.map" -type f -delete
find $BUILD_DIR/node_modules -name "*.map" -type f -delete
find $BUILD_DIR -name "*.ts" -type f -delete
d="$DIR"/src/public
[[ -d "$d"/app-dist ]] || mkdir -pv "$d"/app-dist
cp -r "$d"/app/doc_notes "$d"/app-dist/
rm -rf "$d"/app
unset f d DIR
unset f d BUILD_DIR

View File

@@ -1,6 +1,6 @@
import { fileURLToPath } from "url";
import { dirname, join } from "path";
import swaggerJsdoc from 'swagger-jsdoc';
import swaggerJsdoc from "swagger-jsdoc";
import fs from "fs";
/*
@@ -11,28 +11,30 @@ import fs from "fs";
*/
const options = {
definition: {
openapi: '3.1.1',
info: {
title: 'Trilium Notes - Sync server API',
version: '0.96.6',
description: "This is the internal sync server API used by Trilium Notes / TriliumNext Notes.\n\n_If you're looking for the officially supported External Trilium API, see [here](https://triliumnext.github.io/Docs/Wiki/etapi.html)._\n\nThis page does not yet list all routes. For a full list, see the [route controller](https://github.com/TriliumNext/Notes/blob/v0.91.6/src/routes/routes.ts).",
contact: {
name: "TriliumNext issue tracker",
url: "https://github.com/TriliumNext/Notes/issues",
},
license: {
name: "GNU Free Documentation License 1.3 (or later)",
url: "https://www.gnu.org/licenses/fdl-1.3",
},
definition: {
openapi: "3.1.1",
info: {
title: "Trilium Notes - Sync server API",
version: "0.96.6",
description:
"This is the internal sync server API used by Trilium Notes / TriliumNext Notes.\n\n_If you're looking for the officially supported External Trilium API, see [here](https://triliumnext.github.io/Docs/Wiki/etapi.html)._\n\nThis page does not yet list all routes. For a full list, see the [route controller](https://github.com/TriliumNext/Notes/blob/v0.91.6/src/routes/routes.ts).",
contact: {
name: "TriliumNext issue tracker",
url: "https://github.com/TriliumNext/Notes/issues"
},
license: {
name: "GNU Free Documentation License 1.3 (or later)",
url: "https://www.gnu.org/licenses/fdl-1.3"
}
}
},
},
apis: [
// Put individual files here to have them ordered first.
'./src/routes/api/setup.ts',
// all other files
'./src/routes/api/*.ts', './bin/generate-openapi.js'
],
apis: [
// Put individual files here to have them ordered first.
"./src/routes/api/setup.ts",
// all other files
"./src/routes/api/*.ts",
"./bin/generate-openapi.js"
]
};
const openapiSpecification = swaggerJsdoc(options);

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash
export GITHUB_REPO=trilium
set -e
if [[ $# -eq 0 ]] ; then
echo "Missing argument of new version"
@@ -40,10 +40,18 @@ TAG=v$VERSION
echo "Committing package.json version change"
git commit -m "release $VERSION"
git commit -m "chore(release): $VERSION"
git push
echo "Tagging commit with $TAG"
git tag $TAG
git push origin $TAG
echo "Updating master"
git fetch
git checkout master
git reset --hard origin/master
git merge origin/develop
git push

View File

@@ -16,7 +16,7 @@ chcp 65001
:: Get Current Trilium executable directory and compute data directory
SET DIR=%~dp0
set NODE_TLS_REJECT_UNAUTHORIZED=0
cd %DIR%
cd "%DIR%"
start trilium.exe
GOTO END

View File

@@ -15,8 +15,9 @@ chcp 65001
:: Get Current Trilium executable directory and compute data directory
SET DIR=%~dp0
SET DIR=%DIR:~0,-1%
SET TRILIUM_DATA_DIR=%DIR%\trilium-data
cd %DIR%
cd "%DIR%"
start trilium.exe
GOTO END

View File

@@ -16,7 +16,7 @@ chcp 65001
:: Get Current Trilium executable directory and compute data directory
SET DIR=%~dp0
SET TRILIUM_SAFE_MODE=1
cd %DIR%
cd "%DIR%"
start trilium.exe --disable-gpu
GOTO END

49
data-docs/config.ini Normal file
View File

@@ -0,0 +1,49 @@
[General]
# Instance name can be used to distinguish between different instances using backend api.getInstanceName()
instanceName=
# set to true to allow using Trilium without authentication (makes sense for server build only, desktop build doesn't need password)
noAuthentication=false
# set to true to disable backups (e.g. because of limited space on server)
noBackup=false
# Disable automatically generating desktop icon
# noDesktopIcon=true
[Network]
# host setting is relevant only for web deployments - set the host on which the server will listen
# host=0.0.0.0
# port setting is relevant only for web deployments, desktop builds run on a fixed port (changeable with TRILIUM_PORT environment variable)
port=8080
# true for TLS/SSL/HTTPS (secure), false for HTTP (insecure).
https=false
# path to certificate (run "bash bin/generate-cert.sh" to generate self-signed certificate). Relevant only if https=true
certPath=
keyPath=
# setting to give trust to reverse proxies, a comma-separated list of trusted rev. proxy IPs can be specified (CIDR notation is permitted),
# alternatively 'true' will make use of the leftmost IP in X-Forwarded-For, ultimately an integer can be used to tell about the number of hops between
# Trilium (which is hop 0) and the first trusted rev. proxy.
# once set, expressjs will use the X-Forwarded-For header set by the rev. proxy to determinate the real IPs of clients.
# expressjs shortcuts are supported: loopback(127.0.0.1/8, ::1/128), linklocal(169.254.0.0/16, fe80::/10), uniquelocal(10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, fc00::/7)
trustedReverseProxy=false
[Session]
# Use this setting to set a custom value for the "Path" Attribute value of the session cookie.
# This can be useful, when you have several instances running on the same domain, under different paths (e.g. by using a reverse proxy).
# It prevents your instances from overwriting each others' cookies, allowing you to stay logged in multiple instances simultanteously.
# E.g. if you have instances running under https://your-domain.com/triliumNext/instanceA and https://your-domain.com/triliumNext/instanceB
# you would want to set the cookiePath value to "/triliumNext/instanceA" for your first and "/triliumNext/instanceB" for your second instance
cookiePath=/
# Use this setting to set a custom value for the "Max-Age" Attribute of the session cookie.
# This controls how long your session will be valid, before it expires and you need to log in again, when you use the "Remember Me" option.
# Value needs to be entered in Seconds.
# Default value is 1814400 Seconds, which is 21 Days.
cookieMaxAge=1814400
[Sync]
#syncServerHost=
#syncServerTimeout=
#syncServerProxy=

View File

@@ -1,11 +1,24 @@
module.exports = () => {
const sql = require("../../src/services/sql");
const utils = require("../../src/services/utils");
import sql from "../../src/services/sql";
import utils from "../../src/services/utils";
interface NoteContentsRow {
noteId: string;
content: string | Buffer;
dateModified: string;
utcDateModified: string;
}
interface NoteRevisionContents {
noteRevisionId: string;
content: string | Buffer;
utcDateModified: string;
}
export default () => {
const existingBlobIds = new Set();
for (const noteId of sql.getColumn(`SELECT noteId FROM note_contents`)) {
const row = sql.getRow(`SELECT noteId, content, dateModified, utcDateModified FROM note_contents WHERE noteId = ?`, [noteId]);
for (const noteId of sql.getColumn<string>(`SELECT noteId FROM note_contents`)) {
const row = sql.getRow<NoteContentsRow>(`SELECT noteId, content, dateModified, utcDateModified FROM note_contents WHERE noteId = ?`, [noteId]);
const blobId = utils.hashedBlobId(row.content);
if (!existingBlobIds.has(blobId)) {
@@ -28,7 +41,7 @@ module.exports = () => {
}
for (const noteRevisionId of sql.getColumn(`SELECT noteRevisionId FROM note_revision_contents`)) {
const row = sql.getRow(`SELECT noteRevisionId, content, utcDateModified FROM note_revision_contents WHERE noteRevisionId = ?`, [noteRevisionId]);
const row = sql.getRow<NoteRevisionContents>(`SELECT noteRevisionId, content, utcDateModified FROM note_revision_contents WHERE noteRevisionId = ?`, [noteRevisionId]);
const blobId = utils.hashedBlobId(row.content);
if (!existingBlobIds.has(blobId)) {
@@ -44,7 +57,7 @@ module.exports = () => {
sql.execute("UPDATE entity_changes SET entityName = 'blobs', entityId = ? WHERE entityName = 'note_revision_contents' AND entityId = ?", [blobId, row.noteRevisionId]);
} else {
// duplicates
sql.execute("DELETE FROM entity_changes WHERE entityName = 'note_revision_contents' AND entityId = ?", [row.noteId]);
sql.execute("DELETE FROM entity_changes WHERE entityName = 'note_revision_contents' AND entityId = ?", [row.noteRevisionId]);
}
sql.execute("UPDATE note_revisions SET blobId = ? WHERE noteRevisionId = ?", [blobId, row.noteRevisionId]);

View File

@@ -1,15 +1,15 @@
module.exports = () => {
const beccaLoader = require("../../src/becca/becca_loader");
const becca = require("../../src/becca/becca");
const cls = require("../../src/services/cls");
const log = require("../../src/services/log");
const sql = require("../../src/services/sql");
import becca from "../../src/becca/becca";
import becca_loader from "../../src/becca/becca_loader";
import cls from "../../src/services/cls";
import log from "../../src/services/log";
import sql from "../../src/services/sql";
export default () => {
cls.init(() => {
// emergency disabling of image compression since it appears to make problems in migration to 0.61
sql.execute(`UPDATE options SET value = 'false' WHERE name = 'compressImages'`);
beccaLoader.load();
becca_loader.load();
for (const note of Object.values(becca.notes)) {
try {

8132
docs/User Guide/!!!meta.json Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,2 @@
# User Guide
The sub-children of this note are automatically synced.

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

View File

@@ -0,0 +1,9 @@
# Advanced Showcases
Trilium offers advanced functionality through [Scripts](../Note%20Types/Code/Scripts.md) and [Promoted Attributes](Attributes/Promoted%20Attributes.md). To illustrate these features, we've prepared several showcases available in the [demo notes](Database.md):
* [Relation Map](Relation%20Map.md)
* [Day Notes](Advanced%20Showcases/Day%20Notes.md)
* [Weight Tracker](Advanced%20Showcases/Weight%20Tracker.md)
* [Task Manager](Advanced%20Showcases/Task%20Manager.md)
It's important to note that these examples are not natively supported by Trilium out of the box; instead, they demonstrate what you can build within Trilium.

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

View File

@@ -0,0 +1,59 @@
# Day Notes
A common pattern in note-taking is that a lot of notes will be centered around a certain date - e.g. you have some tasks which needs to be done on a certain date, you have meeting minutes from a certain date, you have your thoughts etc. and it all revolves around a date on which they occurred. For this reason, it makes sense to create a certain "day workspace" which will centralize all those notes relevant for a certain date.
For this, Trilium provides a concept of "day note". Trilium semi-automatically generates a single note for each day. Under this note you can save all those relevant notes.
Select an existing day note, and the menubar contains a calendar widget. Select any day to create a note for that day. 
![](1_Day%20Notes_image.png)
This pattern works well also because of [Cloning Notes](../../Basic%20Concepts/Note/Cloning%20Notes.md) functionality - note can appear in multiple places in the note tree, so besides appearing under day note, it can also be categorized into other notes.
## Demo
![](Day%20Notes_image.png)
You can see the structure of day notes appearing under "Journal" note - there's a note for the whole year 2017, under it, you have "12 - December" which then contains "18 - Monday". This is our "day note" which contains some text in its content and also has some child notes (some of them are from [Task manager](Task%20Manager.md)).
You can also notice how this day note has [promoted attribute](../Attributes/Promoted%20Attributes.md) "weight" where you can track your daily weight. This data is then used in [Weight tracker](Weight%20Tracker.md).
## Templates
Trilium provides [template](../Attributes/Template.md) functionality, and it could be used together with day notes.
You can define one of the following relations on the root of the journal (identified by `#calendarRoot` label):
* yearTemplate
* monthTemplate
* dateTemplate
All of these are relations. When Trilium creates a new note for year or month or date, it will take a look at the root and attach a corresponding `~template` relation to the newly created role. Using this, you can e.g. create your daily template with e.g. checkboxes for daily routine etc.
## Date pattern
It's possible to customize the title of generated date notes by defining a `#datePattern` label on a root calendar note (identified by `#calendarRoot` label). Following are possible values:
* `{dayInMonthPadded} - {weekDay}` day notes are named e.g. "24 - Monday"
* `{dayInMonthPadded}: {weekDay3}` day notes are named e.g. "24: Mon"
* `{dayInMonthPadded}: {weekDay2}` day notes are named e.g. "24: Mo"
* `{isoDate} - {weekDay}` day notes are named e.g. "2020-12-24 - Monday"
* `{ordinal}` is replaced with the ordinal date (e.g. 1st, 2nd, 3rd) etc.
## Month pattern
It is also possible to customize the title of generated month notes through the `#monthPattern` attribute, much like `#datePattern`. The options are:
* `{monthNumberPadded}` results in a number like `09` for September, and `11` for November
* `{month}` results in the full month name (e.g. `September` or `October`)
* `{shortMonth3}` is replaced with the first 3 letters of the month, e.g. Jan, Feb, etc.
* `{shortMonth4}` is replaced with the first 4 letters of the month, e.g. Sept, Octo, etc.
The default is `{monthNumberPadded} - {month}`
## Implementation
Trilium has some special support for day notes in the form of [backend Script API](https://triliumnext.github.io/Notes/backend_api/BackendScriptApi.html) - see e.g. getDayNote() function.
Day (and year, month) notes are created with a label - e.g. `#dateNote="2018-08-16"` this can then be used by other scripts to add new notes to day note etc.
Journal also has relation `child:child:child:template=Day template` (see \[\[attribute inheritance\]\]) which effectively adds \[\[template\]\] to day notes (grand-grand-grand children of Journal).

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

View File

@@ -0,0 +1,63 @@
# Task Manager
Task Manager is a [promoted attributes](../Attributes/Promoted%20Attributes.md) and [scripts](../../Note%20Types/Code/Scripts.md)showcase present in the [demo notes](../Database.md).
## Demo
![](../../Attachments/task-manager.png)
Task Manager manages outstanding (TODO) tasks and finished tasks (non-empty doneDate attribute). Outstanding tasks are further categorized by location and arbitrary tags - whenever you change tag attribute in the task note, this task is then automatically moved to appropriate location.
Task Manager also integrates with [day notes](Day%20Notes.md) - notes are [cloned](../../Basic%20Concepts/Note/Cloning%20Notes.md) into day note to both todoDate note and doneDate note (with [prefix](../../Basic%20Concepts/Navigation/Tree%20Concepts.md) of either "TODO" or "DONE").
## Implementation
New tasks are created in the TODO note which has `~child:template` [relation](../Attributes.md)(see [attribute inheritance](../Attributes/Attribute%20Inheritance.md)) pointing to the task template.
### Attributes
Task template defines several [promoted attributes](../Attributes/Promoted%20Attributes.md) - todoDate, doneDate, tags, location. Importantly it also defines `~runOnAttributeChange` relation - [event](../../Note%20Types/Code/Events.md) handler which is run on attribute change. This [script](../../Note%20Types/Code/Scripts.md) handles when e.g. we fill out the doneDate attribute - meaning the task is done and should be moved to "Done" note and removed from TODO, locations and tags.
### New task button
There's also "button" note which contains simple script which adds a button to create new note (task) in the TODO note.
```
api.addButtonToToolbar({
title: 'New task',
icon: 'check',
shortcut: 'alt+n',
action: async () => {
// creating notes is backend (server) responsibility so we need to pass
// the control there
const taskNoteId = await api.runOnBackend(async () => {
const todoRootNote = await api.getNoteWithLabel('taskTodoRoot');
const {note} = await api.createNote(todoRootNote.noteId, 'new task', '');
return note.noteId;
});
// we got an ID of newly created note and we want to immediatelly display it
await api.activateNewNote(taskNoteId);
}
});
```
### CSS
In the demo screenshot above you may notice that TODO tasks are in red color and DONE tasks are green.
This is done by having this CSS [code note](../../Note%20Types/Code.md) which defines extra CSS classes:
```
span.fancytree-node.todo .fancytree-title {
color: red !important;
}
span.fancytree-node.done .fancytree-title {
color: green !important;
}
```
This [code note](../../Note%20Types/Code.md) has `#appCss` [label](../Attributes.md)which is recognized by Trilium on startup and loaded as CSS into the application.
Second part of this functionality is based in event handler described above which assigns `#cssClass` label to the task to either "done" or "todo" based on the task status.

View File

@@ -0,0 +1,70 @@
# Weight Tracker
![](Weight%20Tracker_image.png)
The `Weight Tracker` is a [Script API](../../Note%20Types/Code/Script%20API.md) showcase present in the [demo notes](../Database.md).
By adding `weight` as a [promoted attribute](../Attributes/Promoted%20Attributes.md) in the [template](../Attributes/Template.md) from which [day notes](Day%20Notes.md) are created, you can aggregate the data and plot weight change over time.
## Implementation
The `Weight Tracker` note in the screenshot above is of the type `Render Note`. That type of note doesn't have any useful content itself. Instead it is a placeholder where a [script](../../Note%20Types/Code/Scripts.md) can render its output.
Scripts for `Render Notes` are defined in a [relation](../Attributes.md) called `~renderNote`. In this example, it's the `Weight Tracker`'s child `Implementation`. The Implementation consists of two [code notes](../../Note%20Types/Code.md) that contain some HTML and JavaScript respectively, which load all the notes with a `weight` attribute and display their values in a chart.
To actually render the chart, we're using a third party library called [chart.js](https://www.chartjs.org/)which is imported as an attachment, since it's not built into Trilium.
### Code
Here's the content of the script which is placed in a [code note](../../Note%20Types/Code.md) of type `JS Frontend`:
```
async function getChartData() {
const days = await api.runOnBackend(async () => {
const notes = api.getNotesWithLabel('weight');
const days = [];
for (const note of notes) {
const date = note.getLabelValue('dateNote');
const weight = parseFloat(note.getLabelValue('weight'));
if (date && weight) {
days.push({ date, weight });
}
}
days.sort((a, b) => a.date > b.date ? 1 : -1);
return days;
});
const datasets = [
{
label: "Weight (kg)",
backgroundColor: 'red',
borderColor: 'red',
data: days.map(day => day.weight),
fill: false,
spanGaps: true,
datalabels: {
display: false
}
}
];
return {
datasets: datasets,
labels: days.map(day => day.date)
};
}
const ctx = $("#canvas")[0].getContext("2d");
new chartjs.Chart(ctx, {
type: 'line',
data: await getChartData()
});
```
## How to remove the Weight Tracker button from the top bar
In the link map of the `Weight Tracker`, there is a note called `Button`. Open it and delete or comment out its contents. The `Weight Tracker` button will disappear after you restart Trilium.

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

View File

@@ -0,0 +1,82 @@
# Attributes
In Trilium, attributes are key-value pairs assigned to notes, providing additional metadata or functionality. There are two primary types of attributes:
1. **Labels**: Simple key-value text records
2. **Relations**: Named links to other notes
These attributes play a crucial role in organizing, categorising, and enhancing the functionality of notes.
![](Attributes_image.png)
## Labels
Labels in Trilium can be used for a variety of purposes:
* **Metadata**: Assign labels with optional values for categorization, such as `#year=1999`, `#genre="sci-fi"`, or `#author="Neal Stephenson"`
* **Configuration**: Labels can configure advanced features or settings
* **Scripts and Plugins**: Used to tag notes with special metadata, such as the "weight" attribute in the [Weight Tracker](Advanced%20Showcases/Weight%20Tracker.md)
Labels are also searchable, enhancing note retrieval.
### Common Labels for Advanced Configuration
* `**disableVersioning**`: Disables automatic versioning, ideal for large, unimportant notes like script libraries
* `**versioningLimit**`: Used to limit the number of revisions for a single note
* `**calendarRoot**`: Marks the note as the root for [day notes](Advanced%20Showcases/Day%20Notes.md). Only one note should carry this label
* `**archived**`: Hides notes from default search results and dialogs
* `**excludeFromExport**`: Excludes notes and their subtrees from export operations
* `**run**`: Specifies events to trigger scripts (e.g., `frontendStartup`, `hourly`)
* `**runAtHour**`: Defines specific hours for scripts to run, used with `#run=hourly`
* `**disableInclusion**`: Prevents a script from being included in parent script executions
* `**sorted**`: Automatically sorts child notes alphabetically by title
* `**top**`: Keeps the note at the top of its parent's list, useful with `sorted`
* `**hidePromotedAttributes**`: Hides certain attributes in the note's display
* `**readOnly**`: Sets the note to read-only mode, applicable to text and code notes
* `**autoReadOnlyDisabled**`: Disables automatic read-only mode for large notes
* `**appCss**`: Marks CSS notes used to modify Triliums appearance
* `**appTheme**`: Marks full CSS themes available in Trilium's options
* `**cssClass**`: Adds a CSS class to the note's representation in the tree
* `**iconClass**`: Adds a CSS class to the note's icon, useful for distinguishing notes visually. See [note icons](../Basic%20Concepts/Note/Note%20Icons.md)
* `**pageSize**`: Specifies the number of items per page in note listings
* `**customRequestHandler**` **and** `**customResourceProvider**`: Refer to [Custom request handler](Custom%20Request%20Handler.md)
* `**widget**`: Marks a note as a custom widget, added to Trilium's component tree
* `**workspace**` **and related attributes**: See [Workspace](../Basic%20Concepts/Navigation/Workspace.md) for more details
* `**searchHome**`: Specifies the parent for new search notes
* `**inbox**`: Designates a default location for new notes created via the sidebar
* `**sqlConsoleHome**`: Default location for SQL console notes
* `**bookmarked**` **and** `**bookmarkFolder**`: See [Bookmarks](../Basic%20Concepts/Navigation/Bookmarks.md)
* `**shareXXX**`: See [Sharing](Sharing.md)
* `**keyboardShortcut**`: Assigns a keyboard shortcut to open the note
* `**displayRelations**` **and** `**hideRelations**`: Manages the display of note relations
* `**titleTemplate**`: See [Default note title](Default%20Note%20Title.md)
* `**template**`: Makes the note available as a template
* `**toc**`: Controls the visibility of the table of contents
* `**color**`: Defines the color of the note in the tree and links
* `**hideChildrenOverview**`: Hides child notes in the parent note's editor
* `**viewType**`: Sets the view of child notes (grid or list)
## Relations
Relations define connections between notes, similar to links.
### Uses
* **Metadata Relationships**: For example, linking a book note to an author note
* **Scripting**: Attaching scripts to events or conditions related to the note
### Common Relations
* **Event-based Relations**: Such as `runOnNoteCreation` or `runOnNoteChange`, which trigger scripts on specific actions
* **Other Relations**: Include `template`, `renderNote`, `widget`, and sharing-related relations
## Multiplicity
Attributes in Trilium can be "multivalued", meaning multiple attributes with the same name can coexist.
## Attribute Definitions and Promoted Attributes
Special labels create "label/attribute" definitions, enhancing the organization and management of attributes. For more details, see [Promoted attributes](Attributes/Promoted%20Attributes.md).
## Attribute Inheritance
Trilium supports attribute inheritance, allowing child notes to inherit attributes from their parents. For more information, see [Attribute inheritance](Attributes/Attribute%20Inheritance.md).

View File

@@ -0,0 +1,25 @@
# Attribute Inheritance
## 1\. Standard Inheritance
In Trilium, attributes can be automatically inherited by child notes if they have the `isInheritable` flag set to `true`. This means the attribute (a key-value pair) is applied to the note and all its descendants.
### Example Use Case
The `archived` label can be set to be inheritable, allowing you to hide a whole subtree of notes from searches and other dialogs by applying this label at the top level.
## 2\. Copying Inheritance
Copying inheritance differs from standard inheritance by using a `child:` prefix in the attribute name. This prefix causes new child notes to automatically receive specific attributes from the parent note. These attributes are independent of the parent and will persist even if the note is moved elsewhere.
### How to Use
* **Syntax:** `#child:attributeName`
* **Chained Inheritance:** You can chain this inheritance, such as `#child:child:attributeName`, where each child down the hierarchy receives the appropriate attribute.
### Example
If a parent note has the label `#child:exampleAttribute`, all newly created child notes will inherit the `#exampleAttribute` label. This can be useful for setting default properties for notes in a specific section.
## 3\. Template Inheritance
Attributes can also be inherited from [templates](Template.md). When a new note is created using a template, it inherits the attributes defined in that template. This is particularly useful for maintaining consistency across notes that follow a similar structure or function.

View File

@@ -0,0 +1,32 @@
# Promoted Attributes
Promoted attributes are [attributes](../Attributes.md) which are considered important and thus are "promoted" onto the main note UI. See example below:
![](../../Attachments/promoted-attributes.png)
You can see the note having kind of form with several fields. Each of these is just regular attribute, the only difference is that they appear on the note itself.
Attributes can be pretty useful since they allow for querying and script automation etc. but they are also inconveniently hidden. This allows you to select few of the important ones and push them to the front of the user.
Now, how do we make attribute to appear on the UI?
## Attribute definition
Attribute is always name-value pair where both name and value are strings.
_Attribute definition_ specifies how should this value be interpreted - is it just string, or is it a date? Should we allow multiple values or note? And importantly, should we _promote_ the attribute or not?
![](Promoted%20Attributes_image.png)
You can notice tag attribute definition. These "definition" attributes define how the "value" attributes should behave.
So there's one attribute for value and one for definition. But notice how definition attribute is [Inheritable](Attribute%20Inheritance.md), meaning that it's also applied to all descendant note. So in a way, this definition is used for the whole subtree while "value" attributes are applied only for this note.
### Inverse relation
Some relations always occur in pairs - my favorite example is on the family. If you have a note representing husband and note representing wife, then there might be a relation between those two of `isPartnerOf`. This is bidirectional relationship - meaning that if a relation is pointing from husband to wife then there should be always another relation pointing from wife to husband.
Another example is with parent - child relationship. Again these always occur in pairs, but in this case it's not exact same relation - the one going from parent to child might be called `isParentOf` and the other one going from child to parent might be called `isChildOf`.
Relation definition allows you to specify such "inverse relation" - for the relation you just define you specify which is the inverse relation. Note that in the second example we should have two relation definitions - one for `isParentOf` which defines `isChildOf` as inverse relation and then second relation definition for `isChildOf` which defines `isParentOf` as inverse relation.
What this does internally is that whenever we save a relation which has defined inverse relation, we check that this inverse relation exists on the relation target note. Similarly, when we delete relation, we also delete inverse relation on the target note.

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

View File

@@ -0,0 +1,36 @@
# Template
A template in Trilium serves as a predefined structure for other notes, referred to as instance notes. Assigning a template to a note brings three main effects:
1. **Attribute Inheritance**: All attributes from the template note are [inherited](Attribute%20Inheritance.md) by the instance notes. Even attributes with `#isInheritable=false` are inherited by the instance notes, although only inheritable attributes are further inherited by the children of the instance notes.
2. **Content Duplication**: The content of the template note is copied to the instance note, provided the instance note is empty at the time of template assignment.
3. **Child Note Duplication**: All child notes of the template are deep-duplicated to the instance note.
## Example
A typical example would be a "Book" template note, which might include:
* **Promoted Attributes**: Such as publication year, author, etc. (see [promoted attributes](Promoted%20Attributes.md)).
* **Outline**: An outline for a book review, including sections like themes, conclusion, etc.
* **Child Notes**: Additional notes for highlights, summary, etc.
![Template Example](../../Attachments/template.png)
## Instance Note
An instance note is a note related to a template note. This relationship means the instance note's content is initialized from the template, and all attributes from the template are inherited.
To create an instance note through the UI:
![show child note templates](../../Attachments/template-create-instance-n.png)
For the template to appear in the menu, the template note must have the `#template` label. Do not confuse this with the `~template` relation, which links the instance note to the template note. If you use [workspaces](../../Basic%20Concepts/Navigation/Workspace.md), you can also mark templates with `#workspaceTemplate` to display them only in the workspace.
Templates can also be added or changed after note creation by creating a `~template` relation pointing to the desired template note.
## Additional Notes
From a visual perspective, templates can define `#iconClass` and `#cssClass` attributes, allowing all instance notes (e.g., books) to display a specific icon and CSS style.
Explore the concept further in the [demo notes](../Database.md), including examples like the [Relation Map](../Relation%20Map.md), [Task Manager](../Advanced%20Showcases/Task%20Manager.md), and [Day Notes](../Advanced%20Showcases/Day%20Notes.md).
Additionally, see [default note title](../Default%20Note%20Title.md) for creating title templates. Note templates and title templates can be combined by creating a `#titleTemplate` for a template note.

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

View File

@@ -0,0 +1,16 @@
# Bulk actions
### Execute script
For more complex scenarios, it is possible to type in a JavaScript expression in order to apply the necessary changes.
To apply a suffix (`- suffix` in this example), to the note title:
```javascript
note.title = note.title + " - suffix";
```
To alter attributes of a note in a bulk action, such as setting the `#shareAlias` label to the title of the note:
```javascript
note.setLabel("shareAlias", note.title)
```

View File

@@ -0,0 +1,30 @@
# Configuration (config.ini or environment variables)
Trilium supports configuration via a file named `config.ini` and environment variables. Please review the file named [config-sample.ini](https://github.com/TriliumNext/Notes/blob/develop/config-sample.ini) in the [Notes](https://github.com/TriliumNext/Notes) repository to see what values are supported.
You can provide the same values via environment variables instead of the `config.ini` file, and these environment variables use the following format:
1. Environment variables should be prefixed with `TRILIUM_` and use underscores to represent the INI section structure.
2. The format is: `TRILIUM_<SECTION>_<KEY>=<VALUE>`
3. The environment variables will override any matching values from config.ini
For example, if you have this in your config.ini:
```
[Network]
host=localhost
port=8080
```
You can override these values using environment variables:
```
TRILIUM_NETWORK_HOST=0.0.0.0
TRILIUM_NETWORK_PORT=9000
```
The code will:
1. First load the `config.ini` file as before
2. Then scan all environment variables for ones starting with `TRILIUM_`
3. Parse these variables into section/key pairs
4. Merge them with the config from the file, with environment variables taking precedence

View File

@@ -0,0 +1,88 @@
# Custom Request Handler
Trilium provides a mechanism for [scripts](../Note%20Types/Code/Scripts.md) to open a public REST endpoint. This opens a way for various integrations with other services - a simple example would be creating new note from Slack by issuing a slash command (e.g. `/trilium buy milk`).
## Create note from outside Trilium
Let's take a look at an example. The goal is to provide a REST endpoint to which we can send title and content and Trilium will create a note.
We'll start with creating a JavaScript backend [code note](../Note%20Types/Code.md) containing:
```
const {req, res} = api;
const {secret, title, content} = req.body;
if (req.method == 'POST' && secret === 'secret-password') {
// notes must be saved somewhere in the tree hierarchy specified by a parent note.
// This is defined by a relation from this code note to the "target" parent note
// alternetively you can just use constant noteId for simplicity (get that from "Note Info" dialog of the desired parent note)
const targetParentNoteId = api.currentNote.getRelationValue('targetNote');
const {note} = api.createTextNote(targetParentNoteId, title, content);
const notePojo = note.getPojo();
res.status(201).json(notePojo);
}
else {
res.send(400);
}
```
This script note has also following two attributes:
* label `#customRequestHandler` with value `create-note`
* relation `~targetNote` pointing to a note where new notes should be saved
### Explanation
Let's test this by using an HTTP client to send a request:
```
POST http://my.trilium.org/custom/create-note
Content-Type: application/json
{
"secret": "secret-password",
"title": "hello",
"content": "world"
}+++++++++++++++++++++++++++++++++++++++++++++++
```
Notice the `/custom` part in the request path - Trilium considers any request with this prefix as "custom" and tries to find a matching handler by looking at all notes which have `customRequestHandler` [label](Attributes.md). Value of this label then contains a regular expression which will match the request path (in our case trivial regex "create-note").
Trilium will then find our code note created above and execute it. `api.req`, `api.res` are set to [request](https://expressjs.com/en/api.html#req) and [response](https://expressjs.com/en/api.html#res)objects from which we can get details of the request and also respond.
In the code note we check the request method and then use trivial authentication - keep in mind that these endpoints are by default totally unauthenticated, and you need to take care of this yourself.
Once we pass these checks we will just create the desired note using [Script API](../Note%20Types/Code/Script%20API.md).
## Custom resource provider
Another common use case is that you want to just expose a file note - in such case you create label `customResourceProvider` (value is again path regex).
For more information, see [Custom Resource Providers](Custom%20Resource%20Providers.md).
## Advanced concepts
`api.req` and `api.res` are Express.js objects - you can always look into its [documentation](https://expressjs.com/en/api.html) for details.
### Parameters
REST request paths often contain parameters in the URL, e.g.:
```
http://my.trilium.org/custom/notes/123
```
The last part is dynamic so the matching of the URL must also be dynamic - for this reason the matching is done with regular expressions. Following `customRequestHandler` value would match it:
```
notes/([0-9]+)
```
Additionally, this also defines a matching group with the use of parenthesis which then makes it easier to extract the value. The matched groups are available in `api.pathParams`:
```
const noteId = api.pathParams[0];
```
Often you also need query params (as in e.g. `http://my.trilium.org/custom/notes?noteId=123`), you can get those with standard express `req.query.noteId`.

View File

@@ -0,0 +1,34 @@
# Custom Resource Providers
A custom resource provider allows any file imported into Trilium (images, fonts, stylesheets) to be publicly accessible via a URL.
A potential use case for this is to add embed a custom font alongside a theme.
## Steps for creating a custom resource provider
1. Import a file such as an image or a font into Trilium by drag & drop.
2. Select the file and go to the _Owned Attributes_ section.
3. Add the label `#customResourceProvider=hello`.
4. To test if it is working, use a browser to navigate to `<protocol>://<host>/custom/hello` (where `<protocol>` is either `http` or `https` based on your setup, and `<host>` is the host or IP to your Trilium server instance). If you are running the TriliumNext application without a server, use `http://localhost:37840` as the base URL.
5. If everything went well, at the previous step the browser should have downloaded the file uploaded in the first step.
Instead of `hello`, the name can be:
* A path, such as `fonts/Roboto.ttf`, which would be accessible via `<host>/custom/fonts/Roboto.ttf`.
* As a more advanced use case, a regular expression to match multiple routes, such as `hello/.*` which will be accessible via `/custom/hello/1`, `/custom/hello/2`, `/custom/hello/world`, etc.
## Using it in a theme
For example, if you have a custom font to be imported by the theme, first upload a font file into Trilium and assign it the `#customResourceProvider=fonts/myfont.ttf` attribute.
Then modify the theme CSS to point to:
```css
@font-face {
font-family: customFont;
src: url("/custom/fonts/myfont.ttf");
}
div {
font-family: customFont;
}
```

View File

@@ -0,0 +1,37 @@
# Database
Your Trilium data is stored in a [SQLite](https://www.sqlite.org) database which contains all notes, tree structure, metadata, and most of the configuration. The database file is named `document.db` and is stored in the application's default [Data directory](../Installation%20%26%20Setup/Data%20directory.md).
## Demo Notes
When you run Trilium for the first time, it will generate a new database containing demo notes. These notes showcase its many features, such as:
* [Relation Map](Relation%20Map.md)
* [Day Notes](Advanced%20Showcases/Day%20Notes.md)
* [Weight Tracker](Advanced%20Showcases/Weight%20Tracker.md)
* [Task Manager](Advanced%20Showcases/Task%20Manager.md)
* [Custom CSS Themes](../Basic%20Concepts/Themes.md)
### Restoring Demo Notes
There are some cases in which you may want to restore the original demo notes. For example, if you experimented with some of the more advanced features and want to see the original reference, or if you simply want to explore the latest version of the demo notes, which might showcase new features.
You can easily restore the demo notes by using Trilium's built-in import feature by importing them:
* Download [this .zip archive](https://github.com/TriliumNext/Notes/raw/develop/db/demo.zip) with the latest version of the demo notes
* Right click on any note in your tree under which you would like the demo notes to be imported
* Click "Import into note"
* Select the .zip archive to import it
## Manually Modifying the Database
Trilium provides a lot of flexibility, and with it, opportunities for advanced users to tweak it. If you need to explore or modify the database directly, you can use a tool such as [SQLite Browser](https://sqlitebrowser.org/) to work directly on the database file.
See [Manually altering the database](Database/Manually%20altering%20the%20database.md) for more information.
## How to Reset the Database
If you are experimenting with Trilium and want to return it to its original state, you can do that by deleting the current database. When you restart the application, it will generate a new database containing the original demo notes.
To delete the database, simply go to the [data directory](../Installation%20%26%20Setup/Data%20directory.md) and delete the `document.db` file (and any other files starting with `document.db`).
If you do not need to preserve any configurations that might be stored in the `config.ini` file, you can just delete all of the [data directory's](../Installation%20%26%20Setup/Data%20directory.md) contents to fully restore the application to its original state. You can also review the [configuration](Configuration%20\(config.ini%20or%20e.md) file to provide all `config.ini` values as environment variables instead.

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 KiB

View File

@@ -0,0 +1,42 @@
# Manually altering the database
There are some situations where modifying the SQLite database that Trilium uses is desirable.
If you are doing any advanced development or troubleshooting where you manually modify the database, you might want to consider creating backups of your `document.db` file.
## Modifying it internally using the SQL Console
The SQL Console is Trilium's built-in database editor.
See [SQL Console](Manually%20altering%20the%20database/SQL%20Console.md).
## Externally modifying the database
Sometimes the SQL Console cannot be used (for example if the application cannot start).
When making external modifications, consider closing the desktop application. If modifying the server database, then stop the service or Docker container.
### Using DB Browser for SQLite
DB Browser for SQLite is a cross-platform editor that can be used to alter the database using a graphical user interface.
To do so:
1. In the main menu, select File → Open database… and navigate to the database in the [Data directory](../../Installation%20%26%20Setup/Data%20directory.md).
2. Select the _Execute SQL_ tab.
3. Type in the desired SQL statement.
4. Press the "Play" button in the toolbar underneath the "Execute SQL" tab (or F5 key).
5. Press "Write Changes" in the main toolbar.
6. Close the application or close the database.
![](Manually%20altering%20the%20data.png)
### Using the SQLite CLI
First, start the SQLite 3 CLI by specifying the path to the database:
```
sqlite3 ~/.local/share/trilium-data/document.db
```
* In the prompt simply type the statement and make sure it ends with a `;` character.
* To exit, simply type `.quit` and enter.

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 508 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 542 B

View File

@@ -0,0 +1,28 @@
# SQL Console
The SQL Console is Trilium's built-in database editor.
It can be accessed by going to the [global menu](../../../Basic%20Concepts/UI%20Elements) → Advanced → Open SQL Console.
![](SQL%20Console_image.png)
### Interaction
* Hovering the mouse over one of the tables listed at the top of the document will show the columns and their data type.
* Only one SQL statement can be run at once.
* To run the statement, press the ![](3_SQL%20Console_image.png)icon.
* For queries that return a result, the data will displayed in a table.
![](1_SQL%20Console_image.png)
### Saved SQL console
SQL queries or commands can be saved into a dedicated note.
To do so, simply write the query and press the ![](2_SQL%20Console_image.png)button. Once saved, the note will appear in [Day Notes](../../Advanced%20Showcases/Day%20Notes.md).
* The SQL expression will not be displayed by default, but it can still be viewed by going to the note context menu and selecting _Note source_.
* The expression cannot be modified. If needed, recreate it by copying the statement back into the SQL console and then saving it again.

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

View File

@@ -0,0 +1,30 @@
# Default Note Title
When a new note is created, its name is by default "new note". In some cases, it can be desirable to have a different or even a dynamic default note title.
For this use case, Trilium (since v0.52) supports `#titleTemplate` [label](Attributes.md). You can create such a label for a given note, assign it a value, and this value will be used as a default title when creating child notes. As with other labels, you can make it inheritable to apply recursively, and you can even place it on the root note to have it applied globally everywhere.
As an example use case, imagine you collect books you've read in a given year like this:
* 2022 Books
* Neal Stephenson: Anathem, 2008
* Franz Kafka: Die Verwandlung, 1915
Now, to the parent note "2022 Books" you can assign label `#titleTemplate="[Author name]: [Book title], [Publication year]"`.
And all children of "2022 Books" will be created with initial title "\[Author name\]: \[Book title\], \[Publication year\]". There's no artificial intelligence here, the idea is to just prompt you to manually fill in the pieces of information into the note title by yourself.
## Dynamic value
The value of `#titleTemplate` is evaluated at the point of note's creation as a JavaScript string, which means it can be enriched with the help of JS string interpolation with dynamic data.
As an example, imagine you collect server outage incidents and write some notes. It looks like this:
* Incidents
* 2022-05-09: System crash
* 2022-05-15: Backup delay
You can automatize the date assignment by assigning a label `#titleTemplate="${now.format('YYYY-MM-DD')}: "` to the parent note "Incidents". Whenever a new child note is created, the title template is evaluated with the injected [now](https://day.js.org/docs/en/display/format) object.
Second variable injected is [parentNote](https://triliumnext.github.io/Notes/backend_api/BNote.html), an example could be `#titleTemplate="${parentNote.getLabelValue('authorName')}'s literary works"`.
See also \[\[[template](Attributes/Template.md)\]\] which provides similar capabilities, including default note's content.

View File

@@ -0,0 +1,28 @@
# ETAPI (REST API)
ETAPI is Trilium's public/external REST API. It is available since Trilium v0.50.
The documentation is in OpenAPI format, available [here](https://github.com/TriliumNext/Notes/blob/master/src/etapi/etapi.openapi.yaml).
[trilium-py](https://github.com/Nriver/trilium-py) is a third-party Python implementation for ETAPI client, you can use Python to communicate with Trilium.
## Authentication
All operations have to be authenticated using a token. You can get this token either from Options -> ETAPI or programmatically using the `/auth/login` REST call (see the [spec](https://github.com/TriliumNext/Notes/blob/master/src/etapi/etapi.openapi.yaml)):
```
GET https://myserver.com/etapi/app-info
Authorization: ETAPITOKEN
```
Alternatively, since 0.56 you can also use basic auth format:
```
GET https://myserver.com/etapi/app-info
Authorization: Basic BATOKEN
```
* Where `BATOKEN = BASE64(username + ':' + password)` - this is a standard Basic Auth serialization
* Where `username` is "etapi"
* And `password` is the generated ETAPI token described above.
Basic Auth is meant to be used with tools which support only basic auth.

View File

@@ -0,0 +1,25 @@
# Note Map
Note map is a visualisation of connections between notes.
This provides an insight into a structure ("web") of notes.
There are two types of note map:
## Link Map
Shows [relations](Attributes.md) between notes:
![](1_Note%20Map_image.png)
## Tree Map
Shows hierarchical map of notes:
![](Note%20Map_image.png)
## See also
[Relation map](Relation%20Map.md) is a similar concept, with some differences:
* note map is automatically generated while relation map must be created manually
* relation map is a type of note while a link map is just virtual visualization

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

View File

@@ -0,0 +1,49 @@
# Relation Map
Relation map is a type of [note](../Basic%20Concepts/Navigation/Tree%20Concepts.md) which visualizes notes and their [relations](Attributes.md). See an example:
## Development process demo
This is a basic example how you can create simple diagram using relation maps:
![](../Attachments/relation-map-dev-process.png)
And this is how you can create it:
![](Relation%20Map_relation-map-.gif)
We start completely from scratch by first creating new note called "Development process" and changing its type to "Relation map". After that we create new notes one by one and place them by clicking into the map. We also drag [relations](Attributes.md)between notes and name them. That's all!
Items on the map - "Specification", "Development", "Testing" and "Demo" are actually notes which have been created under "Development process" note - you can click on them and write some content. Connections between notes are called "[relations](Attributes.md)".
## Family demo
This is more complicated demo using some advanced concepts. Resulting diagram is here:
![](../Attachments/relation-map-family.png)
This is how you get to it:
![](../Attachments/relation-map-family-demo.gif)
There are several steps here:
* we start with empty relation map and two existing notes representing Prince Philip and Queen Elizabeth II. These two notes already have "isPartnerOf" [relations](Attributes.md)defined.
* There are actually two "inverse" relations (one from Philip to Elizabeth and one from Elizabeth to Philip)
* we drag both notes to relation map and place to suitable position. Notice how the existing "isPartnerOf" relations are displayed.
* now we create new note - we name it "Prince Charles" and place it on the relation map by clicking on the desired position. The note is by default created under the relation map note (visible in the note tree on the left).
* we create two new relations "isChildOf" targeting both Philip and Elizabeth
* now there's something unexpected - we can also see the relation to display another "hasChild" relation. This is because there's a [relation definition](Attributes/Promoted%20Attributes.md) which puts "isChildOf" as an "[inverse](Attributes/Promoted%20Attributes.md)" relation of "hasChildOf" (and vice versa) and thus it is created automatically.
* we create another note for Princess Diana and create "isPartnerOf" relation from Charles. Again notice how the relation has arrows both ways - this is because "isPartnerOf" definition specifies its inverse relation as again "isPartnerOf" so the opposite relation is created automatically.
* as the last step we pan & zoom the map to fit better to window dimensions.
Relation definitions mentioned above come from "Person template" note which is assigned to any child of "My Family Tree" relation note. You can play with the whole thing in the [demo notes](Database.md).
## Details
You can specify which relations should be displayed with comma delimited names of relations in `displayRelations` label.
Alternatively, you can specify comma delimited list of relation names in `hideRelations` which will display all relations, except for the ones defined in the label.
## See also
* [Note map](Note%20Map.md) is a similar concept

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

View File

@@ -0,0 +1,101 @@
# Sharing
Trilium allows you to share selected notes as **publicly accessible** read-only documents. This feature is particularly useful for publishing content directly from your Trilium notes, making it accessible to others online.
## Prerequisites
To use the sharing feature, you must have a [server installation](../Installation%20%26%20Setup/Server%20Installation.md) of Trilium. This is necessary because the notes will be hosted from the server.
## How to Share a Note
1. **Enable Sharing**: To share a note, toggle the `Shared` switch within the note's interface. Once sharing is enabled, an URL will appear, which you can click to access the shared note.
![Share Note](../Attachments/share-single-note.png)
2. **Access the Shared Note**: 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 `localhost (127.0.0.1)`.
![Shared Note Example](../Attachments/share-single-note-web.png)
## Sharing a Note Subtree
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.
![Shared Subtree Example](../Attachments/share-multiple-notes-web.png)
## Viewing All Shared Notes
You can view a list of all shared notes by clicking on "Show Shared Notes Subtree." This allows you to manage and navigate through all the notes you have made public.
## Security Considerations
Shared notes are published on the open internet and can be accessed by anyone with the URL. The URL's randomness does not provide security, so it is crucial not to share sensitive information through this feature.
### Password Protection
To protect shared notes with a username and password, you can use the `#shareCredentials` attribute. Add this label to the note with the format `#shareCredentials="username:password"`. To protect an entire subtree, make sure the label is [inheritable](Attributes/Attribute%20Inheritance.md).
## Advanced Sharing Options
### Customizing the Appearance of Shared Notes
The default shared page is basic in design, but you can customize it using your own CSS:
* **Custom CSS**: Link a CSS [code note](../Note%20Types/Code.md) to the shared page by adding a `~shareCss` 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 `#shareHiddenFromTree` label.
* **Omitting Default CSS**: For extensive styling changes, use the `#shareOmitDefaultCss` label to avoid conflicts with Trilium's [default stylesheet](../Basic%20Concepts/Themes.md).
### Adding JavaScript
You can inject custom JavaScript into the shared note using the `~shareJs` relation. This allows you to access note attributes or traverse the note tree using the `fetchNote()` API, which retrieves note data based on its ID.
Example:
```javascript
const currentNote = await fetchNote();
const parentNote = await fetchNote(currentNote.parentNoteIds[0]);
for (const attr of parentNote.attributes) {
console.log(attr.type, attr.name, attr.value);
}
```
### Creating Human-Readable URL Aliases
Shared notes typically have URLs like `http://domain.tld/share/knvU8aJy4dJ7`, where the last part is the note's ID. You can make these URLs more user-friendly by adding the `#shareAlias` label to individual notes (e.g., `#shareAlias=highlighting`). This will change the URL to `http://domain.tld/share/highlighting`.
**Important**:
1. Ensure that aliases are unique.
2. Using slashes (`/`) within aliases to create subpaths is not supported.
### Viewing and Managing Shared Notes
All shared notes are grouped under an automatically managed "Shared Notes" section. From here, you can view, share, or unshare notes by moving or cloning them within this section.
![Shared Notes List](../Attachments/shared-list.png)
### Setting a Custom Favicon
To customize the favicon for your shared pages, create a relation `~shareFavicon` pointing to a file note containing the favicon (e.g., in `.ico` format).
### Sharing a Note as the Root
You can designate a specific note or folder as the root of your shared content by adding the `#shareRoot` label. This note will be linked when visiting `[http://domain.tld/share](http://domain/share)`, making it easier to use Trilium as a fully-fledged website. Consider combining this with the `#shareIndex` label, which will display a list of all shared notes.
## Additional Options
* **Raw Note Sharing**: Use the `#shareRaw` label to share a note without any HTML wrapper.
* **Disallow Robot Indexing**: Add the `#shareDisallowRobotIndexing` label to prevent search engines from indexing the shared page by including a `noindex, follow` meta tag and `X-Robots-Tag: noindex` header.
* **Shared Notes Index**: For text notes with the `#shareIndex` label, the content will display a list of all shared note roots.
## Limitations
While the sharing feature is powerful, it has some limitations:
* **No Relation Map Support**
* **Book Notes**: Only show a list of child notes.
* **Code Notes**: No syntax highlighting.
* **Static Note Tree**
* **Protected Notes**: Cannot be shared.
* **Include Notes**: Not supported.
Some of these limitations may be addressed in future updates.

View File

@@ -0,0 +1,16 @@
# Serving directly the content of a note
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.
| A note displayed as a web page (HTML) | A note displayed as a raw format |
| --- | --- |
| ![](1_Serving%20directly%20the%20conte.png) | ![](Serving%20directly%20the%20conte.png) |
## By adding an attribute to the note
Simply add the `#shareRaw` attribute and the note will always be rendered _raw_ when accessed from the share URL.
## By altering the URL
Append `?raw` to the URL to display a note in its raw format regardless of whether the `#shareRaw` attribute is added on the note.
![](Serving%20directly%20the%20conte.png)

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 305 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 533 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 179 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 367 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 356 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 145 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 235 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="147px" height="32px" viewBox="0 0 147 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
<!-- Generator: Sketch 3.0.4 (8053) - http://www.bohemiancoding.com/sketch -->
<title>button</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
<g id="button" sketch:type="MSLayerGroup">
<rect id="Background" fill="#7056BF" sketch:type="MSShapeGroup" x="0" y="0" width="147" height="32" rx="4"></rect>
<g id="Icon" transform="translate(10.000000, 8.000000)" fill="#FFFFFF" sketch:type="MSShapeGroup">
<path d="M14.819,3.216 L9.103,0.25 C8.464,-0.082 7.536,-0.081 6.898,0.25 L1.181,3.216 C0.496,3.571 0,4.365 0,5.102 L0,11.035 C0,11.774 0.497,12.566 1.181,12.921 L4.039,14.404 C4.529,14.656 5.134,14.467 5.388,13.978 C5.642,13.487 5.451,12.884 4.961,12.629 L2.106,11.148 C2.068,11.124 2.008,11.039 2,11.035 L1.996,5.143 C2.008,5.098 2.068,5.013 2.103,4.991 L7.816,2.026 C7.897,1.991 8.106,1.992 8.181,2.025 L13.894,4.989 C13.932,5.013 13.992,5.098 14,5.102 L14.003,10.995 C13.992,11.039 13.932,11.124 13.898,11.146 L11.039,12.629 C10.549,12.884 10.358,13.487 10.612,13.978 C10.79,14.32 11.14,14.517 11.501,14.517 C11.656,14.517 11.814,14.481 11.961,14.404 L14.818,12.921 C15.503,12.566 16,11.774 16,11.035 L16,5.102 C16,4.365 15.504,3.571 14.819,3.216" id="App"></path>
<path d="M11.707,9.707 C12.098,9.316 12.098,8.684 11.707,8.293 L8.708,5.294 C8.616,5.201 8.505,5.128 8.382,5.077 C8.138,4.976 7.862,4.976 7.618,5.077 C7.495,5.128 7.385,5.201 7.292,5.294 L4.293,8.293 C3.902,8.684 3.902,9.316 4.293,9.707 C4.488,9.902 4.744,10 5,10 C5.256,10 5.512,9.902 5.707,9.707 L7,8.414 L7,15 C7,15.553 7.447,16 8,16 C8.553,16 9,15.553 9,15 L9,8.414 L10.293,9.707 C10.488,9.902 10.744,10 11,10 C11.256,10 11.512,9.902 11.707,9.707" id="Arrow"></path>
</g>
<path d="M81.393,21.091 C81.744,21.091 82.173,21.052 82.368,21.013 L82.368,20.09 C82.186,20.142 81.913,20.181 81.666,20.181 C80.834,20.181 80.6,19.817 80.6,19.089 L80.6,15.059 L82.381,15.059 L82.381,14.136 L80.6,14.136 L80.6,11.692 L79.482,11.692 L79.482,14.136 L78.286,14.136 L78.286,15.059 L79.482,15.059 L79.482,19.336 C79.482,20.532 79.95,21.091 81.393,21.091 Z M86.697,21.143 C88.374,21.143 89.882,19.921 89.882,17.568 C89.882,15.202 88.374,13.993 86.697,13.993 C85.007,13.993 83.499,15.202 83.499,17.568 C83.499,19.921 85.02,21.143 86.697,21.143 Z M86.697,20.194 C85.306,20.194 84.63,19.024 84.63,17.568 C84.63,16.021 85.384,14.955 86.697,14.955 C88.062,14.955 88.751,16.138 88.751,17.568 C88.751,19.141 87.997,20.194 86.697,20.194 Z M94.705,21 L95.849,21 L95.849,16.463 L100.802,16.463 L100.802,21 L101.946,21 L101.946,11.38 L100.802,11.38 L100.802,15.41 L95.849,15.41 L95.849,11.38 L94.705,11.38 L94.705,21 Z M106.834,21.143 C108.121,21.143 108.992,20.597 109.629,19.687 L108.979,19.115 C108.459,19.83 107.9,20.233 106.912,20.233 C105.781,20.233 104.884,19.401 104.845,17.854 L109.694,17.854 L109.694,17.62 C109.694,15.137 108.459,13.993 106.834,13.993 C105.391,13.993 103.727,15.072 103.727,17.568 C103.727,19.96 105.209,21.143 106.834,21.143 Z M104.871,16.983 C105.027,15.566 105.898,14.929 106.821,14.929 C107.952,14.929 108.537,15.761 108.628,16.983 L104.871,16.983 Z M111.293,21 L112.411,21 L112.411,16.567 C112.918,15.592 113.737,15.02 114.829,15.02 C114.868,15.02 115.115,15.02 115.154,15.033 L115.232,13.993 L115.089,13.993 C113.75,13.993 112.944,14.617 112.437,15.41 L112.411,15.41 L112.411,14.136 L111.293,14.136 L111.293,21 Z M119.301,21.143 C120.978,21.143 122.486,19.921 122.486,17.568 C122.486,15.202 120.978,13.993 119.301,13.993 C117.611,13.993 116.103,15.202 116.103,17.568 C116.103,19.921 117.624,21.143 119.301,21.143 Z M119.301,20.194 C117.91,20.194 117.234,19.024 117.234,17.568 C117.234,16.021 117.988,14.955 119.301,14.955 C120.666,14.955 121.355,16.138 121.355,17.568 C121.355,19.141 120.601,20.194 119.301,20.194 Z M124.072,21 L125.19,21 L125.19,18.894 L126.555,17.425 L128.583,21 L129.779,21 L127.283,16.593 L129.532,14.136 L128.258,14.136 L125.19,17.568 L125.19,11.38 L124.072,11.38 L124.072,21 Z M133.055,21.13 C134.173,21.13 135.031,20.558 135.629,19.973 L135.629,21 L136.76,21 L136.76,14.136 L135.629,14.136 L135.629,19.089 C134.914,19.765 134.238,20.194 133.406,20.194 C132.535,20.194 132.145,19.765 132.145,18.855 L132.145,14.136 L131.027,14.136 L131.027,19.089 C131.027,20.389 131.742,21.13 133.055,21.13 L133.055,21.13 Z" id="to-Heroku" fill="#B7A7D5" sketch:type="MSShapeGroup"></path>
<path d="M34.183,21 L36.718,21 C39.773,21 41.567,19.427 41.567,16.164 C41.567,12.94 39.812,11.38 36.718,11.38 L34.183,11.38 L34.183,21 Z M35.327,19.973 L35.327,12.433 L36.835,12.433 C39.175,12.433 40.423,13.577 40.423,16.164 C40.423,18.842 39.188,19.973 36.861,19.973 L35.327,19.973 Z M46,21.143 C47.287,21.143 48.158,20.597 48.795,19.687 L48.145,19.115 C47.625,19.83 47.066,20.233 46.078,20.233 C44.947,20.233 44.05,19.401 44.011,17.854 L48.86,17.854 L48.86,17.62 C48.86,15.137 47.625,13.993 46,13.993 C44.557,13.993 42.893,15.072 42.893,17.568 C42.893,19.96 44.375,21.143 46,21.143 Z M44.037,16.983 C44.193,15.566 45.064,14.929 45.987,14.929 C47.118,14.929 47.703,15.761 47.794,16.983 L44.037,16.983 Z M50.459,23.6 L51.577,23.6 L51.577,20.116 C52.162,20.727 52.877,21.104 53.722,21.104 C55.399,21.104 56.634,19.947 56.634,17.555 C56.634,15.163 55.412,13.993 53.839,13.993 C52.812,13.993 52.097,14.513 51.577,15.085 L51.577,14.136 L50.459,14.136 L50.459,23.6 Z M53.566,20.194 C52.838,20.194 52.175,19.83 51.577,19.154 L51.577,16.008 C52.149,15.384 52.786,14.955 53.579,14.955 C54.684,14.955 55.516,15.813 55.516,17.568 C55.516,19.388 54.762,20.194 53.566,20.194 Z M58.324,21 L59.442,21 L59.442,11.38 L58.324,11.38 L58.324,21 Z M64.304,21.143 C65.981,21.143 67.489,19.921 67.489,17.568 C67.489,15.202 65.981,13.993 64.304,13.993 C62.614,13.993 61.106,15.202 61.106,17.568 C61.106,19.921 62.627,21.143 64.304,21.143 Z M64.304,20.194 C62.913,20.194 62.237,19.024 62.237,17.568 C62.237,16.021 62.991,14.955 64.304,14.955 C65.669,14.955 66.358,16.138 66.358,17.568 C66.358,19.141 65.604,20.194 64.304,20.194 Z M69.465,23.639 C70.804,23.639 71.337,22.989 71.805,21.78 L74.743,14.136 L73.612,14.136 L71.597,19.687 L71.571,19.687 L69.556,14.136 L68.373,14.136 L71.025,21.039 L70.765,21.715 C70.492,22.391 70.154,22.69 69.452,22.69 C68.971,22.69 68.633,22.625 68.438,22.573 L68.178,23.47 C68.477,23.561 68.854,23.639 69.465,23.639 L69.465,23.639 Z" id="Deploy" fill="#FFFFFF" sketch:type="MSShapeGroup"></path>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 222 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 332 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 309 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 714 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 200 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 562 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 178 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 211 KiB

Some files were not shown because too many files have changed in this diff Show More