Skip to content

Commit

Permalink
TOC and file renaming
Browse files Browse the repository at this point in the history
- renamed all files to be lowercase and have no spaces
- Updated all references to those names in file content
- Recreated table of contents into readme.MD Issue TriliumNext#2
- Separated "importing docs" text into a separate file
- Added a few %%{WARNING}%% tags to links that go to zadams repos. Issue TriliumNext#87
  • Loading branch information
root-hal9000 committed Jul 6, 2024
1 parent 8d6ce0a commit 3c6d1aa
Show file tree
Hide file tree
Showing 101 changed files with 7,850 additions and 18 deletions.
92 changes: 74 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,77 @@
# Trilium Next documentation
# TriliumNext Documentation

This is an export of the upsteam [Zadam Wiki][0] for Trilium Notes. It's been converted from Github wiki format to markdown with some light rearranging to make for better presentation when imported into Trilium. It's anticipdated that in time this will supercede Zadam Wiki.
To import this documentation into your own instance of Trilium, [follow these instructions](Wiki/import-docs.md)

## Importing
## Table of Contents

To import these docs into your own Trilium instance:

1. Download archive from main branch of this repo:
https://github.com/TriliumNext/Docs/archive/refs/heads/main.zip
2. In Trilim create a new note to act as branch for the docs
3. Right-click >> Import into note >> select downloaded `Docs-main.zip`
a. optionally uncheck "Shrink images"

### Optional cleanup
- delete `!!!meta.json`
- Move `images` node down to the bottom (instead of dragging, it's easier to move out to parent node than back into Wiki. It will go to end of list automatically).

For new releases delete the old docs note tree and start fresh, or you'll get duplicates.

[0]: https://github.com/zadam/trilium/wiki
- [Quick Start](Wiki/quick-start.md)
- [Screenshot Tour](Wiki/screenshot-tour.md)
- Basic Concepts
- [Documents](Wiki/document.md)
- [Note](Wiki/note.md)
- [Text Notes](Wiki/text-notes.md)
- [Links](Wiki/links.md)
- [Images](Wiki/images.md)
- [Attachments](Wiki/attachments.md)
- [Cloning notes](Wiki/cloning-notes.md)
- [Protected Notes](Wiki/protected-notes.md)
- [Archived Notes](Wiki/archived-notes.md)
- [Note Revisions](Wiki/note-revisions.md)
- Navigation
- [Tree Concepts](Wiki/tree-concepts.md)
- [Tree Manipulation](Wiki/tree-manipulation.md)
- [Note Navigation](Wiki/note-navigation.md)
- [Search](Wiki/search.md)
- [Bookmarks](Wiki/bookmarks.md)
- [Note Hoisting](Wiki/note-hoisting.md)
- [Workspace](Wiki/workspace.md)
- [Keyboard Shortcuts](Wiki/keyboard-shortcuts.md)
- [Themes](Wiki/themes.md)
- [Theme Gallery](Wiki)
- Import & Export
- [Markdown](Wiki/markdown.md)
- [Evernote](Wiki/evernote-import.md)
- [OneNote](Wiki/onenote.md)
- Installation & Setup
- [Desktop Installation](Wiki/desktop-installation.md)
- [Server Installation](Wiki/server-installation.md)
- [Packaged Server Installation](Wiki/packaged-server-installation.md)
- [Docker Server Installation](Wiki/docker-server-installation.md)
- [NixOS Server Installation](Wiki/nixos-server-installation.md)
- [Manual Server Installation](Wiki/manual-server-installation.md)
- [Kubernettes Server Installation](Wiki/kubernetes-server-installation.md)
- [Apache Proxy Setup](Wiki/apache-proxy-setup.md)
- [Nginx Proxy Setup](Wiki/nginx-proxy-setup.md)
- [TLS Configuration](Wiki/tls-configuration.md)
- [Synchronization](Wiki/synchronization.md)
- [Mobile Frontend](Wiki/mobile-frontend.md)
- [Web Clipper](Wiki/web-clipper.md)
- [Upgrading Trilium](Wiki/upgrading-trilium.md)
- [Backup](Wiki/backup.md)
- [Data Directory](Wiki/data-directory.md)
- Advanced Usage
- [Attributes](Wiki/attributes.md)
- [Attribute Inheritance](Wiki/attribute-inheritance.md)
- [Promoted Attributes](Wiki/promoted-attributes.md)
- [Template](Wiki/template.md)
- [Relation Map](Wiki/relation-map.md)
- [Note Map](Wiki/note-map.md)
- [Book Note](Wiki/book-note.md)
- [Sharing](Wiki/sharing.md)
- [Code Notes](Wiki/code-notes.md)
- [Scripts](Wiki/scripts.md)
- [Script API](Wiki/script-api.md)
- [Custom Request handler](Wiki/custom-request-handler.md)
- [Events](Wiki/events.md)
- [Custom Widgets](Wiki/custom-widget.md)
- [Advanced Showcase](Wiki/advanced-showcases.md)
- [Day Notes](Wiki/day-notes.md)
- [Weight Tracker](Wiki/weight-tracker.md)
- [Task Manager](Wiki/task-manager.md)
- [ETAPI (Rest API)](Wiki/etapi.md)
- [Default Note Title](Wiki/default-note-title.md)
- Developer Guides
- [Frontend Basics](Wiki/frontend-basics.md)
- [Widget Basics](Wiki/widget-basics.md)
- [FAQ](Wiki/faq.md)
- [Troubleshooting](Wiki/troubleshooting.md)
9 changes: 9 additions & 0 deletions Wiki/advanced-showcases.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Advanced showcases
Trilium provides some advanced functionality in the form of [Scripts](scripts.md) and [promoted attributes](promoted-attributes.md). To explain and visualize these features we've prepared few showcases which are also available in the [demo document](document.md):

* [Relation map](relation-map.md)
* [Day notes](day-notes.md)
* [Weight Tracker](weight-tracker.md)
* [Task Manager](task-manager.md)

An important thing to keep in mind is that above showcases and demoed functionality are not built-in into Trilium - these are just examples of Trilium's extensibility.
20 changes: 20 additions & 0 deletions Wiki/anonymized-database.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Anonymized database
### Anonymized database

In some cases, it's necessary to see the database structure to be able to debug the problem. Of course, we can't ask you to send us [Document](document.md) file with your notes.

For this, Trilium supports anonymization of the database - you can trigger this in Options -> Advanced tab.

![](images/anonymization.png)

This will create a copy of your document and remove all sensitive data (currently note titles, contents, revisions, history and some of the options, and non-system attributes) while leaving all structure and metadata (e.g. date of last change). After this is done, the database is [VACUUMed](https://sqlite.org/lang_vacuum.html) to make sure there's no stale sensitive data in the document file. The resulting file is stored in `anonymized` directory (placed in the [data directory](data-directory.md)). You can safely attach it with your bug report or send it to [[email protected]](#root/N3Zt66yETj9g) %%{WARNING}%%

#### Command line anonymization

If the database is corrupted in a way which prevents Trilium to start up, you won't be able to trigger the anonymization from the UI. For such a case, anonymization is also available from command line:

```text-plain
node src/anonymize.js
```

This needs to be executed in the directory with Trilium source files, for desktop builds this in `resources/app` directory.
88 changes: 88 additions & 0 deletions Wiki/apache-proxy-setup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# Apache proxy setup
I've assumed you have created a DNS A record for `trilium.yourdomain.com` that you want to use for your Trilium server.

1. Download docker image and create container

```text-plain
docker pull zadam/trilium:[VERSION] %%{WARNING}%%
docker create --name trilium -t -p 127.0.0.1:8080:8080 -v ~/trilium-data:/home/node/trilium-data zadam/trilium:[VERSION]
```
2. Configure Apache proxy and websocket proxy
1. Enable apache proxy modules
```text-plain
a2enmod ssl
a2enmod proxy
a2enmod proxy_http
a2enmod proxy_wstunnel
```
2. Create a new let's encrypt certificate
```text-plain
sudo certbot certonly -d trilium.mydomain.com
```
Choose standalone (2) and note the location of the created certificates (typically /etc/letsencrypt/live/...)
3. Create a new virtual host file for apache (you may want to use `apachectl -S` to determine the server root location, mine is /etc/apache2)
```text-plain
sudo nano /etc/apache2/sites-available/trilium.yourdomain.com.conf
```
Paste (and customize) the following text into the configuration file
```text-plain
<VirtualHost *:80>
ServerName http://trilium.yourdomain.com
RewriteEngine on
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,QSA,R=permanent]
</VirtualHost>
<VirtualHost *:443>
ServerName https://trilium.yourdomain.com
RewriteEngine On
RewriteCond %{HTTP:Connection} Upgrade [NC]
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteRule /(.*) ws://localhost:8080/$1 [P,L]
AllowEncodedSlashes NoDecode
ProxyPass / http://localhost:8080/ nocanon
ProxyPassReverse / http://localhost:8080/
SSLCertificateFile /etc/letsencrypt/live/trilium.yourdomain.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/trilium.yourdomain.com/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
```
4. Enable the virtual host with `sudo a2ensite trilium.yourdomain.com.conf`
5. Reload apache2 with `sudo systemctl reload apache2`
3. Create and enable a systemd service to start the docker container on boot
1. Create a new empty file called `/lib/systemd/system/trilium.service` with the contents
```text-plain
[Unit]
Description=Trilium Server
Requires=docker.service
After=docker.service
[Service]
Restart=always
ExecStart=/usr/bin/docker start -a trilium
ExecStop=/usr/bin/docker stop -t 2 trilium
[Install]
WantedBy=local.target
```
2. Install, enable and start service
```text-plain
sudo systemctl daemon-reload
sudo systemctl enable trilium.service
sudo systemctl start trilium.service
```
10 changes: 10 additions & 0 deletions Wiki/archived-notes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Archived-notes
Archived notes are notes which have `archived` [attribute](attributes.md) - either directly or [inherited](attribute-inheritance.md).

Such notes are then by default not shown in the autocomplete and in the full text [search](search.md).

This can be useful for notes which are no longer very useful but still valuable enough to keep around without them getting too much in the way.

You can control whether archived notes are displayed in the note tree with a setting:

![](images/hide-archived.png)
8 changes: 8 additions & 0 deletions Wiki/attachments.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Attachments
A note can _own_ one or more attachments. The attachment is either an image or file which can be displayed/linked in the note which owns it.

The note is the exclusive owner of its attachments - they can't be linked from other notes. If a user copies the attachment link from one note to another, the attachment itself is copied and from then on lives an independent life.

Attachments is a feature available in Trilium since v0.61. Attachment is now a preferred way to include images into notes. Previously, an image had to be an independent note which could be then displayed in multiple notes, but this approach proved to be complicated. Image as notes still remains as an option, and is a more suitable choice in some cases (e.g. when the particular image is sort of standalone). It is possible to convert an image to an attachment and vice versa.

Image attachments are expected to be linked in the owning text note. If it's not linked, it will get deleted in a configurable timeout.
21 changes: 21 additions & 0 deletions Wiki/attribute-inheritance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Attribute inheritance
Standard inheritance
--------------------

Every [attribute](attributes.md) has flag called `isInheritable`. If this is true, then this attribute (key-value) is also applied to all its children notes, children's children notes etc.

Example how this might be useful is `archived` label which hides its note from Jump to / Add link dialogs. Often times you want to archive some specific subtree, you can do this by making the `archived` label inheritable.

Copying inheritance
-------------------

A different kind of inheritance is achieved using `child:` attribute name prefix. We can define that when a note is created under a certain parent note then the new child note will automatically receive defined attributes. The difference from standard inheritance is that these are real new attributes which are completely independent of the parent and will be therefore kept even if the note is moved elsewhere in the note tree.

For defining the copy-attributes we use `child:` prefix in attribute name, the rest is defined normally. So as an example, when we create a child note in a note with `#child:exampleAttribute` label, then the child note will have `#exampleAttribute` label. This can be even chained, e.g. `#child:child:exampleAttribute`, in this case `#child:exampleAttribute` will be created in the child and `#exampleAttribute` will be created in the child of the child.

Which kind of attribute inheritance (or if any at all) should be used depends on the specific use case.

Template inheritance
--------------------

[Attribute template](template.md) could be also seen as a form of inheritance.
Loading

0 comments on commit 3c6d1aa

Please sign in to comment.