Skip to content

Commit 686c893

Browse files
committed
docs(dev): integrate more of the old documentation
1 parent d9071f2 commit 686c893

21 files changed

+904
-1374
lines changed

docs/Developer Guide/!!!meta.json

Lines changed: 812 additions & 1014 deletions
Large diffs are not rendered by default.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
The main workflow of the CI:
33

44
* Builds the Docker image and publishes in the GitHub Docker registry.
5-
* Builds using a portion of the [delivery script](../../Build%20deliveries%20locally.md) artifacts for the following platforms:
5+
* Builds using a portion of the [delivery script](../../Building/Build%20deliveries%20locally.md) artifacts for the following platforms:
66
* Windows `x86_64` as .zip file
77
* Windows `x86_64` installer (using Squirrel)
88
* macOS `x86_64` and `aarch64`.

docs/Developer Guide/Developer Guide/Architecture/Icons.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ These are stored in `images`:
2121

2222
## App icons
2323

24-
<table><thead><tr><th>Name</th><th>Resolution</th><th>Description</th></tr></thead><tbody><tr><td><code>ios/apple-touch-icon.png</code></td><td>180x180</td><td>Used as <code>apple-touch-icon</code>, but only in <code>login.ejs</code> and <code>set_password.ejs</code> for some reason.</td></tr><tr><td><code>mac/icon.icns</code></td><td>512x512</td><td>Provided as <code>--icon</code> to <code>electron-packager</code> for <code>mac-arm64</code> and <code>mac-x64</code> <a href="../Old%20documentation/Build%20deliveries%20locally.md">builds</a>.</td></tr><tr><td><code>png/128x128.png</code></td><td>128x128</td><td>Used in <code>linux-x64</code> <a href="../Old%20documentation/Build%20deliveries%20locally.md">build</a>, to provide an <code>icon.png</code>.</td></tr><tr><td><code>png/256x256-dev.png</code></td><td>256x256</td><td>Used by the Electron window icon, if in dev mode.</td></tr><tr><td><code>png/256x256.png</code></td><td>Used by the Electron window icon, if not in dev mode.</td></tr><tr><td><code>win/icon.ico</code></td><td><ul><li>ICO 16x16</li><li>ICO 32x32</li><li>ICO 48x48</li><li>ICO 64x64</li><li>ICO 128x128</li><li>PNG 256x256</li></ul></td><td><ul><li>Used by the <code>win-x64</code> <a href="../Old%20documentation/Build%20deliveries%20locally.md">build</a>.</li><li>Used by Squirrel Windows installer for: setup icon, app icon, control panel icon</li><li>Used as the favicon.</li></ul></td></tr><tr><td><code>win/setup-banner.gif</code></td><td>640x480</td><td>Used by the Squirrel Windows installer during the installation process. Has only one frame.</td></tr></tbody></table>
24+
<table><thead><tr><th>Name</th><th>Resolution</th><th>Description</th></tr></thead><tbody><tr><td><code>ios/apple-touch-icon.png</code></td><td>180x180</td><td>Used as <code>apple-touch-icon</code>, but only in <code>login.ejs</code> and <code>set_password.ejs</code> for some reason.</td></tr><tr><td><code>mac/icon.icns</code></td><td>512x512</td><td>Provided as <code>--icon</code> to <code>electron-packager</code> for <code>mac-arm64</code> and <code>mac-x64</code> <a href="../Building/Build%20deliveries%20locally.md">builds</a>.</td></tr><tr><td><code>png/128x128.png</code></td><td>128x128</td><td>Used in <code>linux-x64</code> <a href="../Building/Build%20deliveries%20locally.md">build</a>, to provide an <code>icon.png</code>.</td></tr><tr><td><code>png/256x256-dev.png</code></td><td>256x256</td><td>Used by the Electron window icon, if in dev mode.</td></tr><tr><td><code>png/256x256.png</code></td><td>Used by the Electron window icon, if not in dev mode.</td></tr><tr><td><code>win/icon.ico</code></td><td><ul><li>ICO 16x16</li><li>ICO 32x32</li><li>ICO 48x48</li><li>ICO 64x64</li><li>ICO 128x128</li><li>PNG 256x256</li></ul></td><td><ul><li>Used by the <code>win-x64</code> <a href="../Building/Build%20deliveries%20locally.md">build</a>.</li><li>Used by Squirrel Windows installer for: setup icon, app icon, control panel icon</li><li>Used as the favicon.</li></ul></td></tr><tr><td><code>win/setup-banner.gif</code></td><td>640x480</td><td>Used by the Squirrel Windows installer during the installation process. Has only one frame.</td></tr></tbody></table>
2525

2626
## Additional locations where the branding is used
2727

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Build deliveries locally
2+
## Building the desktop
3+
4+
Go to `apps/desktop`, and:
5+
6+
* To generate the packages, run `pnpm electron-forge:make`.
7+
* To only build the Flatpak, run `pnpm electron-forge:make-flatpak`.
8+
* To only build without packaging it, run `pnpm electron-forge:package`.
9+
10+
## Building the server
11+
12+
Go to `apps/server` and run `pnpm package` to run the build script. The built artifacts will appear in `apps/server/dist`, whereas the packaged build will be available in `apps/server/out`.
13+
14+
## On NixOS
15+
16+
Under NixOS the following `nix-shell` is needed:
17+
18+
```
19+
nix-shell -p jq
20+
```
21+
22+
For Linux builds:
23+
24+
```
25+
nix-shell -p jq fakeroot dpkg
26+
```
27+
28+
To test the Linux builds, use `steam-run`:
29+
30+
```javascript
31+
$ NIXPKGS_ALLOW_UNFREE=1 nix-shell -p steam-run
32+
[nix-shell] cd dist/trilium-linux-x64
33+
[nix-shell] steam-run ./trilium
34+
```
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Documentation
2+
## Automation
3+
4+
The documentation is built via `apps/build-docs`:
5+
6+
1. The output directory is cleared.
7+
2. The User Guide and the Developer Guide are built.
8+
1. The documentation from the repo is archived and imported into an in-memory instance.
9+
2. The documentation is exported using the shared theme.
10+
3. The API docs (internal and ETAPI) are statically rendered via Redocly.
11+
4. The script API is generated via `typedoc`
12+
13+
The `deploy-docs` workflow triggers the documentation build and uploads it to CloudFlare Pages.
14+
15+
## Building locally
16+
17+
In the Git root, run `pnpm docs:build`. The built documentation will be available in `site` at Git root.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Running a development build
2+
First, follow the <a class="reference-link" href="../Environment%20Setup.md">Environment Setup</a>.
3+
4+
## Client
5+
6+
The client is not meant to be run by itself, despite being described as an app. See the documentation on the server instead.
7+
8+
## Server
9+
10+
* To run the server in development mode, run `server:start`. The dev port is `8080`.
11+
* To run the server in production mode (with its own copy of the assets), run `server:start-prod`.
12+
* To build for Docker, see <a class="reference-link" href="Docker.md">Docker</a>.
13+
14+
To run with a custom port, change the `TRILIUM_PORT` environment variable from the `package.json`.
15+
16+
## Desktop
17+
18+
* To run in development mode, use `pnpm desktop:start`.
19+
* To run in production mode, use `pnpm desktop:start-prod`.
20+
21+
## Safe mode
22+
23+
Safe mode is off by default, to enable it temporarily on a Unix shell, prepend the environment variable setting:
24+
25+
```
26+
pnpm cross-env TRILIUM_SAFE_MODE=1 pnpm server:start
27+
```
28+
29+
## Running on NixOS
30+
31+
When doing development, the Electron binary retrieved from NPM is not going to be compatible with NixOS, resulting in errors when trying to run it. However Trilium handles it automatically when running `pnpm desktop:start`.
32+
33+
If there's no `electron` the system path it will attempt to use `nix-shell` to obtain it.

docs/Developer Guide/Developer Guide/Old documentation/Build deliveries locally.md

Lines changed: 0 additions & 32 deletions
This file was deleted.

docs/Developer Guide/Developer Guide/Old documentation/Building and deployment/Build deliveries locally.clone.md

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)