diff --git a/src/public/app/doc_notes/en/User Guide/!!!meta.json b/src/public/app/doc_notes/en/User Guide/!!!meta.json index 2f9d33440..542666e59 100644 --- a/src/public/app/doc_notes/en/User Guide/!!!meta.json +++ b/src/public/app/doc_notes/en/User Guide/!!!meta.json @@ -9,9 +9,9 @@ "pOsGYCXsbNQG" ], "title": "User Guide", - "notePosition": 90, + "notePosition": 110, "prefix": null, - "isExpanded": true, + "isExpanded": false, "type": "text", "mime": "text/html", "attributes": [], @@ -3299,7 +3299,7 @@ "title": "Note Types", "notePosition": 70, "prefix": null, - "isExpanded": true, + "isExpanded": false, "type": "text", "mime": "text/html", "attributes": [ @@ -3326,7 +3326,7 @@ "title": "Text", "notePosition": 10, "prefix": null, - "isExpanded": true, + "isExpanded": false, "type": "text", "mime": "text/markdown", "attributes": [ diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Advanced Showcases/Day Notes.html b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Advanced Showcases/Day Notes.html index c4c0bfbc2..46e2442f4 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Advanced Showcases/Day Notes.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Advanced Showcases/Day Notes.html @@ -25,16 +25,14 @@

Select an existing day note, and the menubar contains a calendar widget. Select any day to create a note for that day. 

- +

This pattern works well also because of Cloning Notes 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

- +

Demo

- +

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" @@ -43,9 +41,7 @@ from Task manager).

You can also notice how this day note has promoted attribute "weight" where you can track your daily weight. This data is then used in Weight tracker.

- -

Templates

- +

Templates

Trilium provides template functionality, and it could be used together with day notes.

You can define one of the following relations on the root of the journal @@ -59,9 +55,7 @@ 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

- +

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:

@@ -77,9 +71,7 @@
  • {ordinal} is replaced with the ordinal date (e.g. 1st, 2nd, 3rd) etc.
  • - -

    Month pattern

    - +

    Month pattern

    It is also possible to customize the title of generated month notes through the #monthPattern attribute, much like #datePattern. The options are:

    @@ -94,9 +86,7 @@

    The default is {monthNumberPadded} - {month}

    - -

    Implementation

    - +

    Implementation

    Trilium has some special support for day notes in the form of backend Script API - see e.g. getDayNote() function.

    Day (and year, month) notes are created with a label - e.g. #dateNote="2018-08-16" this diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Advanced Showcases/Task Manager.html b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Advanced Showcases/Task Manager.html index 0666d4c7d..1a7e9bf4e 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Advanced Showcases/Task Manager.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Advanced Showcases/Task Manager.html @@ -16,11 +16,9 @@

    Task Manager is a promoted attributes and scriptsshowcase present in the demo notes.

    - -

    Demo

    - +

    Demo

    - +

    Task Manager manages outstanding (TODO) tasks and finished tasks (non-empty doneDate attribute). Outstanding tasks are further categorized by location @@ -30,16 +28,12 @@ notes are cloned into day note to both todoDate note and doneDate note (with prefix of either "TODO" or "DONE").

    - -

    Implementation

    - +

    Implementation

    New tasks are created in the TODO note which has ~child:template relation(see attribute inheritance) pointing to the task template.

    - -

    Attributes

    - +

    Attributes

    Task template defines several promoted attributes - todoDate, doneDate, tags, location. Importantly it also defines ~runOnAttributeChange relation - event handler which is @@ -47,12 +41,9 @@ 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

    - +

    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({
    +          to create new note (task) in the TODO note.

    api.addButtonToToolbar({
         title: 'New task',
         icon: 'check',
         shortcut: 'alt+n',
    @@ -71,12 +62,10 @@
         }
     });

    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 which - defines extra CSS classes:

    -
    span.fancytree-node.todo .fancytree-title {
    +          defines extra CSS classes:

    span.fancytree-node.todo .fancytree-title {
         color: red !important;
     }
     
    diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Advanced Showcases/Weight Tracker.html b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Advanced Showcases/Weight Tracker.html
    index 2060f0b5c..1629f2af4 100644
    --- a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Advanced Showcases/Weight Tracker.html	
    +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Advanced Showcases/Weight Tracker.html	
    @@ -14,16 +14,14 @@
     
           

    - +

    The Weight Tracker is a Script API showcase present in the demo notes.

    By adding weight as a promoted attribute in the template from which day notes are created, you can aggregate the data and plot weight change over time.

    - -

    Implementation

    - +

    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 can @@ -37,12 +35,9 @@ chart.jswhich is imported as an attachment, since it's not built into Trilium.

    - -

    Code

    - +

    Code

    Here's the content of the script which is placed in a code note of - type JS Frontend:

    -
    async function getChartData() {
    +          type JS Frontend:

    async function getChartData() {
         const days = await api.runOnBackend(async () => {
             const notes = api.getNotesWithLabel('weight');
             const days = [];
    @@ -88,7 +83,6 @@ new chartjs.Chart(ctx, {
         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.

    diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Attributes.html b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Attributes.html index a4e1f4023..8dddf4433 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Attributes.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Attributes.html @@ -22,11 +22,9 @@

    These attributes play a crucial role in organizing, categorising, and enhancing the functionality of notes.

    - +

    - -

    Labels

    - +

    Labels

    Labels in Trilium can be used for a variety of purposes:

    • Metadata: Assign labels with optional values for categorization, @@ -39,9 +37,7 @@

    Labels are also searchable, enhancing note retrieval.

    - -

    Common Labels for Advanced Configuration

    - +

    Common Labels for Advanced Configuration

    • **disableVersioning**: Disables automatic versioning, ideal for large, unimportant notes like script libraries
    • @@ -111,41 +107,29 @@ note's editor
    • **viewType**: Sets the view of child notes (grid or list)
    - -

    Relations

    - +

    Relations

    Relations define connections between notes, similar to links.

    - -

    Uses

    - +

    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

    - +

    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

    - +

    Multiplicity

    Attributes in Trilium can be "multivalued", meaning multiple attributes with the same name can coexist.

    - -

    Attribute Definitions and Promoted Attributes

    - +

    Attribute Definitions and Promoted Attributes

    Special labels create "label/attribute" definitions, enhancing the organization and management of attributes. For more details, see Promoted attributes.

    - -

    Attribute Inheritance

    - +

    Attribute Inheritance

    Trilium supports attribute inheritance, allowing child notes to inherit attributes from their parents. For more information, see Attribute inheritance.

    diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Attributes/Attribute Inheritance.html b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Attributes/Attribute Inheritance.html index b47059053..f07d3a74f 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Attributes/Attribute Inheritance.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Attributes/Attribute Inheritance.html @@ -14,27 +14,20 @@

    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

    - +

    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

    - +

    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

    - +

    How to Use

    • Syntax: #child:attributeName
    • @@ -42,16 +35,12 @@ as #child:child:attributeName, where each child down the hierarchy receives the appropriate attribute.
    - -

    Example

    - +

    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

    - +

    3. Template Inheritance

    Attributes can also be inherited from templates. When a new note is created using a template, it inherits the attributes defined in that template. This is particularly useful for maintaining consistency diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Attributes/Promoted Attributes.html b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Attributes/Promoted Attributes.html index 3ba0f2a97..325639164 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Attributes/Promoted Attributes.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Attributes/Promoted Attributes.html @@ -17,7 +17,7 @@ are considered important and thus are "promoted" onto the main note UI. See example below:

    - +

    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 @@ -26,15 +26,13 @@ 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 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?

    - +

    You can notice tag attribute definition. These "definition" attributes define how the "value" attributes should behave.

    @@ -43,9 +41,7 @@ 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

    - +

    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. diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Attributes/Template.html b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Attributes/Template.html index cf981128e..2fbb6b93a 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Attributes/Template.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Attributes/Template.html @@ -28,9 +28,7 @@

  • Child Note Duplication: All child notes of the template are deep-duplicated to the instance note.
  • - -

    Example

    - +

    Example

    A typical example would be a "Book" template note, which might include:

    • Promoted Attributes: Such as publication year, author, @@ -41,18 +39,15 @@ etc.

    - Template Example + Template Example

    - -

    Instance Note

    - +

    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 + show child note templates

    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 @@ -61,9 +56,7 @@ 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

    - +

    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.

    diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Bulk actions.html b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Bulk actions.html index ae5aa731a..1def3fbf0 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Bulk actions.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Bulk actions.html @@ -14,15 +14,12 @@

    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:

    -
    note.title = note.title + " - suffix";
    + title:

    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:

    -
    note.setLabel("shareAlias", note.title)
    + to the title of the note:

    note.setLabel("shareAlias", note.title)
    diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Configuration (config.ini or e.html b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Configuration (config.ini or e.html index ecef112dd..0e595673c 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Configuration (config.ini or e.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Configuration (config.ini or e.html @@ -26,12 +26,10 @@
  • The environment variables will override any matching values from config.ini
  • -

    For example, if you have this in your config.ini:

    -
    [Network]
    +        

    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
    +        

    You can override these values using environment variables:

    TRILIUM_NETWORK_HOST=0.0.0.0
     TRILIUM_NETWORK_PORT=9000

    The code will:

      diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Custom Request Handler.html b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Custom Request Handler.html index 39104417b..3e929cccc 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Custom Request Handler.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Custom Request Handler.html @@ -17,13 +17,10 @@ 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

      - +

      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 containing:

      -
      const {req, res} = api;
      +        

      We'll start with creating a JavaScript backend code note containing:

      const {req, res} = api;
       const {secret, title, content} = req.body;
       
       if (req.method == 'POST' && secret === 'secret-password') {
      @@ -47,11 +44,8 @@ else {
                 
    1. relation ~targetNote pointing to a note where new notes should be saved
    2. - -

      Explanation

      - -

      Let's test this by using an HTTP client to send a request:

      -
      POST http://my.trilium.org/custom/create-note
      +        

      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
       
       {
      @@ -75,32 +69,23 @@ Content-Type: application/json
               

      Once we pass these checks we will just create the desired note using Script API.

      - -

      Custom resource provider

      - +

      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.

      - -

      Advanced concepts

      - +

      Advanced concepts

      api.req and api.res are Express.js objects - you can always look into its documentation for details.

      - -

      Parameters

      - -

      REST request paths often contain parameters in the URL, e.g.:

      -
      http://my.trilium.org/custom/notes/123
      +

      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]+)
      + 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];
      + 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.

      diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Custom Resource Providers.html b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Custom Resource Providers.html index a47a4e93d..888ab5c59 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Custom Resource Providers.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Custom Resource Providers.html @@ -17,9 +17,7 @@ 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

      - +

      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. @@ -40,13 +38,10 @@ such as hello/.* which will be accessible via /custom/hello/1, /custom/hello/2, /custom/hello/world, etc. - -

        Using it in a theme

        - +

        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:

        -
        @font-face {
        +        

        Then modify the theme CSS to point to:

        @font-face {
         	font-family: customFont;
         	src: url("/custom/fonts/myfont.ttf");
         }
        diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Database.html b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Database.html
        index 69afb4127..4a8922bbb 100644
        --- a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Database.html	
        +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Database.html	
        @@ -17,9 +17,7 @@
                   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.

        - -

        Demo Notes

        - +

        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:

        - -

        Restoring Demo Notes

        - +

        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 @@ -52,18 +48,14 @@

      4. Click "Import into note"
      5. Select the .zip archive to import it
      6. - -

        Manually Modifying the Database

        - +

        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 to work directly on the database file.

        See Manually altering the database for more information.

        - -

        How to Reset the Database

        - +

        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 diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Database/Manually altering the database.html b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Database/Manually altering the database.html index 70e91a818..eaa2dad70 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Database/Manually altering the database.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Database/Manually altering the database.html @@ -18,21 +18,15 @@

        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

        - +

        Modifying it internally using the SQL Console

        The SQL Console is Trilium's built-in database editor.

        See SQL Console.

        - -

        Externally modifying the database

        - +

        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

        - +

        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:

        @@ -47,13 +41,10 @@
      7. Close the application or close the database.

      - +

      - -

      Using the SQLite CLI

      - -

      First, start the SQLite 3 CLI by specifying the path to the database:

      -
      sqlite3 ~/.local/share/trilium-data/document.db
      +

      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.
      • diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Database/Manually altering the database/SQL Console.html b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Database/Manually altering the database/SQL Console.html index f9d6d674b..255d0efcf 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Database/Manually altering the database/SQL Console.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Database/Manually altering the database/SQL Console.html @@ -17,11 +17,9 @@

        It can be accessed by going to the global menu → Advanced → Open SQL Console.

        - +

        - -

        Interaction

        - +

        Interaction

        • Hovering the mouse over one of the tables listed at the top of the document @@ -32,23 +30,20 @@

        • To run the statement, press the - icon.

          + icon.

        • For queries that return a result, the data will displayed in a table.

          - +

        - -

        Saved SQL console

        - +

        Saved SQL console

        SQL queries or commands can be saved into a dedicated note.

        To do so, simply write the query and press the button. Once saved, the note will appear in Day Notes.

        + alt="">button. Once saved, the note will appear in Day Notes.

        • 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.
        • diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Default Note Title.html b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Default Note Title.html index bf0f0d4ce..2ea1ab689 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Default Note Title.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Default Note Title.html @@ -38,9 +38,7 @@ 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

          - +

          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.

          diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/ETAPI (REST API).html b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/ETAPI (REST API).html index 083d4b678..d6272c05a 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/ETAPI (REST API).html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/ETAPI (REST API).html @@ -19,16 +19,12 @@

          trilium-py is a third-party Python implementation for ETAPI client, you can use Python to communicate with Trilium.

          - -

          Authentication

          - +

          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):

          -
          GET https://myserver.com/etapi/app-info
          +          call (see the spec):

          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
          +        

          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 diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Note Map.html b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Note Map.html index 58ca2cd8f..c944c0673 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Note Map.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Note Map.html @@ -16,23 +16,17 @@

            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

            - +

            Link Map

            Shows relations between notes:

            - +

            - -

            Tree Map

            - +

            Tree Map

            Shows hierarchical map of notes:

            - +

            - -

            See also

            - +

            See also

            Relation map is a similar concept, with some differences:

              diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Relation Map.html b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Relation Map.html index 2fe0bd15a..7751d1f3d 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Relation Map.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Relation Map.html @@ -16,17 +16,15 @@

              Relation map is a type of note which visualizes notes and their relations. See an example:

              - -

              Development process demo

              - +

              Development process demo

              This is a basic example how you can create simple diagram using relation maps:

              - +

              And this is how you can create it:

              - +

              We start completely from scratch by first creating new note called "Development process" and changing its type to "Relation map". After that we create @@ -37,17 +35,15 @@ 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".

              - -

              Family demo

              - +

              Family demo

              This is more complicated demo using some advanced concepts. Resulting diagram is here:

              - +

              This is how you get to it:

              - +

              There are several steps here:

                @@ -82,17 +78,13 @@

                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.

                - -

                Details

                - +

                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

                - +

                See also

                diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Sharing.html b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Sharing.html index b46cddaf5..a8bf2a092 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Sharing.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Sharing.html @@ -16,21 +16,17 @@

                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

                - +

                Prerequisites

                To use the sharing feature, you must have a server installation of Trilium. This is necessary because the notes will be hosted from the server.

                - -

                How to Share a Note

                - +

                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 + Share Note

                2. @@ -38,47 +34,33 @@ 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 + Shared Note Example

                - -

                Sharing a Note Subtree

                - +

                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 + Shared Subtree Example

                - -

                Viewing All Shared Notes

                - +

                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

                - +

                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

                - +

                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.

                - -

                Advanced Sharing Options

                - - -

                Customizing the Appearance of Shared Notes

                - +

                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:

                - -

                Adding JavaScript

                - +

                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:

                -
                const currentNote = await fetchNote();
                +        

                Example:

                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). @@ -117,32 +95,24 @@ for (const attr of parentNote.attributes) {

              • Using slashes (/) within aliases to create subpaths is not supported.
    - -

    Viewing and Managing Shared Notes

    - +

    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 + Shared Notes List

    - -

    Setting a Custom Favicon

    - +

    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

    - +

    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

    - +

    Additional Options

    • Raw Note Sharing: Use the #shareRaw label to share a note without any HTML wrapper.
    • @@ -152,9 +122,7 @@ for (const attr of parentNote.attributes) {
    • Shared Notes Index: For text notes with the #shareIndex label, the content will display a list of all shared note roots.
    - -

    Limitations

    - +

    Limitations

    While the sharing feature is powerful, it has some limitations:

    • No Relation Map Support diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Sharing/Serving directly the content o.html b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Sharing/Serving directly the content o.html index 8824a588b..57fd5cf23 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Sharing/Serving directly the content o.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Sharing/Serving directly the content o.html @@ -26,27 +26,23 @@ - + - + - -

      By adding an attribute to the note

      - +

      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

      - +

      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.

      - +

      diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Import & Export/Evernote.html b/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Import & Export/Evernote.html index 49b9a3d29..39a4d5c84 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Import & Export/Evernote.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Import & Export/Evernote.html @@ -15,23 +15,17 @@

      Trilium can import ENEX files which are used by Evernote for backup/export. One ENEX file represents content (notes and resources) of one notebook.

      - -

      Export ENEX from Evernote

      - +

      Export ENEX from Evernote

      To export ENEX file, you need to have a legacy desktop version of Evernote (i.e. not web/mobile). Right click on notebook and select export and follow the wizard.

      - -

      Import ENEX in Trilium

      - +

      Import ENEX in Trilium

      Once you have ENEX file, you can import it to Trilium. Right click on some note (to which you want to import the file), click on "Import" and select the ENEX file.

      After importing the ENEX file, go over the imported notes and resources to be sure the import went well, and you didn't lose any data.

      - -

      Limitations

      - +

      Limitations

      All resources (except for images) are created as note's attachments.

      HTML inside ENEX files is not exactly valid so some formatting maybe broken or lost. You can report major problems into Trilium issue tracker. diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Import & Export/Markdown.html b/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Import & Export/Markdown.html index 9f6b4b04f..aa9a810d5 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Import & Export/Markdown.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Import & Export/Markdown.html @@ -16,20 +16,14 @@

      Trilium Notes supports importing Markdown restricted to the CommonMark specification (where tables are not supported)

      - -

      Import

      - - -

      Clipboard import

      - +

      Import

      +

      Clipboard import

      If you want to import just a chunk of markdown from clipboard, you can do it from editor block menu:

      - +

      - -

      File import

      - +

      File import

      You can also import Markdown files from files:

      • single markdown file (with .md extension)
      • @@ -44,30 +38,22 @@

      [[gifs/markdown-file-import.gif]]

      - +

      - -

      Export

      - - -

      Subtree export

      - +

      Export

      +

      Subtree export

      You can export whole subtree to ZIP archive which will have directory structured modelled after subtree structure:

      - +

      - -

      Single note export

      - +

      Single note export

      If you want to export just single note without its subtree, you can do it from Note actions menu:

      - +

      - -

      Exporting protected notes

      - +

      Exporting protected notes

      If you want to export protected notes, enter a protected session first! This will export the notes in an unencrypted form, so if you reimport into Trilium, make sure to re-protect these notes.

      diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Import & Export/OneNote.html b/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Import & Export/OneNote.html index 23f5fe9cd..57c5d2f32 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Import & Export/OneNote.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Import & Export/OneNote.html @@ -15,9 +15,7 @@

      This page describes a method to migrate via EverNote Legacy, but this app is no longer available/working.

      - -

      Prep Onenote notes for best compatibility

      - +

      Prep Onenote notes for best compatibility

      • Remove Onenote Tags and replace with Emoji if possible (Onenote Tags will get imported into trilium as an image which clutters the Trilium tree somewhat)
      • @@ -31,12 +29,8 @@ list (Sometimes the numbered list will start at 1 again in Trilum if there is an extra space in the list in OneNote).
      - -

      Migration Procedure

      - - -

      Import into Evernote from OneNote:

      - +

      Migration Procedure

      +

      Import into Evernote from OneNote:

      • Install Evernote Legacy. Current versions of Evernote do not have this functionality. (Requires @@ -48,16 +42,12 @@

        If exporting all sections at a time, they will not be grouped in folders - they will all be added to a single folder, but the order will be kept, so you can re-group into folders after importing to Trilium

        - -

        Export from Evernote

        - +

        Export from Evernote

        • Right click on the created notebook in Evernote and choose "Export Notes…"
        • Use the default export format of .enex
        - -

        Cleanup enex file (optional)

        - +

        Cleanup enex file (optional)

        • If the Onenote header (that is at the top of each Onenote page) is not @@ -67,9 +57,7 @@

        - -

        Import into Trilium

        - +

        Import into Trilium

        • In Trilium, right click on the root node and choose Import (all default options should be fine).
        • @@ -77,9 +65,7 @@
        • Be patient. Large .enex files may take a few minutes to process
        • Repeat import for each .enex file
        - -

        Other importing notes:

        - +

        Other importing notes:

        • Centered text in Onenote will be left-justified after importing into Trilium
        • Internal onenote links will obviously be broken, but the link still exists diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Keyboard Shortcuts.html b/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Keyboard Shortcuts.html index 6c3f8b5c2..91e79ff18 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Keyboard Shortcuts.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Keyboard Shortcuts.html @@ -23,7 +23,7 @@

          Note navigation

          • , - go up/down in the - list of notes, Ctrl + Shift + and Ctrl + Shift +  work + list of notes, Ctrl + Shift + and Ctrl + Shift +  work also from editor
          • , - collapse/expand node
          • Alt + , Alt + - diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Navigation/Bookmarks.html b/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Navigation/Bookmarks.html index 1a437ade1..10f58c90b 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Navigation/Bookmarks.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Navigation/Bookmarks.html @@ -15,15 +15,13 @@

            To easily access selected notes, you can bookmark them. See demo:

            - +

            - -

            Bookmark folder

            - +

            Bookmark folder

            Space in the left panel is limited, and you might want to bookmark many items. One possible solution is to bookmark a folder, so it shows its children:

            - +

            To do this, you need to add a #bookmarkFolder label to the note.

            diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Navigation/Note Hoisting.html b/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Navigation/Note Hoisting.html index 42229dd03..7586b532d 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Navigation/Note Hoisting.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Navigation/Note Hoisting.html @@ -17,7 +17,7 @@ "zoom into") a specific note and its subtree by hiding all parent and sibling notes. Demo:

            - +

            In addition to showing only this subtree, this also narrows both full text search and “jump to note” to just diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Navigation/Search.html b/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Navigation/Search.html index de4cfd4a0..81c7e98e7 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Navigation/Search.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Navigation/Search.html @@ -136,7 +136,6 @@ \#hash #myLabel = 'Say "Hello World"'

    Escaping Special Characters

    -

     

    Special characters can be enclosed in quotes or escaped with a backslash to be used in full-text search:

    "note.txt"
     \#hash
    diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Navigation/Tree Concepts.html b/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Navigation/Tree Concepts.html
    index 228cb0fe8..227b78f98 100644
    --- a/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Navigation/Tree Concepts.html	
    +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Navigation/Tree Concepts.html	
    @@ -15,13 +15,9 @@
           

    This page explains the basic concepts related to the tree structure of notes in TriliumNext.

    - -

    Note

    - +

    Note

    A note is the central entity in TriliumNext. For more details, see Note.

    - -

    Branch

    - +

    Branch

    A branch describes the placement of a note within the note tree. Essentially, it is a tuple of parentNoteId and noteId, indicating that the given note is placed as a child under the specified parent note.

    @@ -29,9 +25,7 @@ multiple locations within the tree. This concept is referred to as " cloning."

    - -

    Prefix

    - +

    Prefix

    A prefix is a branch-specific title modifier for a note. If you place your note in two different locations within the tree and want to alter the title slightly in one of those placements, you can use a prefix.

    @@ -41,9 +35,7 @@ note is protected. This can be useful if you want part of the title to remain visible in the tree for easier navigation, even when the note is protected.

    - -

    Subtree

    - +

    Subtree

    A subtree consists of a particular note (the subtree root) and all its children and descendants. Some operations, such as exporting, work on entire subtrees.

    diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Navigation/Workspace.html b/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Navigation/Workspace.html index f39ff8b8e..ac06296a7 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Navigation/Workspace.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Navigation/Workspace.html @@ -27,19 +27,17 @@
  • easy entering of workspace: 

    - +

  • visual identification of workspace in tabs: -
    - +
    +

  • - -

    How to use workspaces

    - +

    How to use workspaces

    Let's say you have identified the workspaces and their subtrees. Define on the root of this subtree following labels:

      diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Note.html b/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Note.html index 0042fb904..ed7f38ecb 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Note.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Note.html @@ -15,9 +15,7 @@

      Note is a central entity in Trilium. Main attributes of note are title and content.

      - -

      Note types

      - +

      Note types

      • text note - this is default note type which allows you to put rich text, images etc.
      • @@ -44,23 +42,17 @@

      In Trilium there's no specific "folder" note type. Any note can have children and thus be a folder.

      - -

      Root note

      - +

      Root note

      There's one special note called "root note" which is root of the note tree. All other notes are placed below it in the structure.

      - -

      Tree structure

      - +

      Tree structure

      Importantly, note itself doesn't carry information on its placement in note tree. See cloning for details.

      Tree structure of notes can resemble file system - but compared to that notes in Trilium can act as both file and directory - meaning that note can both have its own content and have children. "Leaf note" is a note which doesn't have any children.

      - -

      Deleting / undeleting notes

      - +

      Deleting / undeleting notes

      When you delete a note in Trilium, it is actually only marked for deletion (soft-delete) - the actual content, title, attributes etc. are not deleted, only hidden.

      @@ -79,9 +71,7 @@

      After the 7 days (configurable) the notes will be "erased" - their title, content, revisions and attributes will be erased, and it will not be possible anymore to recover them (unless you restore backup).

      - -

      See also

      - +

      See also

      • Read-only note
      • diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Note/Archived Notes.html b/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Note/Archived Notes.html index f3508b293..f7700bb24 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Note/Archived Notes.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Note/Archived Notes.html @@ -22,7 +22,7 @@

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

        - +

    diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Note/Export as PDF.html b/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Note/Export as PDF.html index 2b9620089..9adfe50b8 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Note/Export as PDF.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Note/Export as PDF.html @@ -14,7 +14,7 @@

    - +

    Screenshot of the note contextual menu indicating the “Export as PDF” option.

    @@ -22,8 +22,7 @@ as PDF. On the server or PWA (mobile), the option is not available due to technical constraints and it will be hidden.

    To print a note, select the - button to the right of the note and select Export as PDF.

    + button to the right of the note and select Export as PDF.

    Afterwards you will be prompted to select where to save the PDF file. Upon confirmation, the resulting PDF will be opened automatically using the default/system application configured for PDFs.

    @@ -32,24 +31,18 @@ report the issue. In this case, it's best to offer a sample note (click on the - button, select Export note → This note and all of its descendants → HTML + button, select Export note → This note and all of its descendants → HTML in ZIP archive). Make sure not to accidentally leak any personal information.

    - -

    Landscape mode

    - +

    Landscape mode

    When exporting to PDF, there are no customizable settings such as page orientation, size, etc. However, it is possible to specify a given note to be printed as a PDF in landscape mode by adding the #printLandscape attribute to it (see [missing note]).

    - -

    Page size

    - +

    Page size

    By default, the resulting PDF will be in Letter format. It is possible to adjust it to another page size via the #printPageSize attribute, with one of the following values: A0, A1, A2, A3, A4, A5, A6, Legal, Letter, Tabloid, Ledger.

    - -

    Keyboard shortcut

    - +

    Keyboard shortcut

    It's possible to trigger the export to PDF from the keyboard by going to Keyboard shortcuts and assigning a key combination for the exportAsPdf action.

    diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Note/Note Icons.html b/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Note/Note Icons.html index ed787d157..9713f5fdb 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Note/Note Icons.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Note/Note Icons.html @@ -20,12 +20,10 @@ the css class names is not necessary. While editing a note, click on the icon next to the title to bring up a chooser gallery:

    - change note icon + change note icon

    - note icon gallery + note icon gallery

    diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Note/Note Revisions.html b/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Note/Note Revisions.html index 79a9ad51b..e7db23875 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Note/Note Revisions.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Note/Note Revisions.html @@ -15,18 +15,14 @@

    Trilium supports seamless versioning of notes by storing snapshots ("revisions") of notes at regular intervals.

    - -

    Note Revisions Snapshot Interval

    - +

    Note Revisions Snapshot Interval

    Time interval of taking note snapshot is configurable in the Options -> Other dialog. This provides a tradeoff between more revisions and more data to store.

    To turn off note versioning for a particular note (or subtree), add disableVersioning labelto the note.

    - -

    Note Revision Snapshots Limit

    - +

    Note Revision Snapshots Limit

    The limit on the number of note snapshots can be configured in the Options -> Other dialog. The note revision snapshot number limit refers to the maximum number of revisions that can be saved for each note. Where -1 means @@ -39,7 +35,7 @@

    Note revisions can be accessed through the button on the right of ribbon toolbar.

    - +

    diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Note/Protected Notes.html b/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Note/Protected Notes.html index 4720673a2..fb6414cf3 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Note/Protected Notes.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Note/Protected Notes.html @@ -41,18 +41,13 @@ cannot read or edit protected notes, they can still delete or move them outside of the protected session. - -

    Using Protected Notes

    - +

    Using Protected Notes

    By default, notes are unprotected. To protect a note, simply click on the shield icon next to the note's title, as shown here:

    - example animation of unlocking protected notes + example animation of unlocking protected notes

    - -

    What is Encrypted?

    - +

    What is Encrypted?

    Trilium encrypts the data within protected notes but not their metadata. Specifically:

    Encrypted: @@ -71,9 +66,7 @@

  • Attributes
  • - -

    Encryption Details

    - +

    Encryption Details

    The following steps outline how encryption and decryption work in Trilium:

    1. The user enters a password.
    2. @@ -105,9 +98,7 @@
    - -

    Sharing Protected Notes

    - +

    Sharing Protected Notes

    Protected notes cannot be shared in the same way as regular notes. Their encryption ensures that only authorized users with the correct password can access them.

    diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Note/Read-Only Notes.html b/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Note/Read-Only Notes.html index adaac6248..96104eda0 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Note/Read-Only Notes.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Note/Read-Only Notes.html @@ -17,14 +17,10 @@ in Trilium can be set to read-only. When a note is in read-only mode, it is presented to the user in a non-editable view, with the option to switch to editing mode if needed.

    - -

    Setting Read-Only Mode with a Label

    - +

    Setting Read-Only Mode with a Label

    To set a note as read-only, add the readOnly label to the note.

    - -

    Automatic Read-Only Mode

    - +

    Automatic Read-Only Mode

    For optimization purposes, Trilium will automatically set very large notes to read-only. Displaying such lengthy notes in editing mode can slow down performance, especially when editing is unnecessary.

    diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Note/Sorting Notes.html b/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Note/Sorting Notes.html index e70c16d24..3fb493c2f 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Note/Sorting Notes.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Note/Sorting Notes.html @@ -14,14 +14,11 @@

    Sorting Notes

    -

    You can sort notes by right-clicking the parent note in the note tree and selecting Advanced -> Sort notes by ... This will sort existing notes, but will not automatically sort future notes added to this parent note

    - -

    Automatic/Permanent Sorting

    - +

    Automatic/Permanent Sorting

    Child notes can be automatically sorted by attaching specific labels to the parent note:

      diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Themes/Theme Gallery.html b/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Themes/Theme Gallery.html index 73fe73d66..02ce2edac 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Themes/Theme Gallery.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/Themes/Theme Gallery.html @@ -14,9 +14,7 @@

      These are user-created themes which were made publicly available:

      - -

      Legacy Themes

      - +

      Legacy Themes

      These themes may or may not be compatible with the latest versions of TriliumNext and are based on the original/legacy theme.

      diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/UI Elements/Global menu.html b/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/UI Elements/Global menu.html index d08cb3758..5de10b75a 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/UI Elements/Global menu.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/UI Elements/Global menu.html @@ -16,11 +16,9 @@

      The global menu configures the current window (zoom, keeping the window on top) and offers access to some more advanced options.

      - +

      - -

      Accessing the global menu

      - +

      Accessing the global menu

      See Vertical and horizontal layout since the position of the global menu is changed based on which layout has been selected.

      diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/UI Elements/Launch Bar.html b/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/UI Elements/Launch Bar.html index e950c2e69..c49a3718b 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/UI Elements/Launch Bar.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/UI Elements/Launch Bar.html @@ -14,14 +14,11 @@

      Position of the Launch bar

      -

      Depending on the layout selected, the launcher bar will either be on the left side of the screen with buttons displayed vertically or at the top of the screen. See Vertical and horizontal layout for more information.

      - -

      Terminology

      - +

      Terminology

      • Launcher: a button that can be (or is) displayed on the launch bar.
      • @@ -30,9 +27,7 @@
      • Visible Launcher: a launcher that is currently displayed on the launch bar.
      - -

      Configuring the Launch bar

      - +

      Configuring the Launch bar

      There are two ways to configure the launch bar:

      • Right click in the empty space between launchers on the launch bar and @@ -43,14 +38,12 @@

        This will open a new tab with the Note Tree listing the launchers.

        - +

        Expanding Available Launchers section will show the list of launchers that are not displayed on the launch bar. The Visible Launchers will show the ones that are currently displayed.

        - -

        Adding/removing and reordering launchers

        - +

        Adding/removing and reordering launchers

        To display a new launcher in the launch bar, first look for it in the Available Launchers section. Then right click it and select Move to visible launchers. It is also possible to drag and drop the item manually.

        @@ -59,31 +52,25 @@

        Drag-and-drop the items in the tree in order to change their order. See  Note Tree for more interaction options, including using keyboard shortcuts.

        - -

        Customizing the launcher

        - +

        Customizing the launcher

        • The icon of a launcher can be changed just like a normal note. See  Note Icons for more information.
        • The title of the launcher can also be changed.
        - -

        Resetting

        - +

        Resetting

        Resetting allows restoring the original configuration of Trilium for the launcher bar, or for a portion of it. Simply right click a launcher (or even the entire Launch Bar section) and select Reset to bring it back to the original state.

        - -

        Creating new launchers / types of launchers

        - +

        Creating new launchers / types of launchers

        Right click either the Available launchers or Visible launchers sections and select one of the options:

        1. Note Launcher -
          A note launcher will simply navigate to a specified note.

          +
          A note launcher will simply navigate to a specified note.

          1. Set the target promoted attribute to the note to navigate to.
          2. Optionally, set hoistedNote to hoist a particular note. See  @@ -94,7 +81,7 @@
          3. Script Launcher -
            An advanced launcher which will run a script upon pressing. See Scripts for +
            An advanced launcher which will run a script upon pressing. See Scripts for more information.

            1. Set script to point to the desired script to run.
            2. @@ -110,7 +97,7 @@
            3. Spacers -
              Launchers that create some distance between other launchers for better +
              Launchers that create some distance between other launchers for better visual distinction.

            diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/UI Elements/Note Tree.html b/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/UI Elements/Note Tree.html index 34936287b..2b901005e 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/UI Elements/Note Tree.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/UI Elements/Note Tree.html @@ -55,7 +55,7 @@

            In the right-click menu, operations such as Cut, Copy, Move to, Clone to or Delete will apply to all the selected notes. It is also possible - to apply Bulk actions to + to apply Bulk actions to them. The rest of the options will not be available and will appear disabled in the menu.

      diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/UI Elements/Ribbon.html b/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/UI Elements/Ribbon.html index 10d71d7cd..b83fd3f17 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/UI Elements/Ribbon.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/UI Elements/Ribbon.html @@ -14,13 +14,11 @@

      - +

      The ribbon allows changing options, attributes and viewing information about the current note.

      - -

      Settings

      - +

      Settings

      It is possible to change whether some ribbon items will be automatically open when navigating to a new note. To do so, in Settings, go to Appearance and look for the Ribbon widgets section.

      diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/UI Elements/Vertical and horizontal layout.html b/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/UI Elements/Vertical and horizontal layout.html index ad9ea06c4..263ab1b4e 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/UI Elements/Vertical and horizontal layout.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Basic Concepts/UI Elements/Vertical and horizontal layout.html @@ -14,11 +14,8 @@

      Layouts

      -

      Trilium supports two different layouts, based on your preference.

      - -

      Vertical layout

      - +

      Vertical layout

      The vertical layout is Trilium's original layout:

      • The Launcher Bar is positioned on the @@ -29,17 +26,15 @@ href="Note%20Tree.html">Note Tree.
      • The Note Tree can be collapsed by pressing the - button at the bottom of the Launcher Bar.
      • + button at the bottom of the Launcher Bar.
      • The Global menu can be accessed via the icon at the top of the Launcher Bar.
      • + src="5_Vertical and horizontal la.png" alt="">icon at the top of the Launcher Bar.

      - +

      - -

      Horizontal layout

      - +

      Horizontal layout

      The horizontal layout is a more traditional layout, since it bears similarity with other applications. In this mode:

        @@ -53,17 +48,15 @@ removed if needed.
      • The Note Tree can be collapsed by pressing the small - button to the left of the first tab.
      • + button to the left of the first tab.
      • The Global menu can be accessed via the button at the end of the Launcher Bar.
      • + src="1_Vertical and horizontal la.png" alt="">button at the end of the Launcher Bar.

      - +

      - -

      Changing the layout

      - +

      Changing the layout

      Go to Settings and look for the Appearance option on the left. Then look for the Layout section, where there is the possibility to switch between the two available layouts.

      diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Developer Guides/Examples/Downloading responses from Goo.html b/src/public/app/doc_notes/en/User Guide/User Guide/Developer Guides/Examples/Downloading responses from Goo.html index f6594751b..a0c4a4c85 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Developer Guides/Examples/Downloading responses from Goo.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Developer Guides/Examples/Downloading responses from Goo.html @@ -19,9 +19,7 @@

      Note that the link will be publicly accessible to everyone (however the link is in a hard-to-guess format such as https://docs.google.com/spreadsheets/d/e/2PACX-1vTA8NU2_eZFhc8TFadCZPreBfvP7un8IHd6J0SchrLLw3ueGmntNZjwRmsH2ZRcp1pJYDAzMz1FmFaj/pub?output=csv). Make sure you are not accidentally publishing sensitive information.

      - -

      Obtaining the CSV link

      - +

      Obtaining the CSV link

      1. Open the Google Forms in a browser.
      2. Select the “Responses” tab and click on “Link to Sheets”.
      3. @@ -31,11 +29,8 @@ and instead of “Web page”, select “Comma-separated values (.csv)”.
      4. Copy the given link which will be used for the upcoming script.
      - -

      Creating the script

      - -

      Create a “JS Frontend” script:

      -
      const CSV_URL = "https://docs.google.com/spreadsheets/d/e/2PACX-1vTiwooLV2whjCSVa49dJ99p_G3_qhqHHRqttMjYCJVfLXVdTgUSNJu5K0rpqmaHYF2k7Vofi3o7gW82/pub?output=csv";
      +        

      Creating the script

      +

      Create a “JS Frontend” script:

      const CSV_URL = "https://docs.google.com/spreadsheets/d/e/2PACX-1vTiwooLV2whjCSVa49dJ99p_G3_qhqHHRqttMjYCJVfLXVdTgUSNJu5K0rpqmaHYF2k7Vofi3o7gW82/pub?output=csv";
       
       async function fetchData() {
           try {
      @@ -50,8 +45,7 @@ const data = await fetchData();
       console.log(data);
       // Do something with the data.

      Note that the data will be received as a string and there is no library - to do the CSV parsing for us. To do a very simple parsing of CSV:

      -
      const content = data
      +          to do the CSV parsing for us. To do a very simple parsing of CSV:

      const content = data
       	.split("\n")
       	.slice(1)
       	.map((row) => row.split(","));
      diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Developer Guides/Examples/Using promoted attributes to c.html b/src/public/app/doc_notes/en/User Guide/User Guide/Developer Guides/Examples/Using promoted attributes to c.html index 42bde7256..3039dbd7d 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Developer Guides/Examples/Using promoted attributes to c.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Developer Guides/Examples/Using promoted attributes to c.html @@ -18,31 +18,23 @@ it's processing data, or a checkbox to define a particular change in behavior for the script.

      - +

      - -

      Using check boxes to toggle flags

      - +

      Using check boxes to toggle flags

      Instead of asking the user to modify a boolean value in the script, it's much more intuitive to use a checkbox for it as a promoted attribute.

      -

      To do so, first define the promoted attribute:

      -
      #label:groupByExtension="promoted,alias=Group by extension,single,boolean"
      -

      Then use it:

      -
      const byExtension = api.currentNote.getLabelValue("groupByExtension") === "true";
      +        

      To do so, first define the promoted attribute:

      #label:groupByExtension="promoted,alias=Group by extension,single,boolean"
      +

      Then use it:

      const byExtension = api.currentNote.getLabelValue("groupByExtension") === "true";
       if (byExtension) {
       	// Do something.
       }

      This will work equally well in both front-end and back-end scripts.

      - -

      Using relations to select notes

      - +

      Using relations to select notes

      One common use case for a script is to read data from another note and perhaps output its result in another note. To do so we need to define the - following promoted attributes:

      -
      #relation:input="promoted,alias=Input,single" #relation:output="promoted,alias=Output,single"
      + following promoted attributes:

      #relation:input="promoted,alias=Input,single" #relation:output="promoted,alias=Output,single"

      Once we have this, we can add some basic error handling to ensure that - the fields are completed by the user:

      -
      const inputNoteId = api.currentNote.getRelationValue("input");
      +          the fields are completed by the user:

      const inputNoteId = api.currentNote.getRelationValue("input");
       if (!inputNoteId) {
       	api.showError("Missing input.");
           return;
      @@ -56,8 +48,7 @@ if (!outputNoteId) {
               

      Note that here we are using api.showError which is only available for frontend notes. If you are writing a backend note, simply remove api.showError but the user will no feedback on why the script did not execute properly.

      -

      Afterwards we can simply read the note and do something with it:

      -
      const note = api.getNote(inputNoteId);
      +        

      Afterwards we can simply read the note and do something with it:

      const note = api.getNote(inputNoteId);
       if (!note) {
       	return;
       }
      diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Developer Guides/Frontend Basics.html b/src/public/app/doc_notes/en/User Guide/User Guide/Developer Guides/Frontend Basics.html
      index b679700ed..6c3581fa3 100644
      --- a/src/public/app/doc_notes/en/User Guide/User Guide/Developer Guides/Frontend Basics.html	
      +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Developer Guides/Frontend Basics.html	
      @@ -14,22 +14,17 @@
       
             

      Frontend API

      -

      The frontend api supports two styles, regular scripts that are run with the current app and note context, and widgets that export an object to Trilium to be used in the UI. In both cases, the frontend api of Trilium is available to scripts running in the frontend context as global variable api. The members and methods of the api can be seen on the Script API page.

      - -

      Scripts

      - +

      Scripts

      Scripts don't have any special requirements. They can be run at will using the execute button in the UI or they can be configured to run at certain times using Attributes on the note containing the script.

      - -

      Global Events

      - +

      Global Events

      This attribute is called #run and it can have any of the following values:

        @@ -39,9 +34,7 @@
      • hourly - executes once an hour on backend.
      • daily - executes once a day on backend.
      - -

      Entity Events

      - +

      Entity Events

      These events are triggered by certain relations to other notes. Meaning that the script is triggered only if the note has this script attached to it through relations (or it can inherit it).

      @@ -67,9 +60,7 @@
    • runOnAttributeChange - executes when attribute is changed under this note.
    • - -

      Widgets

      - +

      Widgets

      Conversely to scripts, widgets do have some specific requirements in order to work. A widget must:

        @@ -92,9 +83,7 @@
      - -

      parentWidget

      - +

      parentWidget

      • left-pane - This renders the widget on the left side of the screen where the note tree lives.
      • @@ -105,9 +94,7 @@
      • right-pane - This renders the widget to the right of any opened notes.
      - -

      Tutorial

      - +

      Tutorial

      For more information on building widgets, take a look at Widget Basics.

      diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Developer Guides/Widget Basics.html b/src/public/app/doc_notes/en/User Guide/User Guide/Developer Guides/Widget Basics.html index 5c44d672a..edcbd4284 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Developer Guides/Widget Basics.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Developer Guides/Widget Basics.html @@ -16,12 +16,9 @@

      This guide will walk you through creating a basic widget inside Trilium. By following these steps, you'll learn how to build a simple UI element that interacts with the user.

      - -

      Step 1: The Basic Widget Structure

      - +

      Step 1: The Basic Widget Structure

      To start, we'll create the most basic widget possible. Here's a simple - example:

      -
      class MyWidget extends api.BasicWidget {
      +          example:

      class MyWidget extends api.BasicWidget {
           get position() { return 1; }
           get parentWidget() { return "left-pane"; }
           
      @@ -45,11 +42,8 @@ module.exports = new MyWidget();
      is found, the widget is functioning correctly. If undefined is returned, double-check that the note has the #widget attribute.

      - -

      Step 2: Adding an UI Element

      - -

      Next, let's improve the widget by adding a button to it.

      -
      const template = ``;
      +        

      Step 2: Adding an UI Element

      +

      Next, let's improve the widget by adding a button to it.

      const template = ``;
       
       class MyWidget extends api.BasicWidget {
           get position() {return 1;}
      @@ -64,16 +58,12 @@ class MyWidget extends api.BasicWidget {
       module.exports = new MyWidget();

      After making this change, reload Trilium. You should now see a button in the top-left corner of the left pane.

      - -

      Step 3: Styling the Widget

      - +

      Step 3: Styling the Widget

      To make the button more visually appealing and position it correctly, we'll apply some custom styling. Trilium includes Box Icons, which we'll use to replace the button text with an icon. For example the bx bxs-magic-wand icon.

      -

      Here's the updated template:

      -
      const template = ``;
      -

      Next, we'll adjust the button's position using CSS:

      -
      class MyWidget extends api.BasicWidget {
      +        

      Here's the updated template:

      const template = ``;
      +

      Next, we'll adjust the button's position using CSS:

      class MyWidget extends api.BasicWidget {
           get position() { return 1; }
           get parentWidget() { return "left-pane"; }
           
      @@ -92,12 +82,9 @@ module.exports = new MyWidget();
      module.exports = new MyWidget();

      After reloading Trilium, the button should now appear at the bottom left of the left pane, alongside other action buttons.

      - -

      Step 4: Adding User Interaction

      - +

      Step 4: Adding User Interaction

      Let’s make the button interactive by showing a message when it’s clicked. - We'll use the api.showMessage method from the Script API.

      -
      class MyWidget extends api.BasicWidget {
      +          We'll use the api.showMessage method from the Script API.

      class MyWidget extends api.BasicWidget {
           get position() { return 1; }
           get parentWidget() { return "left-pane"; }
           
      diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/FAQ.html b/src/public/app/doc_notes/en/User Guide/User Guide/FAQ.html
      index 1c90d07fb..ed2c38ea2 100644
      --- a/src/public/app/doc_notes/en/User Guide/User Guide/FAQ.html	
      +++ b/src/public/app/doc_notes/en/User Guide/User Guide/FAQ.html	
      @@ -14,7 +14,6 @@
       
             

      Mac OS support

      -

      Originally, desktop builds of Trilium Notes has been available for Windows & Linux, but there has been a considerable demand for macOS build.

      So I made one, but I underestimated the differences and specifics of Mac @@ -27,18 +26,14 @@ or integrations. Note that this is more of an acknowledgment of an existing state rather than sudden change of direction.

      Of course, PRs are welcome.

      - -

      Translation / localization support

      - +

      Translation / localization support

      Trilium is currently available only in English. Translation to other languages is not planned in the near/medium term because it brings a significant maintenance overhead. This decision might be revisited once Trilium stabilizes into a more mature product.

      For Chinese, there's an unofficial fork here. Use at your own risk.

      - -

      Multi user support

      - +

      Multi user support

      Common request is to allow multiple users collaborate, share notes etc. So far I'm resisting this because of these reasons:

        @@ -55,9 +50,7 @@ href="Note%20Types/Code/Scripts.html">scriptingsupport would be a XSS security hole, while with the single user assumption it's an endless customizable tool.
      - -

      How to open multiple documents in one Trilium instance

      - +

      How to open multiple documents in one Trilium instance

      This is normally not supported - one Trilium process can open only a single instance of a database. However, you can run two Trilium processes (from one installation), each connected @@ -66,14 +59,11 @@ the TRILIUM_DATA_DIR environment variable and separate port on TRILIUM_PORT environment variable. How to do that depends on the platform, in Unix-based systems you can achieve that by running - command such as this:

      -
      TRILIUM_DATA_DIR=/home/me/path/to/data/dir TRILIUM_PORT=12345 trilium 
      + command such as this:

      TRILIUM_DATA_DIR=/home/me/path/to/data/dir TRILIUM_PORT=12345 trilium 

      You can save this command into a .sh script file or make an alias. Do this similarly for a second instance with different data directory and port.

      - -

      Can I use Dropbox / Google Drive / OneDrive to sync data across multiple computers.

      - +

      Can I use Dropbox / Google Drive / OneDrive to sync data across multiple computers.

      No.

      These general purpose sync apps are not suitable to sync database files which are open and being worked on by another application. The result is @@ -84,9 +74,7 @@

      The only supported way to sync Trilium's data across the network is to use a sync/web server.

      - -

      Why database instead of flat files?

      - +

      Why database instead of flat files?

      Trilium stores notes in a database which is an SQLite database. People often ask why doesn't Trilium rather use flat files for note storage - it's fair question since flat files are easily diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Backup.html b/src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Backup.html index e1d2554b8..0bbd775ca 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Backup.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Backup.html @@ -30,9 +30,7 @@

      Note that synchronization provides also some backup capabilities by its nature of distributing the data to other computers.

      - -

      Restoring backup

      - +

      Restoring backup

      Let's assume you want to restore the weekly backup, here's how to do it:

      • find data directory Trilium uses - easy @@ -57,12 +55,9 @@

        If you have configured sync then you need to do it across all members of the sync cluster, otherwise older version (restored backup) of the document will be detected and synced to the newer version.

        - -

        Disabling backup

        - +

        Disabling backup

        Although this is not recommended, it is possible to disable backup in config.ini in - the data directory:

        -
        [General]
        +          the data directory:

        [General]
         ... some other configs
         # set to true to disable backups (e.g. because of limited space on server)
         noBackup=true
        diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Data directory.html b/src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Data directory.html index 85bd7bd42..ead3e2f91 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Data directory.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Data directory.html @@ -23,13 +23,11 @@ documents
      • log - contains application log files
      - -

      Location

      - +

      Location

      Easy way how to find out which data directory Trilium uses is to look at the "About Trilium Notes" dialog (from "Menu" in upper left corner):

      - +

      Here's how the location is decided:

      Data directory is normally named trilium-data and it is stored @@ -43,24 +41,17 @@

      If you want to back up your Trilium data, just backup this single directory - it contains everything you need.

      - -

      Changing the location of data directory

      - +

      Changing the location of data directory

      If you want to use some other location for the data directory than the default one, you may change it via TRILIUM_DATA_DIR environment variable to some other location:

      - -

      Linux

      - -
      export TRILIUM_DATA_DIR=/home/myuser/data/my-trilium-data
      +

      Linux

      export TRILIUM_DATA_DIR=/home/myuser/data/my-trilium-data

      Mac OS X

      -

      You need to create a .plist file under ~/Library/LaunchAgents to load it properly each login.

      To load it manually, you need to use launchctl setenv TRILIUM_DATA_DIR <yourpath>

      -

      Here is a pre-defined template, where you just need to add your path to:

      -
      
      +        

      Here is a pre-defined template, where you just need to add your path to:

      
       
       
       
      @@ -79,18 +70,14 @@
           
       

      Create a script to run with specific data directory

      -

      An alternative to globally setting environment variable is to run only the Trilium Notes with this environment variable. This then allows for different setup styles like two database instances or "portable" installation.

      -

      To do this in unix based systems simply run trilium like this:

      -
      TRILIUM_DATA_DIR=/home/myuser/data/my-trilium-data trilium
      +

      To do this in unix based systems simply run trilium like this:

      TRILIUM_DATA_DIR=/home/myuser/data/my-trilium-data trilium

      You can then save the above command as a shell script on your path for convenience.

      - -

      Fine-grained directory/path location

      - +

      Fine-grained directory/path location

      It's possible to configure e.g. backup and log directories separately, with following environment variables:

        diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Desktop Installation.html b/src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Desktop Installation.html index 5b359c91f..32c5c7d63 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Desktop Installation.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Desktop Installation.html @@ -23,9 +23,7 @@
      • Run the Application: Launch Trilium by executing the trilium executable found within the unzipped folder.
      • - -

        Startup Scripts

        - +

        Startup Scripts

        Trilium offers various startup scripts to customize your experience:

        • **trilium-no-cert-check**: Starts Trilium without validating @@ -43,9 +41,7 @@
        • **trilium-safe-mode**: Boots Trilium in "safe mode," disabling any startup scripts that might cause the application to crash.
        - -

        Synchronization

        - +

        Synchronization

        For Trilium desktp users who wish to synchronize their data with a server instance, refer to the Synchronization Guide for detailed instructions.

        diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Mobile Frontend.html b/src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Mobile Frontend.html index 63a6e917d..825d9acf7 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Mobile Frontend.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Mobile Frontend.html @@ -21,24 +21,16 @@ See below for more details on this.

        Note that this is not an Android/iOS app, this is just mobile friendly web page served on the server edition.

        - -

        Screenshots

        - - -

        Mobile phone

        - +

        Screenshots

        +

        Mobile phone

        - +

        - -

        Tablet

        - +

        Tablet

        - +

        - -

        Limitations

        - +

        Limitations

        Mobile frontend provides only some of the features of the full desktop frontend:

          @@ -50,15 +42,11 @@
        • cloning notes is not supported
        • uploading file attachments is not supported
        - -

        Forcing mobile/desktop frontend

        - +

        Forcing mobile/desktop frontend

        Trilium decides automatically whether to use mobile or desktop frontend. If this is not appropriate, you can use ?mobile or ?desktop query param on login page (Note: you might need to log out).

        - -

        Scripting

        - +

        Scripting

        You can alter the behavior with scripts just like for normal frontend. For script notes to be executed, they need to have labeled #run=mobileStartup.

        diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Server Installation.html b/src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Server Installation.html index 0e3123110..827262152 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Server Installation.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Server Installation.html @@ -16,9 +16,7 @@

        This guide outlines the steps to install Trilium on your own server. You might consider this option if you want to set up synchronization or use Trilium in a browser - accessible from anywhere.

        - -

        Installation Options

        - +

        Installation Options

        There are several ways to install Trilium on a server, each with its own advantages:

          @@ -40,9 +38,7 @@

        The server installation includes both web and mobile frontends.

        - -

        Configuration

        - +

        Configuration

        After setting up your server installation, you may want to configure settings such as the port or enable TLS. Configuration is managed via the Trilium config.ini file, which @@ -51,30 +47,21 @@ with default values to config.ini.

        You can also review the configuration file to provide all config.ini values as environment variables instead.

        - -

        Config Location

        - +

        Config Location

        By default, config.ini, the database, and other important Trilium data files are stored in the data directory. If you prefer a different location, you can change it by setting the TRILIUM_DATA_DIR environment - variable:

        -
        export TRILIUM_DATA_DIR=/home/myuser/data/my-trilium-data
        + variable:

        export TRILIUM_DATA_DIR=/home/myuser/data/my-trilium-data

        Disabling Authentication

        -

        If you are running Trilium on localhost only or if authentication is handled by another component, you can disable Trilium’s authentication by adding - the following to config.ini:

        -
        [General]
        +          the following to config.ini:

        [General]
         noAuthentication=true

        Reverse Proxy Setup

        -

        To configure a reverse proxy for Trilium, you can use either nginx or Apache.

        - -

        nginx

        - +

        nginx

        Add the following configuration to your nginx setup to proxy - requests to Trilium:

        -
        location /trilium/ {
        +          requests to Trilium:

        location /trilium/ {
             proxy_pass http://127.0.0.1:8080/;
             proxy_http_version 1.1;
             proxy_set_header Upgrade $http_upgrade;
        @@ -82,11 +69,9 @@ noAuthentication=true
        proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; }
        -

        To avoid limiting the size of payloads, include this in the server {} block:

        -
        # Set to 0 for unlimited. Default is 1M.
        +        

        To avoid limiting the size of payloads, include this in the server {} block:

        # Set to 0 for unlimited. Default is 1M.
         client_max_body_size 0;

        Apache

        -

        For an Apache setup, refer to the Apache proxy setup guide.

      diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Server Installation/1. Installing the server/Docker Server Installation.html b/src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Server Installation/1. Installing the server/Docker Server Installation.html index dc89eca58..eb7fb661e 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Server Installation/1. Installing the server/Docker Server Installation.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Server Installation/1. Installing the server/Docker Server Installation.html @@ -17,9 +17,7 @@ https://hub.docker.com/r/triliumnext/notes/

      - -

      Prerequisites

      - +

      Prerequisites

      Ensure Docker is installed on your system.

      If you need help installing Docker, reference the Docker Installation Docs

      @@ -31,102 +29,66 @@ add the mount options of nobrl and noperm when mounting your SMB share.

      - -

      Running with Docker Compose

      - - -

      Grab the latest docker-compose.yml:

      - -
      wget https://raw.githubusercontent.com/TriliumNext/Notes/master/docker-compose.yml
      +

      Running with Docker Compose

      +

      Grab the latest docker-compose.yml:

      wget https://raw.githubusercontent.com/TriliumNext/Notes/master/docker-compose.yml

      Optionally, edit the docker-compose.yml file to configure the container settings prior to starting it. Unless configured otherwise, the data directory will be ~/trilium-data and the container will be accessible at port 8080.

      - -

      Start the container:

      - -

      Run the following command to start the container in the background:

      -
      docker compose up -d
      +

      Start the container:

      +

      Run the following command to start the container in the background:

      docker compose up -d

      Running without Docker Compose / Further Configuration

      - - -

      Pulling the Docker Image

      - +

      Pulling the Docker Image

      To pull the image, use the following command, replacing [VERSION] with the desired version or tag, such as v0.91.6 or just latest. - (See published tag names at https://hub.docker.com/r/triliumnext/notes/tags.):

      -
      docker pull triliumnext/notes:v0.91.6
      + (See published tag names at https://hub.docker.com/r/triliumnext/notes/tags.):

      docker pull triliumnext/notes:v0.91.6

      Warning: Avoid using the "latest" tag, as it may automatically upgrade your instance to a new minor version, potentially disrupting sync setups or causing other issues.

      - -

      Preparing the Data Directory

      - +

      Preparing the Data Directory

      Trilium requires a directory on the host system to store its data. This directory must be mounted into the Docker container with write permissions.

      - -

      Running the Docker Container

      - - -

      Local Access Only

      - +

      Running the Docker Container

      +

      Local Access Only

      Run the container to make it accessible only from the localhost. This setup is suitable for testing or when using a proxy server like Nginx or - Apache.

      -
      sudo docker run -t -i -p 127.0.0.1:8080:8080 -v ~/trilium-data:/home/node/trilium-data triliumnext/notes:[VERSION]
      + Apache.

      sudo docker run -t -i -p 127.0.0.1:8080:8080 -v ~/trilium-data:/home/node/trilium-data triliumnext/notes:[VERSION]
      1. Verify the container is running using docker ps.
      2. Access Trilium via a web browser at 127.0.0.1:8080.
      - -

      Local Network Access

      - +

      Local Network Access

      To make the container accessible only on your local network, first create - a new Docker network:

      -
      docker network create -d macvlan -o parent=eth0 --subnet 192.168.2.0/24 --gateway 192.168.2.254 --ip-range 192.168.2.252/27 mynet
      -

      Then, run the container with the network settings:

      -
      docker run --net=mynet -d -p 127.0.0.1:8080:8080 -v ~/trilium-data:/home/node/trilium-data triliumnext/notes:-latest
      + a new Docker network:

      docker network create -d macvlan -o parent=eth0 --subnet 192.168.2.0/24 --gateway 192.168.2.254 --ip-range 192.168.2.252/27 mynet
      +

      Then, run the container with the network settings:

      docker run --net=mynet -d -p 127.0.0.1:8080:8080 -v ~/trilium-data:/home/node/trilium-data triliumnext/notes:-latest

      To set a different user ID (UID) and group ID (GID) for the saved data, - use the USER_UID and USER_GID environment variables:

      -
      docker run --net=mynet -d -p 127.0.0.1:8080:8080 -e "USER_UID=1001" -e "USER_GID=1001" -v ~/trilium-data:/home/node/trilium-data triliumnext/notes:-latest
      + use the USER_UID and USER_GID environment variables:

      docker run --net=mynet -d -p 127.0.0.1:8080:8080 -e "USER_UID=1001" -e "USER_GID=1001" -v ~/trilium-data:/home/node/trilium-data triliumnext/notes:-latest

      Find the local IP address using docker inspect [container_name] and - access the service from devices on the local network.

      -
      docker ps
      +          access the service from devices on the local network.

      docker ps
       docker inspect [container_name]

      Global Access

      - -

      To allow access from any IP address, run the container as follows:

      -
      docker run -d -p 0.0.0.0:8080:8080 -v ~/trilium-data:/home/node/trilium-data triliumnext/notes:[VERSION]
      +

      To allow access from any IP address, run the container as follows:

      docker run -d -p 0.0.0.0:8080:8080 -v ~/trilium-data:/home/node/trilium-data triliumnext/notes:[VERSION]

      Stop the container with docker stop <CONTAINER ID>, where the container ID is obtained from docker ps.

      - -

      Custom Data Directory

      - -

      For a custom data directory, use:

      -
      -v ~/YourOwnDirectory:/home/node/trilium-data triliumnext/notes:[VERSION]
      +

      Custom Data Directory

      +

      For a custom data directory, use:

      -v ~/YourOwnDirectory:/home/node/trilium-data triliumnext/notes:[VERSION]

      If you want to run your instance in a non-default way, please use the volume switch as follows: -v ~/YourOwnDirectory:/home/node/trilium-data triliumnext/notes:<VERSION>. It is important to be aware of how Docker works for volumes, with the first path being your own and the second the one to virtually bind to. https://docs.docker.com/storage/volumes/ The path before the colon is the host directory, and the path after the colon is the container's path. More details can be found in the Docker Volumes Documentation.

      - -

      Reverse Proxy

      - +

      Reverse Proxy

      1. Nginx
      2. Apache
      - -

      Note on --user Directive

      - +

      Note on --user Directive

      The --user directive is unsupported. Instead, use the USER_UID and USER_GID environment variables to set the appropriate user and group IDs.

      - -

      Note on timezones

      - +

      Note on timezones

      If you are having timezone issues and you are not using docker-compose, you may need to add a TZ environment variable with the TZ identifier of your local timezone.

      diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Server Installation/1. Installing the server/Kubernetes server installation.html b/src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Server Installation/1. Installing the server/Kubernetes server installation.html index e7dd28425..4a78feb28 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Server Installation/1. Installing the server/Kubernetes server installation.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Server Installation/1. Installing the server/Kubernetes server installation.html @@ -17,12 +17,10 @@ You can either use our Helm chart, a community Helm chart, or roll your own Kubernetes deployment.

      The recommended way is to use a Helm chart.

      - -

      Root privileges

      - +

      Root privileges

      [!NOTE] -
      The Trilium container at this time needs to be run with root privileges. +
      The Trilium container at this time needs to be run with root privileges. It will swap to UID and GID 1000:1000 to run the node process after execution though, so the main process doesn't run with root privileges.

      @@ -35,25 +33,18 @@ variables.

      The docker image will also fix the permissions of /home/node so you don't have to use an init container.

      - -

      Helm Charts

      - +

      Helm Charts

      Official Helm chart from TriliumNext Unofficial helm chart by ohdearaugustin: https://github.com/ohdearaugustin/charts

      - -

      Adding a Helm repository

      - -

      Below is an example of how

      -
      helm repo add trilium https://triliumnext.github.io/helm-charts
      +        

      Adding a Helm repository

      +

      Below is an example of how

      helm repo add trilium https://triliumnext.github.io/helm-charts
       "trilium" has been added to your repositories

      How to install a chart

      -

      After reviewing the values.yaml from - the Helm chart, modifying as required and then creating your own:

      -
      helm install --create-namespace --namespace trilium trilium trilium/trilium -f values.yaml
      + the Helm chart, modifying as required and then creating your own:

      helm install --create-namespace --namespace trilium trilium trilium/trilium -f values.yaml

      For more information on using Helm, please refer to the Helm documentation, or create a Discussion in the TriliumNext GitHub Organization.

      diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Server Installation/1. Installing the server/Manual server installation.html b/src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Server Installation/1. Installing the server/Manual server installation.html index 6486ca9e2..48df65ee9 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Server Installation/1. Installing the server/Manual server installation.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Server Installation/1. Installing the server/Manual server installation.html @@ -15,35 +15,23 @@

      This page describes manually installing Trilium on your server. Note that this is a not well supported way to install Trilium, problems may appear, information laid out here is quite out of date. It is recommended to use either Docker or packaged build installation.

      - -

      Requirements

      - +

      Requirements

      Trilium is a node.js application. Supported (tested) version of node.js is latest 14.X.X and 16.X.X. Trilium might work with older versions as well.

      You can check your node version with this command (node.js needs to be - installed):

      -
      node --version
      + installed):

      node --version

      If your Linux distribution has only an outdated version of node.js, you can take a look at the installation instruction on node.js website, which covers most popular distributions.

      - -

      Dependencies

      - +

      Dependencies

      There are some dependencies required. You can see command for Debian and - its derivatives (like Ubuntu) below:

      -
      sudo apt install libpng16-16 libpng-dev pkg-config autoconf libtool build-essential nasm libx11-dev libxkbfile-dev
      + its derivatives (like Ubuntu) below:

      sudo apt install libpng16-16 libpng-dev pkg-config autoconf libtool build-essential nasm libx11-dev libxkbfile-dev

      Installation

      - - -

      Download

      - +

      Download

      You can either download source code zip/tar from https://github.com/TriliumNext/Notes/releases/latest]] %%{WARNING}%%or - clone git repository from stable branch with

      -
      git clone -b stable https://github.com/triliumnext/notes.git %%{WARNING}%%
      -

      Installation

      - -
      cd trilium
      +          clone git repository from stable branch with

      git clone -b stable https://github.com/triliumnext/notes.git %%{WARNING}%%
      +

      Installation

      cd trilium
       
       # download all node dependencies
       npm install
      @@ -53,18 +41,14 @@ npm rebuild
       
       # bundles & minifies frontend JavaScript
       npm run webpack
      -

      Run

      - -
      cd trilium
      +        

      Run

      cd trilium
       
       # using nohup to make sure trilium keeps running after user logs out
       nohup TRILIUM_ENV=dev node src/www &

      The application by default starts up on port 8080, so you can open your browser and navigate to http://localhost:8080 to access Trilium (replace "localhost" with your hostname).

      - -

      TLS

      - +

      TLS

      Don't forget to configure TLS which is required for secure usage!

      diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Server Installation/1. Installing the server/NixOS server installation.html b/src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Server Installation/1. Installing the server/NixOS server installation.html index 5c710ba18..42a882596 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Server Installation/1. Installing the server/NixOS server installation.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Server Installation/1. Installing the server/NixOS server installation.html @@ -14,15 +14,10 @@

      This page describes configuring the Trilium module included in NixOS.

      - -

      Requirements

      - +

      Requirements

      NixOS installation.

      - -

      Configuration

      - -

      Add this to your configuration.nix:

      -
      services.trilium-server.enable = true;
      +        

      Configuration

      +

      Add this to your configuration.nix:

      services.trilium-server.enable = true;
       
       # default data directory: /var/lib/trilium
       #services.trilium-server.dataDir = "/var/lib/trilium-sync-server";
      diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Server Installation/2. Reverse proxy/Apache.html b/src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Server Installation/2. Reverse proxy/Apache.html
      index 0793b6ab0..e90b4f6fd 100644
      --- a/src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Server Installation/2. Reverse proxy/Apache.html	
      +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Server Installation/2. Reverse proxy/Apache.html	
      @@ -17,32 +17,27 @@
                 you want to use for your Trilium server.

      1. -

        Download docker image and create container

        -
         docker pull triliumnext/notes:[VERSION]
        +            

        Download docker image and create container

         docker pull triliumnext/notes:[VERSION]
          docker create --name trilium -t -p 127.0.0.1:8080:8080 -v ~/trilium-data:/home/node/trilium-data triliumnext/notes:[VERSION]
      2. Configure Apache proxy and websocket proxy

        1. -

          Enable apache proxy modules

          -
           a2enmod ssl
          +                

          Enable apache proxy modules

           a2enmod ssl
            a2enmod proxy
            a2enmod proxy_http
            a2enmod proxy_wstunnel
        2. -

          Create a new let's encrypt certificate

          -
           sudo certbot certonly -d trilium.mydomain.com
          +

          Create a new let's encrypt certificate

           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)

          -
           sudo nano /etc/apache2/sites-available/trilium.yourdomain.com.conf
          -

          Paste (and customize) the following text into the configuration file

          -
           
          +                  determine the server root location, mine is /etc/apache2)

           sudo nano /etc/apache2/sites-available/trilium.yourdomain.com.conf
          +

          Paste (and customize) the following text into the configuration file

           
                ServerName http://trilium.yourdomain.com
                RewriteEngine on
                    RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,QSA,R=permanent]
          @@ -76,8 +71,7 @@
                       
          1. Create a new empty file called /lib/systemd/system/trilium.service with - the contents

            -
             [Unit]
            +                  the contents

             [Unit]
              Description=Trilium Server
              Requires=docker.service
              After=docker.service
            @@ -91,8 +85,7 @@
              WantedBy=local.target
          2. -

            Install, enable and start service

            -
             sudo systemctl daemon-reload
            +                

            Install, enable and start service

             sudo systemctl daemon-reload
              sudo systemctl enable trilium.service
              sudo systemctl start trilium.service
          3. diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Server Installation/2. Reverse proxy/Nginx.html b/src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Server Installation/2. Reverse proxy/Nginx.html index 6f427fd98..e31b49b8f 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Server Installation/2. Reverse proxy/Nginx.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Server Installation/2. Reverse proxy/Nginx.html @@ -16,19 +16,16 @@

            Configure Nginx proxy and HTTPS. The operating system here is Ubuntu 18.04.

            1. -

              Download Nginx and remove Apache2

              -
              sudo apt-get install nginx
              +            

              Download Nginx and remove Apache2

              sudo apt-get install nginx
               sudo apt-get remove apache2
            2. -

              Create configure file

              -
              cd /etc/nginx/conf.d
              +            

              Create configure file

              cd /etc/nginx/conf.d
               vim default.conf
            3. Fill the file with the context shown below, part of the setting show be - changed. Then you can enjoy your web with HTTPS forced and proxy.

              -
              # This part is for proxy and HTTPS configure
              +              changed. Then you can enjoy your web with HTTPS forced and proxy.

              # This part is for proxy and HTTPS configure
               server {
                   listen 443 ssl;
                   server_name trilium.example.net; #change trilium.example.net to your domain without HTTPS or HTTP.
              diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Server Installation/Multi-Factor Authentication.html b/src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Server Installation/Multi-Factor Authentication.html
              index 8ffd1ee58..c06d38345 100644
              --- a/src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Server Installation/Multi-Factor Authentication.html	
              +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Server Installation/Multi-Factor Authentication.html	
              @@ -23,24 +23,16 @@
                         of unauthorized access, even if someone has obtained your password. It’s
                         highly recommended for securing sensitive information stored in your notes.

              Warning! OpenID and TOTP cannot be both used at the same time!

              - -

              Log in with your Google Account with OpenID!

              - +

              Log in with your Google Account with OpenID!

              OpenID is a standardized way to let you log into websites using an account from another service, like Google, to verify your identity.

              - -

              Why Time-based One Time Passwords?

              - +

              Why Time-based One Time Passwords?

              TOTP (Time-Based One-Time Password) is a security feature that generates a unique, temporary code on your device, like a smartphone, which changes every 30 seconds. You use this code, along with your password, to log into your account, making it much harder for anyone else to access them.

              - -

              Setup

              - - -

              TOTP

              - +

              Setup

              +

              TOTP

              1. Start Trilium Notes normally.

                @@ -57,8 +49,7 @@
              2. Set an environment variable "TOTP_SECRET" as the generated secret. Environment variables can be set with a .env file in the root directory, by defining - them in the command line, or with a docker container.

                -
                # .env in the project root directory
                +              them in the command line, or with a docker container.

                # .env in the project root directory
                 TOTP_ENABLED="true"
                 TOTP_SECRET="secret"
                # Terminal/CLI
                 export TOTP_ENABLED="true"
                @@ -84,9 +75,7 @@ docker run -p 8080:8080 -v ~/trilium-data:/home/node/trilium-data -e TOTP_ENABLE
                             

                Load the secret into an authentication app like google authenticator

              - -

              OpenID

              - +

              OpenID

              Currently only compatible with Google. Other services like Authentik and Auth0 are planned on being added.

              In order to setup OpenID, you will need to setup a authentication provider. @@ -96,23 +85,16 @@ docker run -p 8080:8080 -v ~/trilium-data:/home/node/trilium-data -e TOTP_ENABLE and secret you obtained from google. Environment variables can be set with a .env file in the root directory, by defining them in the command line, or with a docker container.

              - -

              .env File

              - -
              # .env in the project root directory
              +        

              .env File

              # .env in the project root directory
               SSO_ENABLED="true"
               BASE_URL="http://localhost:8080"
               CLIENT_ID=
               SECRET=
              -

              Environment variable (linux)

              - -
              export SSO_ENABLED="true"
              +        

              Environment variable (linux)

              export SSO_ENABLED="true"
               export BASE_URL="http://localhost:8080"
               export CLIENT_ID=
               export SECRET=
              -

              Docker

              - -
              docker run -d -p 8080:8080 -v ~/trilium-data:/home/node/trilium-data -e SSO_ENABLED="true" -e BASE_URL="http://localhost:8080" -e CLIENT_ID= -e SECRET= triliumnext/notes:[VERSION]
              +

              Docker

              docker run -d -p 8080:8080 -v ~/trilium-data:/home/node/trilium-data -e SSO_ENABLED="true" -e BASE_URL="http://localhost:8080" -e CLIENT_ID= -e SECRET= triliumnext/notes:[VERSION]

              After you restart Trilium Notes, you will be redirected to Google's account selection page. Login to an account and Trilium Next will bind to that account, allowing you to login with it.

              diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Server Installation/TLS Configuration.html b/src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Server Installation/TLS Configuration.html index 81ed162d1..07adf3eb0 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Server Installation/TLS Configuration.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Server Installation/TLS Configuration.html @@ -18,9 +18,7 @@

              For a more robust solution, consider using TLS termination with a reverse proxy (recommended, e.g., Nginx). You can follow a guide like this for such setups.

              - -

              Obtaining a TLS Certificate

              - +

              Obtaining a TLS Certificate

              You have two options for obtaining a TLS certificate:

              • Recommended: Obtain a TLS certificate signed by a root @@ -31,13 +29,10 @@ to the additional complexity of importing the certificate into all machines connecting to the server.
              - -

              Modifying config.ini

              - +

              Modifying config.ini

              Once you have your certificate, modify the config.ini file in the data directory to configure - Trilium to use it:

              -
              [Network]
              +          Trilium to use it:

              [Network]
               port=8080
               # Set to true for TLS/SSL/HTTPS (secure), false for HTTP (insecure).
               https=true
              @@ -53,14 +48,11 @@ keyPath=/[username]/.acme.sh/[hostname]/example.com.key
              or another directory accessible by the Docker container, such as /home/node/trilium-data/[DIR IN DATA DIRECTORY].

              After configuring config.ini, restart Trilium and access the hostname using "https".

              - -

              Self-Signed Certificate

              - +

              Self-Signed Certificate

              If you opt to use a self-signed certificate for your server instance, note that the desktop instance will not trust it by default.

              To bypass this, disable certificate validation by setting the following - environment variable (for Linux):

              -
              export NODE_TLS_REJECT_UNAUTHORIZED=0
              +          environment variable (for Linux):

              export NODE_TLS_REJECT_UNAUTHORIZED=0
               trilium

              Trilium provides scripts to start in this mode, such as trilium-no-cert-check.bat for Windows.

              diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Synchronization.html b/src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Synchronization.html index 64e298656..6ed46a039 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Synchronization.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Synchronization.html @@ -18,25 +18,19 @@ up synchronization with a server instance, allowing multiple desktop clients to sync with a central server. This creates a star-shaped topology:

              - +

              In this setup, a central server (referred to as the sync server) and multiple client (or desktop) instances synchronize with the sync server. Once configured, synchronization is automatic and ongoing, requiring no manual intervention.

              - -

              Setting Up Synchronization

              - - -

              Security Considerations

              - +

              Setting Up Synchronization

              +

              Security Considerations

              Setting up the server securely is critical and can be complex. It is crucial to use a valid TLS certificate (HTTPS) rather than an unencrypted HTTP connection to ensure security and avoid potential vulnerabilities.

              - -

              Synchronizing a Desktop Instance with a Sync Server

              - +

              Synchronizing a Desktop Instance with a Sync Server

              This method is used when you already have a desktop instance of Trilium and want to set up a sync server on your web host.

                @@ -47,8 +41,7 @@ instance address" to your sync server's address. Click Save.

              - screenshot of the sync settings options modal + screenshot of the sync settings options modal

              1. Testing Sync: Click the "Test sync" button to verify @@ -58,9 +51,7 @@ to confirm when the sync is complete. Once finished, you should see the login screen on the server.
              - -

              Synchronizing a Desktop Instance from a Sync Server

              - +

              Synchronizing a Desktop Instance from a Sync Server

              This method is used when you already have a sync server and want to configure a new desktop instance to sync with it.

                @@ -69,8 +60,7 @@ to set up sync with a sync server.

              - screenshot of the sync from server setup page + screenshot of the sync from server setup page

              1. Server Details: Configure the Trilium server address @@ -79,14 +69,11 @@ you will see the following screen:

              - screenshot of the sync page + screenshot of the sync page

              Once synchronization is complete, you will be automatically redirected to the Trilium application.

              - -

              Proxy Configuration

              - +

              Proxy Configuration

              Two proxy setups are supported:

              • Explicit Proxy Configuration: Set the proxy server in @@ -94,36 +81,25 @@
              • System Proxy Settings: If no proxy server is explicitly configured, Trilium will use the system proxy settings.
              - -

              Troubleshooting

              - - -

              Date/Time Synchronization

              - +

              Troubleshooting

              +

              Date/Time Synchronization

              For successful synchronization, both client and server must have the same date and time, with a tolerance of up to five minutes.

              - -

              Certificate Issues

              - +

              Certificate Issues

              When using TLS, Trilium will verify the server certificate. If verification fails (e.g., due to self-signed certificates or certain corporate proxies), you can run the Trilium client with the NODE_TLS_REJECT_UNAUTHORIZED environment - variable set to 0:

              -
              export NODE_TLS_REJECT_UNAUTHORIZED=0
              + variable set to 0:

              export NODE_TLS_REJECT_UNAUTHORIZED=0

              This will disable TLS certificate verification, significantly reducing security and exposing the setup to MITM attacks. It is strongly recommended to use a valid signed server certificate. Newer Trilium versions include a script called trilium-no-cert-check.sh for this purpose.

              - -

              Conflict Resolution

              - +

              Conflict Resolution

              If you edit the same note on multiple instances before synchronization, Trilium resolves conflicts by retaining the newer change and discarding the older one. The older version remains accessible in note revisions, allowing data recovery if needed.

              - -

              Hash Check

              - +

              Hash Check

              After each synchronization, Trilium computes a hash of all synced data on both the client and the sync server. If there is a discrepancy, Trilium will automatically initiate a recovery mechanism to resolve the issue.

              diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Upgrading TriliumNext.html b/src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Upgrading TriliumNext.html index 3d5a32526..234e0376a 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Upgrading TriliumNext.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Upgrading TriliumNext.html @@ -15,9 +15,7 @@

              This document outlines the steps required to upgrade Trilium to a new release version.

              - -

              How to Upgrade

              - +

              How to Upgrade

              Trilium does not support built-in automatic upgrades; all updates must be performed manually. The upgrade process varies depending on the installation method:

              @@ -28,17 +26,13 @@ the release page and replace the existing application files.
            4. - -

              Database Compatibility and Migration

              - +

              Database Compatibility and Migration

              Upon startup, Trilium will automatically migrate the database to the new version. Note that after migration, older versions of Trilium will be unable to read the database. If you need to revert to a previous version of Trilium and its database, you can restore the backup that is created prior to migration.

              - -

              Sync Compatibility

              - +

              Sync Compatibility

              The synchronization protocol used by Trilium is versioned, requiring all members of the sync cluster to use the same protocol version. Therefore, when upgrading to a new version, diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Web Clipper.html b/src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Web Clipper.html index 3bf05d417..e828be349 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Web Clipper.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Installation & Setup/Web Clipper.html @@ -14,7 +14,7 @@

              - +

              Trilium Web Clipper is a web browser extension which allows user to clip text, screenshots, whole pages and short notes and save them directly to @@ -22,9 +22,7 @@

              Project is hosted here.

              Firefox and Chrome are supported browsers, but the chrome build should work on other chromium based browsers as well.

              - -

              Functionality

              - +

              Functionality

              • select text and clip it with the right-click context menu
              • click on an image or link and save it through context menu
              • @@ -47,17 +45,13 @@
              • %%{WARNING}%% Chrome Web Store
              - -

              Configuration

              - +

              Configuration

              The extension needs to connect to a running Trilium instance. By default, it scans a port range on the local computer to find a desktop Trilium instance.

              It's also possible to configure the server address if you don't run the desktop application, or want it to work without the desktop application running.

              - -

              Username

              - +

              Username

              Older versions of Trilium (before 0.50) required username & password to authenticate, but this is no longer the case. You may enter anything in that field, it will not have any effect.

              diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book.html b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book.html index 703a2031c..3a6458f86 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book.html @@ -18,28 +18,22 @@ book-like reading experience. This format is particularly useful for viewing multiple smaller notes in a cohesive, continuous manner.

              - +

              In the example above, the "node.js" note on the left panel contains several child notes. The right panel displays the content of these child notes as a single continuous document.

              - -

              Features

              - - -

              Linear Display

              - +

              Features

              +

              Linear Display

              The Book Note format compiles the contents of all child notes into one continuous view. This makes it ideal for reading extensive information broken into smaller, manageable segments.

              - -

              Grid View Option

              - +

              Grid View Option

              Trilium also offers a "Grid View" option within the Book Note properties. This view presents the child notes in a grid format, allowing for a more visual navigation experience.

              - +

              Switching between these views can be easily managed through the Book Note's settings (or viewType attribute), allowing users to choose the diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book/Calendar View.html b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book/Calendar View.html index 3cf2b4af8..1965c2335 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book/Calendar View.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book/Calendar View.html @@ -14,15 +14,13 @@

              - +

              The Calendar view of Book notes will display each child note in a calendar that has a start date and optionally an end date, as an event.

              Unlike other Book view types, the Calendar view also allows some kind of interaction, such as moving events around as well as creating new ones.

              - -

              Creating a calendar

              - +

              Creating a calendar

      @@ -35,7 +33,7 @@
      1 - + The Calendar View works only for Book note types. To create a new note, right click on the note tree on the left and select Insert note after, @@ -44,16 +42,14 @@
      2 - + Once created, the “View type” of the Book needs changed to “Calendar”, by selecting the “Book Properties” tab in the ribbon.
      - -

      Creating a new event/note

      - +

      Creating a new event/note

      • Clicking on a day will create a new child note and assign it to that particular day. @@ -64,20 +60,17 @@
      • It's possible to drag across multiple days to set both the start and end date of a particular note. -
        - +
        +
      • Creating new notes from the calendar will respect the ~child:template relation if set on the book note.
      - -

      Interacting with events

      - +

      Interacting with events

      • Hovering the mouse over an event will display information about the note. -
        - +
        +
      • Left clicking the event will go to that note. Middle clicking will open the note in a new tab and right click will offer more options including @@ -86,9 +79,7 @@
      • The length of an event can be changed by placing the mouse to the right edge of the event and dragging the mouse around.
      - -

      Configuring the calendar

      - +

      Configuring the calendar

      The following attributes can be added to the book type:

      @@ -120,9 +111,7 @@

      In addition, the first day of the week can be either Sunday or Monday and can be adjusted from the application settings.

      - -

      Configuring the calendar events

      - +

      Configuring the calendar events

      For each note of the calendar, the following attributes can be used:

      @@ -177,15 +166,14 @@ @@ -204,28 +192,21 @@
      Allows displaying the value of one or more promoted attributes in the calendar like this: - -
      -
      <br>#label:weight="promoted,number,single,precision=1"<br>#label:mood="promoted,alias=Mood,single,text"<br>#calendar:promotedAttributes="label:weight,label:mood" <br> -
      -
      It can also be used with relations, case in which it will display the + +
      +
      <br>#label:weight="promoted,number,single,precision=1"<br>#label:mood="promoted,alias=Mood,single,text"<br>#calendar:promotedAttributes="label:weight,label:mood" <br> +
      +
      It can also be used with relations, case in which it will display the title of the target note: -
      -
      <br>#relation:assignee="promoted,alias=Assignee,single,text"<br>#calendar:promotedAttributes="relation:assignee" <br>~assignee=@My assignee <br> +
      +
      <br>#relation:assignee="promoted,alias=Assignee,single,text"<br>#calendar:promotedAttributes="relation:assignee" <br>~assignee=@My assignee <br>
      - -

      How the calendar works

      - +

      How the calendar works

      - The calendar displays all the child notes of the book that have a #startDate. + The calendar displays all the child notes of the book that have a #startDate. An #endDate can optionally be added.

      If editing the start date and end date from the note itself is desirable, - the following attributes can be added to the book note:

      -
      #viewType=calendar #label:startDate(inheritable)="promoted,alias=Start Date,single,date" #label:endDate(inheritable)="promoted,alias=End Date,single,date" #hidePromotedAttributes 
      + the following attributes can be added to the book note:

      #viewType=calendar #label:startDate(inheritable)="promoted,alias=Start Date,single,date" #label:endDate(inheritable)="promoted,alias=End Date,single,date" #hidePromotedAttributes 

      This will result in:

      - +

      When not used in a Journal, the calendar is recursive. That is, it will look for events not just in its child notes but also in the children of these child notes.

      - -

      Use-cases

      - - -

      Using with the Journal / calendar

      - +

      Use-cases

      +

      Using with the Journal / calendar

      It is possible to integrate the calendar view into the Journal with day notes. In order to do so change the note type of the Journal note (calendar root) to Book and then select the Calendar View.

      @@ -244,11 +225,9 @@ will not be displayed.

    - +

    - -

    Using a different attribute as event title

    - +

    Using a different attribute as event title

    By default, events are displayed on the calendar by their note title. However, it is possible to configure a different attribute to be displayed instead.

    @@ -267,17 +246,15 @@ - + - + - -

    Using a relation attribute as event title

    - +

    Using a relation attribute as event title

    Similarly to using an attribute, use #calendar:title and set it to ~name where name is the name of the relation to use.

    @@ -293,10 +270,10 @@ - + - + @@ -316,10 +293,10 @@ - + - + diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Canvas.html b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Canvas.html index e1fbc7799..70125bc6e 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Canvas.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Canvas.html @@ -18,7 +18,7 @@ mouse, pen or touch on an infinite canvas. It also supports basic diagramming, text and graphics input.

    - grafik + grafik

    diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Code.html b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Code.html index a530074db..ad436687a 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Code.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Code.html @@ -31,21 +31,17 @@

    For shorter snippets of code that can be embedded in Text notes, see Code blocks.

    - +

    - -

    Adjusting the language of a code note

    - +

    Adjusting the language of a code note

    In the Ribbon, look for the Note type selector and click it to reveal the possible note types. Inside of it there will be a section called Code, select any one of the languages.

    - +

    - -

    Adjusting the list of languages

    - +

    Adjusting the list of languages

    Trilium supports syntax highlighting for many languages, but by default displays only some of them. The supported languages can be adjusted by going to Options, diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Code/Custom Widgets.html b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Code/Custom Widgets.html index 8b271c088..8b6813219 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Code/Custom Widgets.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Code/Custom Widgets.html @@ -26,11 +26,8 @@

  • right-pane
  • - -

    Example - word count widget

    - -

    Create a code note of type JS frontend and give it a **#widget** label.

    -
    /*
    +        

    Example - word count widget

    +

    Create a code note of type JS frontend and give it a **#widget** label.

    /*
      * This defines a custom widget which displays number of words and characters in a current text note.
      * To be activated for a given note, add label 'wordCount' to the note, you can also make it inheritable and thus activate it for the whole subtree.
      * 
    @@ -104,12 +101,10 @@ class WordCountWidget extends api.NoteContextAwareWidget {
     module.exports = WordCountWidget;

    After you make changes it is necessary to restart Trilium so that the layout can be rebuilt.

    - -

    Example screenshot

    - +

    Example screenshot

    On the bottom you can see the resulting widget:

    - +

    diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Code/Events.html b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Code/Events.html index e50eda77f..b4a66ae8e 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Code/Events.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Code/Events.html @@ -16,9 +16,7 @@

    Script notes can be triggered by events. Note that these are backend events and thus relation need to point to the "JS backend" code note.

    - -

    Global events

    - +

    Global events

    Global events are attached to the script note via label. Simply create e.g. "run" label with some of these values and script note will be executed once the event occurs.

    @@ -33,9 +31,7 @@ - -

    Entity events

    - +

    Entity events

    Other events are bound to some entity, these are defined as relations - meaning that script is triggered only if note has this script attached to it through relations (or it can inherit it).

    diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Code/Scripts.html b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Code/Scripts.html index ea4fdb5db..93f552f2f 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Code/Scripts.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Code/Scripts.html @@ -18,9 +18,7 @@ case is JavaScript code notes which can also be executed inside Trilium which can in conjunction with Script API provide extra functionality.

    - -

    Scripting

    - +

    Scripting

    To go further I must explain basic architecture of Trilium - in its essence it is a classic web application - it has these two main components:

      @@ -33,15 +31,13 @@ but their common feature is that they both run JavaScript code. Add to this the fact, that we're able to create JavaScript [[code notes]] and we're onto something.

      - -

      Button use case

      - +

      Button use case

      Let's take a look at our demo script (shipped with default Trilium database) - Task manager. One of the things this script does is adding a button to the Trilium interface which will allow user to easily add new Task (TODO item).

      - +

      First take a look at the red circle all the way on the top - this what we want to achieve - new button in UI which will create new note representing @@ -58,16 +54,12 @@

    • optional shortcut under which you can trigger the button
    • most importantly "action" - what must happen when button is clicked
    - -

    Action handler

    - +

    Action handler

    Saving the note to the database is backend's responsibility, so we immediately pass control to the backend and ask it to create a note. Once this is done, we show the newly created note so that the user can set the task title and maybe some attributes.

    - -

    Script execution

    - +

    Script execution

    So we have a script which will add the button to the toolbar. But how can we execute it? One possibility is to click on "play" icon (marked by red circle). The problem with this is that this UI change is time bound @@ -80,18 +72,12 @@ Trilium frontend starts up.

    (#run=frontendStartup does not work for Mobile frontend - if you want to have scripts running there, give the script #run=mobileStartup label)

    - -

    More showcases

    - +

    More showcases

    You can see more scripting with explanation in Advanced showcases

    - -

    Events

    - +

    Events

    See Events.

    - -

    Script API

    - +

    Script API

    See Script API.

    diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Geo map.html b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Geo map.html index 8b02c822f..ffddea448 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Geo map.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Geo map.html @@ -14,35 +14,31 @@

    Creating a new geo map

    -
    - - - - - - - - - - - - - - - - - - - - -
       
    1 - - Right click on any note on the note tree and select Insert child noteGeo Map (beta).
    2 - - By default the map will be empty and will show the entire world.
    -
    + + + + + + + + + + + + + + + + + + + + +
    1 + + Right click on any note on the note tree and select Insert child noteGeo Map (beta).
    2 + + By default the map will be empty and will show the entire world.

    Repositioning the map

    • Click and drag the map in order to move across the map.
    • @@ -52,59 +48,54 @@

      The position on the map and the zoom are saved inside the map note and restored when visiting again the note.

      Adding a marker using the map

      -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
         
      1 To create a marker, first navigate to the desired point on the map. Then - press the - button on the top-right of the map.  -
      -
      If the button is not visible, make sure the button section is visible - by pressing the chevron button ( - ) in the top-right of the map.
      2 - - Once pressed, the map will enter in the insert mode, as illustrated by - the notification.  -
      -
      Simply click the point on the map where to place the marker, or the Escape - key to cancel.
      3 - - Enter the name of the marker/note to be created.
      4 - - Once confirmed, the marker will show up on the map and it will also be - displayed as a child note of the map.
      -
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      1To create a marker, first navigate to the desired point on the map. Then + press the + button on the top-right of the map.  +
      +
      If the button is not visible, make sure the button section is visible + by pressing the chevron button ( + ) in the top-right of the map.
      2 + + Once pressed, the map will enter in the insert mode, as illustrated by + the notification.  +
      +
      Simply click the point on the map where to place the marker, or the Escape + key to cancel.
      3 + + Enter the name of the marker/note to be created.
      4 + + Once confirmed, the marker will show up on the map and it will also be + displayed as a child note of the map.

      How the location of the markers is stored

      The location of a marker is stored in the #geolocation attribute of the child notes:

      @@ -152,143 +143,134 @@

      The value of the attribute is made up of the latitude and longitude separated by a comma.

      Adding from Google Maps

      -
      - - - - - - - - - - - - - - - - - - - - - - - - - -
         
      1 - - Go to Google Maps on the web and look for a desired location, right click - on it and a context menu will show up.  -
      -
      Simply click on the first item displaying the coordinates and they will - be copied to clipboard.  -
      -
      Then paste the value inside the text box into the #geolocation attribute - of a child note of the map (don't forget to surround the value with a " character).
      2 - - In Trilium, create a child note under the map.
      3 - - And then go to Owned Attributes and type #geolocation=", then - paste from the clipboard as-is and then add the ending " character. - Press Enter to confirm and the map should now be updated to contain the - new note.
      -
      + + + + + + + + + + + + + + + + + + + + + + + + + +
      1 + + Go to Google Maps on the web and look for a desired location, right click + on it and a context menu will show up.  +
      +
      Simply click on the first item displaying the coordinates and they will + be copied to clipboard.  +
      +
      Then paste the value inside the text box into the #geolocation attribute + of a child note of the map (don't forget to surround the value with a " character).
      2 + + In Trilium, create a child note under the map.
      3 + + And then go to Owned Attributes and type #geolocation=", then + paste from the clipboard as-is and then add the ending " character. + Press Enter to confirm and the map should now be updated to contain the + new note.

      Adding from OpenStreetMap

      Similarly to the Google Maps approach:

      -
      - - - - - - - - - - - - - - - - - - - - - - - - - -
         
      1 - - Go to any location on openstreetmap.org and right click to bring up the - context menu. Select the “Show address” item.
      2 - - The address will be visible in the top-left of the screen, in the place - of the search bar.  -
      -
      Select the coordinates and copy them into the clipboard.
      3 - - Simply paste the value inside the text box into the #geolocation attribute - of a child note of the map and then it should be displayed on the map.
      -
      + + + + + + + + + + + + + + + + + + + + + + + + + +
      1 + + Go to any location on openstreetmap.org and right click to bring up the + context menu. Select the “Show address” item.
      2 + + The address will be visible in the top-left of the screen, in the place + of the search bar.  +
      +
      Select the coordinates and copy them into the clipboard.
      3 + + Simply paste the value inside the text box into the #geolocation attribute + of a child note of the map and then it should be displayed on the map.

      Adding GPS tracks (.gpx)

      Trilium has basic support for displaying GPS tracks on the geo map.

      -
      - - - - - - - - - - - - - - - - - - - - - - - - - -
         
      1 - - To add a track, simply drag & drop a .gpx file inside the geo map - in the note tree.
      2 - - In order for the file to be recognized as a GPS track, it needs to show - up as application/gpx+xml in the File type field.
      3 - - When going back to the map, the track should now be visible.  -
      -
      The start and end points of the track are indicated by the two blue markers.
      -
      -

      Troubleshooting

      -

      - -

      -

      Grid-like artifacts on the map

      -

      This occurs if the application is not at 100% zoom which causes the pixels - of the map to not render correctly due to fractional scaling. The only - possible solution is to set the UI zoom at 100% (default keyboard shortcut - is Ctrl+0).

      + + + + + + + + + + + + + + + + + + + + + + + + + +
      1 + + To add a track, simply drag & drop a .gpx file inside the geo map + in the note tree.
      2 + + In order for the file to be recognized as a GPS track, it needs to show + up as application/gpx+xml in the File type field.
      3 + + When going back to the map, the track should now be visible.  +
      +
      The start and end points of the track are indicated by the two blue markers.
      +

      Troubleshooting

      +

      + +

      +

      Grid-like artifacts on the map

      +

      This occurs if the application is not at 100% zoom which causes the pixels + of the map to not render correctly due to fractional scaling. The only + possible solution is to set the UI zoom at 100% (default keyboard shortcut + is Ctrl+0).

    diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Mermaid Diagrams.html b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Mermaid Diagrams.html index bdca0dd93..661ace573 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Mermaid Diagrams.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Mermaid Diagrams.html @@ -18,15 +18,12 @@ etc., all using a text description of the chart instead of manually drawing the diagram.

    For the official documentation of Mermaid.js see mermaid.js.org/intro/.

    - -

    ELK layout engine

    - +

    ELK layout engine

    Mermaid supports a different layout engine which supports slightly more complex diagrams, called the Eclipse Layout Kernel (ELK). Trilium has support for these as well, but it's not enabled by default.

    In order to activate ELK for any diagram, insert the following YAML frontmatter - right at the beginning of the diagram:

    -
    ---
    +          right at the beginning of the diagram:

    ---
     config:
       layout: elk
     ---
    @@ -40,10 +37,10 @@ config: - + - + diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Saved Search.html b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Saved Search.html index 091662561..254834834 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Saved Search.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Saved Search.html @@ -17,11 +17,9 @@ The search results will appear as sub-notes under these "saved search" notes. Here is an example of how it works:

    - save-search + save-search

    - -

    Location

    - +

    Location

    By default, saved searches are stored in the day note. However, you can designate a different note to store saved searches by marking it with the #searchHome label. Additionally, for workspaces, diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Text.html b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Text.html index 9c7be1a84..06cbad403 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Text.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Text.html @@ -37,7 +37,7 @@

    In both cases, it is possible to switch back to editable mode using the button at top right of page.

    -

    For more information, see Read-Only Notes.

    +

    For more information, see Read-Only Notes.

    General Formatting

    Since Trilium uses CKEditor, all of its formatting options are available here. You may use the graphical toolbar shown above, or enter formatting @@ -48,11 +48,11 @@

  • Italic: Type *text* or _text_
  • Code: Type `text`
  • -
  • Strikethrough: Type ~~text~~ +
  • Strikethrough: Type ~~text~~
  • Lists

    -

    See Lists.

    +

    See Lists.

    Blocks

    • Block quote: Start a line with > followed by a space
    • diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Text/Code blocks.html b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Text/Code blocks.html index 7c60967e4..a19d072c7 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Text/Code blocks.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Text/Code blocks.html @@ -14,19 +14,17 @@

      - +

      The code blocks feature allows entering pieces of code in text notes.

      Note that this feature is meant for generally small snippets of code. For larger files such as an entire log, see the dedicated [missing note] note type instead.

      - -

      Inserting a code block

      - +

      Inserting a code block

      • Via the Formatting toolbar, look for the - button. + button.
        • Pressing directly on the icon will insert a code block with the language that was selected most recently. If this is the first time a code block @@ -42,9 +40,7 @@
      - -

      Syntax highlighting

      - +

      Syntax highlighting

      Since TriliumNext v0.90.12, Trilium will try to offer syntax highlighting to the code block. Note that the syntax highlighting mechanism is slightly different than the one in Code Notes notes as @@ -55,18 +51,13 @@ changing the language of the code block manually.

      When the language is set to Plain text, there will be no syntax highlighting.

      - -

      Changing the language of a code block

      - +

      Changing the language of a code block

      Simply click anywhere inside the code block and press again the code block button in the Formatting toolbar: -
      - +
      +

      - -

      Adjusting the list of languages

      - +

      Adjusting the list of languages

      The code blocks feature shares the list of languages with the Code Notes note type.

      The supported languages can be adjusted by going to Options, diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Text/Content language & Right-to-le.html b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Text/Content language & Right-to-le.html index 0c3f545b4..44c1e9ead 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Text/Content language & Right-to-le.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Text/Content language & Right-to-le.html @@ -14,22 +14,18 @@

      - +

      A language hint can be provided for text notes. This option informs the browser or the desktop application about the language the note is written in (for example this might help with spellchecking), and it also determines whether the text is displayed from right-to-left for languages such as Arabic, Hebrew, etc.

      - -

      Setting the language

      - +

      Setting the language

      To set the language of the content, go to “Basic Properties” and look for the “Language” field.

      - -

      Adjusting the list of languages

      - +

      Adjusting the list of languages

      By default there will be no language configured, they can be configured by going to settings or by selecting the “Configure languages” item when setting the language.

      diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Text/Formatting toolbar.html b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Text/Formatting toolbar.html index 8c898caf0..64d88a9cc 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Text/Formatting toolbar.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Text/Formatting toolbar.html @@ -18,43 +18,34 @@

      To do so, go to Options and look for the Text Notes section. There is a corresponding section called Formatting toolbar.

      - -

      Floating

      - +

      Floating

      The floating bar is a more minimalist option, in which the formatting is hidden behind two different popups.

      - -

      Block-level popup

      - +

      Block-level popup

      The first popup is the block-level popup. This will appear to the left of the current paragraph you are currently editing, as a sequence of dots: -
      - +
      +

      Clicking this popup will reveal the formatting options that are specific to the entire paragraph, such as setting a heading, lists, tables, etc.

      - +

      - -

      Inline popup

      - +

      Inline popup

      The inline popup appears automatically when selecting a text:

      - +

      All the options here apply only to the selected portion of text, such as changing the font size, or making the text bold.

      - -

      Fixed

      - +

      Fixed

      The fixed formatting offers a more traditional editing paradigm, usually useful if a lot of formatting is needed.

      All the options are combined into a single toolbar that will appear as part of the Ribbon.

      - +

      By default, if the toolbar does not fit on the screen, the rest of the options will be grouped into a single option at the end. It is possible diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Text/Formatting.html b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Text/Formatting.html index b72716c33..e02951b69 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Text/Formatting.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Text/Formatting.html @@ -14,18 +14,14 @@

      Developer-specific formatting

      - - -

      Keyboard shortcuts

      - +

      Keyboard shortcuts

      This allows marking a portion of text as a shortcut key.

      - +

      To apply this style, press the - button in - group from the Formatting toolbar. + button in + group from the Formatting toolbar. On the floating toolbar, the buttons appear when selecting a text.

      diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Text/Images.html b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Text/Images.html index 2f046bf40..2076fb9b5 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Text/Images.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Text/Images.html @@ -20,30 +20,24 @@ into the note tree. Its reference can be copied into a text note, in order to display it in the text itself.

      - -

      Uploading images

      - +

      Uploading images

      To add an image to the note, simply drag it from file explorer onto the note editor inside Trilium and the image will be uploaded.

      - +

      Alternatively you can click on block toolbar and then on "Insert image":

      - +

      You can also copy and paste an image from web - the image will be (asynchronously) downloaded and embedded.

      - -

      Configuring the images

      - +

      Configuring the images

      Clicking on an image will reveal a popup with multiple options: -
      - +
      +

      - -

      Alignment

      - +

      Alignment

      The first set of options configure the alignment are, in order:

      @@ -57,11 +51,11 @@
      - + Inline - + As the name suggests, the name can be put inside a paragraph and moved around similarly as if it was a block of text. Use drag & drop or cut-paste @@ -69,32 +63,32 @@
      - + Centered image - + The image will be displayed as a block and centered, not allowing text in either the left or right of it.
      - + Wrap text - + The image will be displayed to the left or the right of the text.
      - + Block align - + Similarly to Centered image, the image will be displayed as a block and aligned either to the left or to the right, but not allowing @@ -102,9 +96,7 @@
      - -

      Compression

      - +

      Compression

      Since Trilium isn't really meant to be primary storage for image data, it attempts to compress and resize (with pretty aggressive settings) uploaded images before storing them to the database. You may then notice some quality diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Text/Lists.html b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Text/Lists.html index 717c19579..127dc48ed 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Text/Lists.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Text/Lists.html @@ -19,9 +19,7 @@

    • Numbered lists (or ordered lists).
    • To-do lists
    - -

    Keyboard shortcuts

    - +

    Keyboard shortcuts

    • Bulleted list: Start a line with * or - followed by a space;
    • @@ -30,9 +28,7 @@
    • To-do list: Start a line with [ ] for an unchecked item or [x] for a checked item.
    - -

    Headings, code blocks within lists

    - +

    Headings, code blocks within lists

    It possible to add content-level blocks such as headings, code blocks, tables within lists, as follows:

    @@ -45,38 +41,38 @@ diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Web View.html b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Web View.html index 386e8dd06..c9fd6a190 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Web View.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Web View.html @@ -14,12 +14,9 @@

    Configuration

    -

    A webview needs to know which URL to render, and it can be provided by - setting the webViewSrc attribute, such as:

    -
    #webViewSrc="https://www.wikipedia.org"
    + setting the webViewSrc attribute, such as:

    #webViewSrc="https://www.wikipedia.org"

    Web view on the server vs. Electron

    -

    When accessing Trilium via a browser instead of the desktop application, the web view will still try to render the content of the desired webpage. However, since it's running in a browser there are quite a few limitations diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Quick Start.html b/src/public/app/doc_notes/en/User Guide/User Guide/Quick Start.html index e33235f62..01f6dab01 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Quick Start.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Quick Start.html @@ -14,7 +14,6 @@

    Choose the setup

    -

    Local only desktop/laptop - Allows a single instance on a desktop and will save the notes locally on that desktop.

      @@ -28,7 +27,7 @@
    1. Server installation
    2. Mobile frontend (optional)
    3. -
    4. Deploy %%{WARNING}%%
    5. +
    6. Deploy%%{WARNING}%%
    7. PikaPods managed hosting
    @@ -47,9 +46,7 @@
  • Synchronization
  • - -

    Basic concepts

    - +

    Basic concepts

    1. Understand Note
    2. diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Theme development/Creating a custom theme.html b/src/public/app/doc_notes/en/User Guide/User Guide/Theme development/Creating a custom theme.html index 4abe834cf..f5d4bcae7 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Theme development/Creating a custom theme.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Theme development/Creating a custom theme.html @@ -14,15 +14,12 @@

      Step 1. Find a place to place the themes

      -

      Organization is an important aspect of managing a knowledge base. When developing a new theme or importing an existing one it's a good idea to keep them into one place.

      As such, the first step is to create a new note to gather all the themes.

      ![](4_Creating%20a custom theme_im.png)

      - -

      Step 2. Create the theme

      - +

      Step 2. Create the theme

    - + First, create a list.
    - + Press Enter to create a new list item.
    - + Press Backspace to get rid of the bullet point. Notice the cursor position.
    - + At this point, insert any desired block-level item such as a code block.
    - + To continue with a new bullet point, press Enter until the cursor moves to a new blank position.
    - + Press Enter once more to create the new bullet.
    @@ -33,7 +30,7 @@ @@ -50,17 +47,13 @@
    - + Themes are code notes with a special attribute. Start by creating a new code note.
    - -

    Step 3. Define the theme's CSS

    - +

    Step 3. Define the theme's CSS

    As a very simple example we will change the background color of the launcher pane to a shade of blue.

    -

    To alter the different variables of the theme:

    -
    :root {
    +        

    To alter the different variables of the theme:

    :root {
     	--launcher-pane-background-color: #0d6efd;
     }

    Step 4. Activating the theme

    -

    Refresh the application (Ctrl+Shift+R is a good way to do so) and go to settings. You should see the newly created theme:

    ![](1_Creating%20a%20custom theme_im.png)

    @@ -69,9 +62,7 @@

    Do note that the theme will be based off of the legacy theme. To override that and base the theme on the new TriliumNext theme, see: Theme base (legacy vs. next)

    - -

    Step 5. Making changes

    - +

    Step 5. Making changes

    Simply go back to the note and change according to needs. To apply the changes to the current window, press Ctrl+Shift+R to refresh.

    It's a good idea to keep two windows, one for editing and the other one diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Theme development/Custom app-wide CSS.html b/src/public/app/doc_notes/en/User Guide/User Guide/Theme development/Custom app-wide CSS.html index b791bcc9c..f346b8bd0 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Theme development/Custom app-wide CSS.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Theme development/Custom app-wide CSS.html @@ -25,41 +25,36 @@ - + Start by creating a new note and changing the note type to CSS - + In the ribbon, press the “Owned Attributes” section and type #appCss. - + Type the desired CSS. -
    -
    Generally it's a good idea to append !important for the styles +
    +
    Generally it's a good idea to append !important for the styles that are being changed, in order to prevent other - -

    Seeing the changes

    - +

    Seeing the changes

    Adding a new app CSS note or modifying an existing one does not immediately apply changes. To see the changes, press Ctrl+Shift+R to refresh the page first.

    - -

    Example use-case: customizing the printing stylesheet

    - +

    Example use-case: customizing the printing stylesheet

    When printing a document or exporting as PDF, it is possible to adjust the style by creating a CSS note that uses the @media selector.

    For example, to change the font of the document from the one defined by - the theme or the user to a serif one:

    -
    @media print {
    +          the theme or the user to a serif one:

    @media print {
     
     	body {
     
    diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Theme development/Customize the Next theme.html b/src/public/app/doc_notes/en/User Guide/User Guide/Theme development/Customize the Next theme.html
    index 902776747..2764d57a3 100644
    --- a/src/public/app/doc_notes/en/User Guide/User Guide/Theme development/Customize the Next theme.html	
    +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Theme development/Customize the Next theme.html	
    @@ -18,7 +18,7 @@
               onto the existing theme. The appTheme attribute must also be
               present.

    - +

    The appThemeBase label can be set to one of the following values:

      @@ -27,13 +27,10 @@
    • next-dark, for the always dark mode of the TriliumNext.
    • Any other value is ignored and will use the legacy white theme instead.
    - -

    Overrides

    - +

    Overrides

    Do note that the TriliumNext theme has a few more overrides than the legacy theme, so you might need to suffix !important if the style changes - are not applied.

    -
    :root {
    +          are not applied.

    :root {
     	--launcher-pane-background-color: #0d6efd !important;
     }
    diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Theme development/Reference.html b/src/public/app/doc_notes/en/User Guide/User Guide/Theme development/Reference.html index 2a8956185..83411d416 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Theme development/Reference.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Theme development/Reference.html @@ -14,10 +14,8 @@

    Detecting mobile vs. desktop

    -

    The mobile layout is different than the one on the desktop. Use body.mobile and body.desktop to - differentiate between them.

    -
    body.mobile #root-widget {
    +          differentiate between them.

    body.mobile #root-widget {
     	/* Do something on mobile */
     }
     
    @@ -25,8 +23,7 @@ body.desktop #root-widget {
     	/* Do something on desktop */
     }

    Do note that there is also a “tablet mode” in the mobile layout. For that - particular case media queries are required:

    -
    @media (max-width: 991px) {
    +          particular case media queries are required:

    @media (max-width: 991px) {
     
         #launcher-pane {
     
    @@ -48,12 +45,10 @@ body.desktop #root-widget {
     
     }

    Detecting horizontal vs. vertical layout

    -

    The user can select between vertical layout (the classical one, where the launcher bar is on the left) and a horizontal layout (where the launcher bar is on the top and tabs are full-width).

    -

    Different styles can be applied by using classes at body level:

    -
    body.layout-vertical #left-pane {
    +        

    Different styles can be applied by using classes at body level:

    body.layout-vertical #left-pane {
     	/* Do something */
     }
     
    @@ -63,9 +58,7 @@ body.layout-horizontal #center-pane {
             

    The two different layouts use different containers (but they are present in the DOM regardless of the user's choice), for example #horizontal-main-container and #vertical-main-container can be used to customize the background of the content section.

    - -

    Detecting platform (Windows, macOS) or Electron

    - +

    Detecting platform (Windows, macOS) or Electron

    It is possible to add particular styles that only apply to a given platform by using the classes in body:

    @@ -85,15 +78,12 @@ body.layout-horizontal #center-pane {

    It is also possible to only apply a style if running under Electron (desktop - application):

    -
    body.electron {
    +          application):

    body.electron {
     	background: blue;
     }

    Native title bar

    -

    It's possible to detect if the user has selected the native title bar - or the custom title bar by querying against body:

    -
    body.electron.native-titlebar {
    +          or the custom title bar by querying against body:

    body.electron.native-titlebar {
     	/* Do something */
     }
     
    @@ -101,43 +91,33 @@ body.electron:not(.native-titlebar) {
     	/* Do something else */
     }

    Native window buttons

    -

    When running under Electron with native title bar off, a feature was introduced to use the platform-specific window buttons such as the semaphore on macOS.

    See Native title bar buttons by eliandoran · Pull Request #702 · TriliumNext/Notes for the original implementation of this feature, including screenshots.

    - -

    On Windows

    - +

    On Windows

    The colors of the native window button area can be adjusted using a RGB - hex color:

    -
    body {
    +          hex color:

    body {
     	--native-titlebar-foreground: #ffffff;
     	--native-titlebar-background: #ff0000;
     }

    It is also possible to use transparency at the cost of reduced hover colors - using a RGBA hex color:

    -
    body {
    +          using a RGBA hex color:

    body {
     	--native-titlebar-background: #ff0000aa;
     }

    Note that the value is read when the window is initialized and then it is refreshed only when the user changes their light/dark mode preference.

    - -

    On macOS

    - +

    On macOS

    On macOS the semaphore window buttons are enabled by default when the native title bar is disabled. The offset of the buttons can be adjusted - using:

    -
    body {
    +          using:

    body {
         --native-titlebar-darwin-x-offset: 12;
         --native-titlebar-darwin-y-offset: 14 !important;
     }

    Background/transparency effects on Windows (Mica)

    -

    Windows 11 offers a special background/transparency effect called Mica, which can be enabled by themes by setting the --background-material variable - at body level:

    -
    body.electron.platform-win32 {
    +          at body level:

    body.electron.platform-win32 {
     	--background-material: tabbed; 
     }

    The value can be either tabbed (especially useful for the horizontal @@ -145,20 +125,16 @@ body.electron:not(.native-titlebar) {

    Do note that the Mica effect is applied at body level and the theme needs to make the entire hierarchy (semi-)transparent in order for it to be visible. Use the TrilumNext theme as an inspiration.

    - -

    Note icons, tab workspace accent color

    - +

    Note icons, tab workspace accent color

    Theme capabilities are small adjustments done through CSS variables that can affect the layout or the visual aspect of the application.

    In the tab bar, to display the icons of notes instead of the icon of the - workspace:

    -
    :root {
    +          workspace:

    :root {
     	--tab-note-icons: true;
     }

    When a workspace is hoisted for a given tab, it is possible to get the background color of that workspace, for example to apply a small strip - on the tab instead of the whole background color:

    -
    .note-tab .note-tab-wrapper {
    +          on the tab instead of the whole background color:

    .note-tab .note-tab-wrapper {
         --tab-background-color: initial !important;
     }
     
    @@ -172,22 +148,17 @@ body.electron:not(.native-titlebar) {
         background-color: var(--workspace-tab-background-color);
     }

    Custom fonts

    -

    Currently the only way to include a custom font is to use Custom resource providers. Basically import a font into Trilium and assign it #customResourceProvider=fonts/myfont.ttf and then import the font in CSS via /custom/fonts/myfont.ttf.

    - -

    Dark and light themes

    - -

    A light theme needs to have the following CSS:

    -
    :root {
    +        

    Dark and light themes

    +

    A light theme needs to have the following CSS:

    :root {
     	--theme-style: light;
     }

    if the theme is dark, then --theme-style needs to be dark.

    If the theme is auto (e.g. supports both light or dark based on prefers-color-scheme) it must also declare (in addition to setting --theme-style to - either light or dark):

    -
    :root {
    +          either light or dark):

    :root {
     
         --theme-style-auto: true;
     
    diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Troubleshooting/Anonymized Database.html b/src/public/app/doc_notes/en/User Guide/User Guide/Troubleshooting/Anonymized Database.html
    index bbf14c5a2..5010aa6e5 100644
    --- a/src/public/app/doc_notes/en/User Guide/User Guide/Troubleshooting/Anonymized Database.html	
    +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Troubleshooting/Anonymized Database.html	
    @@ -14,7 +14,7 @@
     
           

    - +

    In certain scenarios, understanding the structure of a database is crucial for troubleshooting issues. However, sharing your actual database file @@ -36,13 +36,10 @@ 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). You can safely attach it to a bug report.

    - -

    Command Line Anonymization

    - +

    Command Line Anonymization

    If your database is corrupted to the point where Trilium cannot start, the anonymization process can - still be executed via the command line:

    -
    node src/anonymize.js
    + still be executed via the command line:

    node src/anonymize.js

    Run this command from the directory containing Trilium's source files, typically found in the resources/app directory for desktop builds.

    diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Troubleshooting/Synchronization fails with 504.html b/src/public/app/doc_notes/en/User Guide/User Guide/Troubleshooting/Synchronization fails with 504.html index a761a1b39..7a05443a7 100644 --- a/src/public/app/doc_notes/en/User Guide/User Guide/Troubleshooting/Synchronization fails with 504.html +++ b/src/public/app/doc_notes/en/User Guide/User Guide/Troubleshooting/Synchronization fails with 504.html @@ -17,11 +17,8 @@ the items that require update. When running behind a reverse proxy, the request can time out.

    The solution is to increase the timeout at proxy level.

    - -

    Nginx

    - -

    Add the following to the configuration file:

    -
    proxy_connect_timeout 300;
    +        

    Nginx

    +

    Add the following to the configuration file:

    proxy_connect_timeout 300;
     proxy_send_timeout 300;
     proxy_read_timeout 300;
     send_timeout 300;