Skip to content

Commit 7333765

Browse files
authored
Merge branch 'develop' into renovate/csrf-csrf-4.x
2 parents bc910f3 + 8486136 commit 7333765

34 files changed

+1029
-108
lines changed

README.md

+80-67
Original file line numberDiff line numberDiff line change
@@ -1,109 +1,122 @@
1-
# Trilium
1+
# TriliumNext Notes
22

3-
<a alt="Nx logo" href="https://nx.dev" target="_blank" rel="noreferrer"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-logo.png" width="45"></a>
3+
![GitHub Sponsors](https://img.shields.io/github/sponsors/eliandoran) ![Docker Pulls](https://img.shields.io/docker/pulls/triliumnext/notes) ![GitHub Downloads (all assets, all releases)](https://img.shields.io/github/downloads/triliumnext/notes/total)
44

5-
✨ Your new, shiny [Nx workspace](https://nx.dev) is ready ✨.
5+
[English](./README.md) | [Chinese](./docs/README-ZH_CN.md) | [Russian](./docs/README.ru.md) | [Japanese](./docs/README.ja.md) | [Italian](./docs/README.it.md) | [Spanish](./docs/README.es.md)
66

7-
[Learn more about this workspace setup and its capabilities](https://nx.dev/nx-api/js?utm_source=nx_project&amp;utm_medium=readme&amp;utm_campaign=nx_projects) or run `npx nx graph` to visually explore what was created. Now, let's get you up to speed!
7+
TriliumNext Notes is an open-source, cross-platform hierarchical note taking application with focus on building large personal knowledge bases.
88

9-
## Generate a library
9+
See [screenshots](https://triliumnext.github.io/Docs/Wiki/screenshot-tour) for quick overview:
1010

11-
```sh
12-
npx nx g @nx/js:lib packages/pkg1 --publishable --importPath=@my-org/pkg1
13-
```
11+
<a href="https://triliumnext.github.io/Docs/Wiki/screenshot-tour"><img src="https://github.com/TriliumNext/Notes/blob/develop/images/screenshots/app.png?raw=true" alt="Trilium Screenshot" width="1000"></a>
1412

15-
## Run tasks
13+
## ⚠️ Why TriliumNext?
1614

17-
To build the library use:
15+
[The original Trilium project is in maintenance mode](https://github.com/zadam/trilium/issues/4620)
1816

19-
```sh
20-
npx nx build pkg1
21-
```
17+
### Migrating from Trilium?
2218

23-
To run any task with Nx use:
19+
There are no special migration steps to migrate from a zadam/Trilium instance to a TriliumNext/Notes instance. Simply [install TriliumNext/Notes](#-installation) as usual and it will use your existing database.
2420

25-
```sh
26-
npx nx <target> <project-name>
27-
```
21+
Versions up to and including [v0.90.4](https://github.com/TriliumNext/Notes/releases/tag/v0.90.4) are compatible with the latest zadam/trilium version of [v0.63.7](https://github.com/zadam/trilium/releases/tag/v0.63.7). Any later versions of TriliumNext have their sync versions incremented.
2822

29-
These targets are either [inferred automatically](https://nx.dev/concepts/inferred-tasks?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects) or defined in the `project.json` or `package.json` files.
23+
## 💬 Discuss with us
3024

31-
[More about running tasks in the docs &raquo;](https://nx.dev/features/run-tasks?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects)
25+
Feel free to join our official conversations. We would love to hear what features, suggestions, or issues you may have!
3226

33-
## Versioning and releasing
27+
- [Matrix](https://matrix.to/#/#triliumnext:matrix.org) (For synchronous discussions)
28+
- The `General` Matrix room is also bridged to [XMPP](xmpp:[email protected]?join)
29+
- [Github Discussions](https://github.com/TriliumNext/Notes/discussions) (For Asynchronous discussions)
30+
- [Wiki](https://triliumnext.github.io/Docs/) (For common how-to questions and user guides)
3431

35-
To version and release the library use
32+
## 🎁 Features
3633

37-
```
38-
npx nx release
39-
```
34+
* Notes can be arranged into arbitrarily deep tree. Single note can be placed into multiple places in the tree (see [cloning](https://triliumnext.github.io/Docs/Wiki/cloning-notes))
35+
* Rich WYSIWYG note editing including e.g. tables, images and [math](https://triliumnext.github.io/Docs/Wiki/text-notes) with markdown [autoformat](https://triliumnext.github.io/Docs/Wiki/text-notes#autoformat)
36+
* Support for editing [notes with source code](https://triliumnext.github.io/Docs/Wiki/code-notes), including syntax highlighting
37+
* Fast and easy [navigation between notes](https://triliumnext.github.io/Docs/Wiki/note-navigation), full text search and [note hoisting](https://triliumnext.github.io/Docs/Wiki/note-hoisting)
38+
* Seamless [note versioning](https://triliumnext.github.io/Docs/Wiki/note-revisions)
39+
* Note [attributes](https://triliumnext.github.io/Docs/Wiki/attributes) can be used for note organization, querying and advanced [scripting](https://triliumnext.github.io/Docs/Wiki/scripts)
40+
* Direct OpenID and TOTP integration for more secure login
41+
* [Synchronization](https://triliumnext.github.io/Docs/Wiki/synchronization) with self-hosted sync server
42+
* there's a [3rd party service for hosting synchronisation server](https://trilium.cc/paid-hosting)
43+
* [Sharing](https://triliumnext.github.io/Docs/Wiki/sharing) (publishing) notes to public internet
44+
* Strong [note encryption](https://triliumnext.github.io/Docs/Wiki/protected-notes) with per-note granularity
45+
* Sketching diagrams with built-in Excalidraw (note type "canvas")
46+
* [Relation maps](https://triliumnext.github.io/Docs/Wiki/relation-map) and [link maps](https://triliumnext.github.io/Docs/Wiki/link-map) for visualizing notes and their relations
47+
* [Scripting](https://triliumnext.github.io/Docs/Wiki/scripts) - see [Advanced showcases](https://triliumnext.github.io/Docs/Wiki/advanced-showcases)
48+
* [REST API](https://triliumnext.github.io/Docs/Wiki/etapi) for automation
49+
* Scales well in both usability and performance upwards of 100 000 notes
50+
* Touch optimized [mobile frontend](https://triliumnext.github.io/Docs/Wiki/mobile-frontend) for smartphones and tablets
51+
* [Night theme](https://triliumnext.github.io/Docs/Wiki/themes)
52+
* [Evernote](https://triliumnext.github.io/Docs/Wiki/evernote-import) and [Markdown import & export](https://triliumnext.github.io/Docs/Wiki/markdown)
53+
* [Web Clipper](https://triliumnext.github.io/Docs/Wiki/web-clipper) for easy saving of web content
4054

41-
Pass `--dry-run` to see what would happen without actually releasing the library.
55+
✨ Check out the following third-party resources/communities for more TriliumNext related goodies:
4256

43-
[Learn more about Nx release &raquo;](hhttps://nx.dev/features/manage-releases?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects)
57+
- [awesome-trilium](https://github.com/Nriver/awesome-trilium) for 3rd party themes, scripts, plugins and more.
58+
- [TriliumRocks!](https://trilium.rocks/) for tutorials, guides, and much more.
4459

45-
## Keep TypeScript project references up to date
60+
## 🏗 Installation
4661

47-
Nx automatically updates TypeScript [project references](https://www.typescriptlang.org/docs/handbook/project-references.html) in `tsconfig.json` files to ensure they remain accurate based on your project dependencies (`import` or `require` statements). This sync is automatically done when running tasks such as `build` or `typecheck`, which require updated references to function correctly.
62+
### Desktop
4863

49-
To manually trigger the process to sync the project graph dependencies information to the TypeScript project references, run the following command:
64+
To use TriliumNext on your desktop machine (Linux, MacOS, and Windows) you have a few options:
5065

51-
```sh
52-
npx nx sync
53-
```
66+
* Download the binary release for your platform from the [latest release page](https://github.com/TriliumNext/Notes/releases/latest), unzip the package and run the ```trilium``` executable.
67+
* Access TriliumNext via the web interface of a server installation (see below)
68+
* Currently only the latest versions of Chrome & Firefox are supported (and tested).
69+
* TriliumNext is also provided as a Flatpak, but not yet published on FlatHub.
5470

55-
You can enforce that the TypeScript project references are always in the correct state when running in CI by adding a step to your CI job configuration that runs the following command:
71+
### Mobile
5672

57-
```sh
58-
npx nx sync:check
59-
```
73+
To use TriliumNext on a mobile device, you can use a mobile web browser to access the mobile interface of a server installation (see below).
6074

61-
[Learn more about nx sync](https://nx.dev/reference/nx-commands#sync)
75+
If you prefer a native Android app, you can use [TriliumDroid](https://apt.izzysoft.de/fdroid/index/apk/eu.fliegendewurst.triliumdroid). Report bugs and missing features at [their repository](https://github.com/FliegendeWurst/TriliumDroid).
6276

63-
## Set up CI!
77+
See issue https://github.com/TriliumNext/Notes/issues/72 for more information on mobile app support.
6478

65-
### Step 1
79+
### Server
6680

67-
To connect to Nx Cloud, run the following command:
81+
To install TriliumNext on your own server (including via Docker from [Dockerhub](https://hub.docker.com/r/triliumnext/notes)) follow [the server installation docs](https://triliumnext.github.io/Docs/Wiki/server-installation).
6882

69-
```sh
70-
npx nx connect
71-
```
83+
## 📝 Documentation
7284

73-
Connecting to Nx Cloud ensures a [fast and scalable CI](https://nx.dev/ci/intro/why-nx-cloud?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects) pipeline. It includes features such as:
85+
[See wiki for complete list of documentation pages.](https://triliumnext.github.io/Docs)
7486

75-
- [Remote caching](https://nx.dev/ci/features/remote-cache?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects)
76-
- [Task distribution across multiple machines](https://nx.dev/ci/features/distribute-task-execution?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects)
77-
- [Automated e2e test splitting](https://nx.dev/ci/features/split-e2e-tasks?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects)
78-
- [Task flakiness detection and rerunning](https://nx.dev/ci/features/flaky-tasks?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects)
87+
You can also read [Patterns of personal knowledge base](https://triliumnext.github.io/Docs/Wiki/patterns-of-personal-knowledge) to get some inspiration on how you might use TriliumNext.
7988

80-
### Step 2
89+
## 💻 Contribute
8190

82-
Use the following command to configure a CI workflow for your workspace:
91+
### Code
8392

84-
```sh
85-
npx nx g ci-workflow
93+
```shell
94+
git clone https://github.com/TriliumNext/Notes.git
95+
cd Notes
96+
npm install
97+
npm run server:start
8698
```
8799

88-
[Learn more about Nx on CI](https://nx.dev/ci/intro/ci-with-nx#ready-get-started-with-your-provider?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects)
100+
For more details, see the [development docs](https://github.com/TriliumNext/Notes/blob/develop/docs/Developer%20Guide/Developer%20Guide/Building%20and%20deployment/Running%20a%20development%20build.md).
101+
102+
### Documentation
103+
104+
See the [documentation guide](https://github.com/TriliumNext/Notes/blob/develop/docs/Developer%20Guide/Developer%20Guide/Documentation.md) for details.
89105

90-
## Install Nx Console
106+
## 👏 Shoutouts
91107

92-
Nx Console is an editor extension that enriches your developer experience. It lets you run tasks, generate code, and improves code autocompletion in your IDE. It is available for VSCode and IntelliJ.
108+
* [CKEditor 5](https://github.com/ckeditor/ckeditor5) - best WYSIWYG editor on the market, very interactive and listening team
109+
* [FancyTree](https://github.com/mar10/fancytree) - very feature rich tree library without real competition. TriliumNext Notes would not be the same without it.
110+
* [CodeMirror](https://github.com/codemirror/CodeMirror) - code editor with support for huge amount of languages
111+
* [jsPlumb](https://github.com/jsplumb/jsplumb) - visual connectivity library without competition. Used in [relation maps](https://triliumnext.github.io/Docs/Wiki/relation-map.html) and [link maps](https://triliumnext.github.io/Docs/Wiki/note-map.html#link-map)
93112

94-
[Install Nx Console &raquo;](https://nx.dev/getting-started/editor-setup?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects)
113+
## 🤝 Support
95114

96-
## Useful links
115+
Support for the TriliumNext organization will be possible in the near future. For now, you can:
116+
- Support continued development on TriliumNext by supporting our developers: [eliandoran](https://github.com/sponsors/eliandoran) (See the [repository insights]([developers]([url](https://github.com/TriliumNext/Notes/graphs/contributors))) for a full list)
117+
- Show a token of gratitude to the original Trilium developer ([zadam](https://github.com/sponsors/zadam)) via [PayPal](https://paypal.me/za4am) or Bitcoin (bitcoin:bc1qv3svjn40v89mnkre5vyvs2xw6y8phaltl385d2).
97118

98-
Learn more:
99119

100-
- [Learn more about this workspace setup](https://nx.dev/nx-api/js?utm_source=nx_project&amp;utm_medium=readme&amp;utm_campaign=nx_projects)
101-
- [Learn about Nx on CI](https://nx.dev/ci/intro/ci-with-nx?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects)
102-
- [Releasing Packages with Nx release](https://nx.dev/features/manage-releases?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects)
103-
- [What are Nx plugins?](https://nx.dev/concepts/nx-plugins?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects)
120+
## 🔑 License
104121

105-
And join the Nx community:
106-
- [Discord](https://go.nx.dev/community)
107-
- [Follow us on X](https://twitter.com/nxdevtools) or [LinkedIn](https://www.linkedin.com/company/nrwl)
108-
- [Our Youtube channel](https://www.youtube.com/@nxdevtools)
109-
- [Our blog](https://nx.dev/blog?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects)
122+
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

apps/desktop/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"@types/electron-squirrel-startup": "1.0.2",
1818
"@triliumnext/server": "workspace:*",
1919
"copy-webpack-plugin": "13.0.0",
20-
"electron": "35.1.5",
20+
"electron": "35.2.2",
2121
"@electron/rebuild": "4.0.1",
2222
"@electron-forge/cli": "7.8.0",
2323
"@electron-forge/maker-deb": "7.8.0",

apps/edit-docs/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"@triliumnext/desktop": "workspace:*",
99
"@types/fs-extra": "11.0.4",
1010
"copy-webpack-plugin": "13.0.0",
11-
"electron": "35.1.5",
11+
"electron": "35.2.2",
1212
"fs-extra": "11.3.0"
1313
},
1414
"nx": {

apps/edit-docs/tsconfig.app.json

+3
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
"eslint.config.mjs"
1919
],
2020
"references": [
21+
{
22+
"path": "../server/tsconfig.app.json"
23+
},
2124
{
2225
"path": "../desktop/tsconfig.app.json"
2326
},

apps/edit-docs/tsconfig.json

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
"files": [],
44
"include": [],
55
"references": [
6+
{
7+
"path": "../server"
8+
},
69
{
710
"path": "../desktop"
811
},

apps/server/package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@
5050
"jquery": "3.7.1",
5151
"katex": "0.16.22",
5252
"normalize.css": "8.0.1",
53-
"@anthropic-ai/sdk": "0.39.0",
53+
"@anthropic-ai/sdk": "0.40.1",
5454
"@braintree/sanitize-url": "7.1.1",
5555
"@triliumnext/commons": "workspace:*",
56-
"@triliumnext/express-partial-content": "1.0.1",
56+
"@triliumnext/express-partial-content": "workspace:*",
5757
"@triliumnext/turndown-plugin-gfm": "workspace:*",
5858
"archiver": "7.0.1",
5959
"async-mutex": "0.5.0",
@@ -70,7 +70,7 @@
7070
"debounce": "2.2.0",
7171
"debug": "4.4.0",
7272
"ejs": "3.1.10",
73-
"electron": "35.1.5",
73+
"electron": "35.2.2",
7474
"electron-debug": "4.1.0",
7575
"electron-window-state": "5.0.3",
7676
"escape-html": "1.0.3",
@@ -99,7 +99,7 @@
9999
"multer": "1.4.5-lts.2",
100100
"normalize-strings": "1.1.1",
101101
"ollama": "0.5.14",
102-
"openai": "4.95.1",
102+
"openai": "4.97.0",
103103
"rand-token": "1.0.1",
104104
"safe-compare": "1.1.4",
105105
"sanitize-filename": "1.6.3",

apps/server/src/services/import/mime.spec.ts

+5
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ describe("#getMime", () => {
4545
["test.zip"], "application/zip"
4646
],
4747

48+
[
49+
"MP4 videos are supported",
50+
["video.mp4"], "video/mp4"
51+
],
52+
4853
[
4954
"unknown MIME type not recognized by mimeTypes.lookup",
5055
["test.fake"], false

apps/server/src/services/import/mime.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ const EXTENSION_TO_MIME = new Map<string, string>([
7171
[".ts", "text/x-typescript"],
7272
[".excalidraw", "application/json"],
7373
[".mermaid", "text/vnd.mermaid"],
74-
[".mmd", "text/vnd.mermaid"]
74+
[".mmd", "text/vnd.mermaid"],
75+
[".mp4", "video/mp4"] // https://github.com/jshttp/mime-types/issues/138
7576
]);
7677

7778
/** @returns false if MIME is not detected */

apps/server/tsconfig.app.json

+3
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@
3636
{
3737
"path": "../../packages/turndown-plugin-gfm/tsconfig.lib.json"
3838
},
39+
{
40+
"path": "../../packages/express-partial-content/tsconfig.lib.json"
41+
},
3942
{
4043
"path": "../../packages/commons/tsconfig.lib.json"
4144
}

apps/server/tsconfig.json

+3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
{
77
"path": "../../packages/turndown-plugin-gfm"
88
},
9+
{
10+
"path": "../../packages/express-partial-content"
11+
},
912
{
1013
"path": "../../packages/commons"
1114
},
+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"jsc": {
3+
"target": "es2017",
4+
"parser": {
5+
"syntax": "typescript",
6+
"decorators": true,
7+
"dynamicImport": true
8+
},
9+
"transform": {
10+
"decoratorMetadata": true,
11+
"legacyDecorator": true
12+
},
13+
"keepClassNames": true,
14+
"externalHelpers": true,
15+
"loose": true
16+
},
17+
"module": {
18+
"type": "commonjs"
19+
},
20+
"sourceMaps": true,
21+
"exclude": ["jest.config.ts",".*\\.spec.tsx?$",".*\\.test.tsx?$","./src/jest-setup.ts$","./**/jest-setup.ts$",".*.js$"]
22+
}
+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2019 Sukant Gujar
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)