Skip to content

Build your personal knowledge base with Trilium Notes

docs(user): mention updates to mermaid

Elian Dorand4716155d8be
diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Basic Concepts and Features/Navigation/Search.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Basic Concepts and Features/Navigation/Search.html
index aef518d2b0..c0dd0c6075 100644
--- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Basic Concepts and Features/Navigation/Search.html
+++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Basic Concepts and Features/Navigation/Search.html
@@ -411,9 +411,9 @@ class="table">
matches a value that is a close whole-word variant of your term. <code>~*</code> (fuzzy-contains)
matches when your term appears anywhere inside the value, either as a fragment
or as a near-miss. Both work on note properties such as <code>note.title</code> and <code>note.content</code>,
- and on labels (<code>#label</code>). Fuzzy operators accept terms of at least
- 3 characters, though how many typos each term tolerates depends on its length
- — see <em>Fuzzy tolerance</em> below.</p>
+ and on labels (<code>#label</code>). Fuzzy operators accept terms of at
+ least 3 characters, though how many typos each term tolerates depends on
+ its length — see <em>Fuzzy tolerance</em> below.</p>
<p>The examples assume a note titled <code>Books</code> carrying the label <code>#author=Tolkien</code>,
and a note whose content is <code>learn programming today</code>.</p>
<figure
@@ -469,11 +469,10 @@ class="table">
</figure>
<h3>Fuzzy tolerance</h3>
<p><strong>Rule:</strong> how many typos are tolerated depends on the <strong>length</strong> of
- your search term. Short terms must match exactly, because a single edit is
- enough to turn one short word into an unrelated one; longer terms tolerate
+ your search term. Short terms must match exactly, because a single edit
+ is enough to turn one short word into an unrelated one; longer terms tolerate
more.</p>
-<figure
-class="table">
+<figure class="table">
<table>
<thead>
<tr>
@@ -516,8 +515,8 @@ class="table">
<td><code>a bright red car</code>
</td>
<td>No</td>
- <td>No edits are allowed below 4 characters, so <code>cat</code> does not
- reach <code>car</code></td>
+ <td>No edits are allowed below 4 characters, so <code>cat</code> does not reach <code>car</code>
+ </td>
</tr>
<tr>
<td><code>carr</code>
@@ -907,5 +906,6 @@ class="table">
issues</li>
<li>Notes exceeding this limit will still be included in title and attribute
searches</li>
- <li>Terms of 3 characters or fewer are matched exactly; typo tolerance starts at 4 characters</li>
+ <li>Terms of 3 characters or fewer are matched exactly; typo tolerance starts
+ at 4 characters</li>
</ul>
\ No newline at end of file
diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Basic Concepts and Features/Notes/Sorting Notes.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Basic Concepts and Features/Notes/Sorting Notes.html
index 277867cddb..a22d7f3f9f 100644
--- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Basic Concepts and Features/Notes/Sorting Notes.html
+++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Basic Concepts and Features/Notes/Sorting Notes.html
@@ -30,9 +30,9 @@
<td>
<p>Keeps child notes sorted by title alphabetically.</p>
<p>When given a value, it will sort by other criteria instead: a comma-separated
- list of levels, each <code>title</code>, <code>dateCreated</code>, <code>dateModified</code> or the name of a label on the child
- notes, optionally followed by <code>asc</code> or <code>desc</code>, as in a search's <code>orderBy</code>.
- For example <code>#sorted="priority desc, dueDate"</code> sorts
+ list of levels, each <code>title</code>, <code>dateCreated</code>, <code>dateModified</code> or
+ the name of a label on the child notes, optionally followed by <code>asc</code> or <code>desc</code>,
+ as in a search's <code>orderBy</code>. For example <code>#sorted="priority desc, dueDate"</code> sorts
by priority, highest first, and notes of equal priority by due date. A
child note without a level's label sorts after every child that has it,
whichever direction the level runs in. When neither note has the label,
@@ -55,8 +55,8 @@
<tr>
<td><code>#sortFoldersFirst</code>
</td>
- <td>If <code>sorted</code> is applied, folders (notes with
- children) will be sorted as a group at the top (at the bottom when <code>#sortDirection</code> is <code>desc</code>),
+ <td>If <code>sorted</code> is applied, folders (notes with children) will be
+ sorted as a group at the top (at the bottom when <code>#sortDirection</code> is <code>desc</code>),
and the rest will be sorted.</td>
</tr>
<tr>
@@ -110,9 +110,8 @@
<li><strong>Multi-Level Sorting</strong>: Several of the above can be combined,
separated by commas; each level is applied only where the previous ones
are equal. Every level can carry its own direction as a word after the
- name, <code>asc</code> or <code>desc</code>,
- otherwise it follows <code>#sortDirection</code>. For
- example <code>#sorted="priority desc, area, dateCreated"</code> sorts
+ name, <code>asc</code> or <code>desc</code>, otherwise it follows <code>#sortDirection</code>.
+ For example <code>#sorted="priority desc, area, dateCreated"</code> sorts
by priority, highest first, then by area, then by creation date.</li>
</ul>
</li>
diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/1_Mermaid Diagrams_image.png b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/1_Mermaid Diagrams_image.png
index 381504c068..c0cc4cd31e 100644
Binary files a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/1_Mermaid Diagrams_image.png and b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/1_Mermaid Diagrams_image.png differ
diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/2_Mermaid Diagrams_image.png b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/2_Mermaid Diagrams_image.png
deleted file mode 100644
index ac8b0cf4ce..0000000000
Binary files a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/2_Mermaid Diagrams_image.png and /dev/null differ
diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Mermaid Diagrams.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Mermaid Diagrams.html
index a923ab6f36..2ccbdc1536 100644
--- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Mermaid Diagrams.html
+++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Mermaid Diagrams.html
@@ -2,9 +2,9 @@
<p>For a quick understanding of the Mermaid syntax, see&nbsp;<a class="reference-link"
href="#root/_help_WWgeUaBb7UfC">Syntax reference</a>&nbsp;(official documentation).</p>
</aside>
-<figure class="image image-style-align-center">
- <img style="aspect-ratio:886/663;" src="2_Mermaid Diagrams_image.png"
- width="886" height="663">
+<figure class="image">
+ <img style="aspect-ratio:1464/915;" src="Mermaid Diagrams_image.png" width="1464"
+ height="915">
</figure>
<p>Trilium supports Mermaid, which adds support for various diagrams such
as flowchart, sequence diagram, class diagram, state diagram, pie charts,
@@ -35,7 +35,7 @@
</ul>
<p>It's possible to switch between the two layouts at any time by pressing
the
- <img src="Mermaid Diagrams_image.png">icon in the&nbsp;<a class="reference-link" href="#root/_help_XpOYSgsLkTJy">Floating buttons</a>&nbsp;area.</p>
+ <img src="1_Mermaid Diagrams_image.png">icon in the&nbsp;<a class="reference-link" href="#root/_help_XpOYSgsLkTJy">Floating buttons</a>&nbsp;area.</p>
<h2>Interaction</h2>
<ul>
<li>The source code of the diagram (in Mermaid format) is displayed on the
@@ -48,13 +48,22 @@
note (depending on the layout):
<ul>
<li>There are dedicated buttons at the bottom-right of the preview to control
- the zoom in, zoom out or re-center the diagram:
- <img src="1_Mermaid Diagrams_image.png">
- </li>
+ the zoom in, zoom out or fit the diagram.</li>
<li>The preview can be moved around by holding the left mouse button and dragging.</li>
<li>Zooming can also be done by using the scroll wheel.</li>
<li>The zoom and position on the preview will remain fixed as the diagram
changes, to be able to work more easily with large diagrams.</li>
+ <li>Double-clicking the preview resets the zoom/position.</li>
+ <li>The preview can also be focused by clicking on it, case in which keyboard
+ shortcuts can be used:
+ <ul>
+ <li><kbd>+</kbd> or <kbd>E</kbd> to zoom in, <kbd>-</kbd> or <kbd>Q</kbd> to zoom
+ out.</li>
+ <li><kbd>/</kbd> to reset the zoom/position.</li>
+ <li>Arrow keys or <kbd>W</kbd> <kbd>A</kbd> <kbd>S</kbd> <kbd>D</kbd> to pan. Holding <kbd>Shift</kbd> pans
+ faster.</li>
+ </ul>
+ </li>
</ul>
</li>
<li>The size of the source/preview panes can be adjusted by hovering over
diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Mermaid Diagrams_image.png b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Mermaid Diagrams_image.png
index c0cc4cd31e..964dae4915 100644
Binary files a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Mermaid Diagrams_image.png and b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Note Types/Mermaid Diagrams_image.png differ
diff --git a/docs/Developer Guide/Developer Guide/Concepts/CI/Main.md b/docs/Developer Guide/Developer Guide/Concepts/CI/Main.md
index 285edaac92..7025bf2f08 100644
--- a/docs/Developer Guide/Developer Guide/Concepts/CI/Main.md
+++ b/docs/Developer Guide/Developer Guide/Concepts/CI/Main.md
@@ -35,4 +35,4 @@ Two consequences are worth knowing:
* A pull request can edit the workflow that writes the artifacts, so the pull request number it claims is checked against `workflow_run.head_sha` before it is used.
* The build is served as static files, but Cloudflare Pages runs a `functions/` directory and `_worker.js` server-side, where the project's bindings are reachable. None of the three sites uses them, so a build carrying one fails the deploy rather than publishing it. `_headers` and `_redirects` are published as usual; `apps/standalone/public/_headers` sets the cross-origin isolation the app needs.
-Because GitHub only triggers `workflow_run` from workflow files on the default branch, changes to `deploy-previews.yml` and `cloudflare-preview.yml` take effect once they are merged into `main` and cannot be exercised from a branch.
+Because GitHub only triggers `workflow_run` from workflow files on the default branch, changes to `deploy-previews.yml` and `cloudflare-preview.yml` take effect once they are merged into `main` and cannot be exercised from a branch.
\ No newline at end of file
diff --git a/docs/User Guide/!!!meta.json b/docs/User Guide/!!!meta.json
index 9d198e33c7..fe16bec826 100644
--- a/docs/User Guide/!!!meta.json
+++ b/docs/User Guide/!!!meta.json
@@ -7269,7 +7269,7 @@
"dataFileName": "Mermaid Diagrams.md",
"attachments": [
{
- "attachmentId": "EN4DhmgiSH6t",
+ "attachmentId": "6uRyawJoeKCM",
"title": "image.png",
"role": "image",
"mime": "image/png",
@@ -7277,20 +7277,12 @@
"dataFileName": "Mermaid Diagrams_image.png"
},
{
- "attachmentId": "if9nzuWHt5KP",
+ "attachmentId": "EN4DhmgiSH6t",
"title": "image.png",
"role": "image",
"mime": "image/png",
"position": 10,
"dataFileName": "1_Mermaid Diagrams_image.png"
- },
- {
- "attachmentId": "TpPwoCFIePXm",
- "title": "image.png",
- "role": "image",
- "mime": "image/png",
- "position": 10,
- "dataFileName": "2_Mermaid Diagrams_image.png"
}
],
"dirFileName": "Mermaid Diagrams",
diff --git a/docs/User Guide/User Guide/Note Types/1_Mermaid Diagrams_image.png b/docs/User Guide/User Guide/Note Types/1_Mermaid Diagrams_image.png
index 381504c068..c0cc4cd31e 100644
Binary files a/docs/User Guide/User Guide/Note Types/1_Mermaid Diagrams_image.png and b/docs/User Guide/User Guide/Note Types/1_Mermaid Diagrams_image.png differ
diff --git a/docs/User Guide/User Guide/Note Types/2_Mermaid Diagrams_image.png b/docs/User Guide/User Guide/Note Types/2_Mermaid Diagrams_image.png
deleted file mode 100644
index ac8b0cf4ce..0000000000
Binary files a/docs/User Guide/User Guide/Note Types/2_Mermaid Diagrams_image.png and /dev/null differ
diff --git a/docs/User Guide/User Guide/Note Types/Mermaid Diagrams.md b/docs/User Guide/User Guide/Note Types/Mermaid Diagrams.md
index 48c36e6f1e..0cd9a99cbe 100644
--- a/docs/User Guide/User Guide/Note Types/Mermaid Diagrams.md
+++ b/docs/User Guide/User Guide/Note Types/Mermaid Diagrams.md
@@ -2,7 +2,7 @@
> [!TIP]
> For a quick understanding of the Mermaid syntax, see <a class="reference-link" href="Mermaid%20Diagrams/Syntax%20reference.dat">Syntax reference</a> (official documentation).
-<figure class="image image-style-align-center"><img style="aspect-ratio:886/663;" src="2_Mermaid Diagrams_image.png" width="886" height="663"></figure>
+<figure class="image"><img style="aspect-ratio:1464/915;" src="Mermaid Diagrams_image.png" width="1464" height="915"></figure>
Trilium supports Mermaid, which adds support for various diagrams such as flowchart, sequence diagram, class diagram, state diagram, pie charts, etc., all using a text description of the chart instead of manually drawing the diagram.
@@ -22,17 +22,22 @@ Depending on the chart being edited and user preference, there are two layouts s
* Horizontal, where the source code (editable part) is on the left side of the screen and the preview is to the right.
* Vertical, where the source code is at the bottom of the screen and the preview is at the top.
-It's possible to switch between the two layouts at any time by pressing the ![](Mermaid%20Diagrams_image.png) icon in the <a class="reference-link" href="../Basic%20Concepts%20and%20Features/UI%20Elements/Floating%20buttons.md">Floating buttons</a> area.
+It's possible to switch between the two layouts at any time by pressing the ![](1_Mermaid%20Diagrams_image.png) icon in the <a class="reference-link" href="../Basic%20Concepts%20and%20Features/UI%20Elements/Floating%20buttons.md">Floating buttons</a> area.
## Interaction
* The source code of the diagram (in Mermaid format) is displayed on the left or bottom side of the note (depending on the layout).
* Changing the diagram code will refresh automatically the diagram.
* The preview of the diagram is displayed at the right or top side of the note (depending on the layout):
- * There are dedicated buttons at the bottom-right of the preview to control the zoom in, zoom out or re-center the diagram: ![](1_Mermaid%20Diagrams_image.png)
+ * There are dedicated buttons at the bottom-right of the preview to control the zoom in, zoom out or fit the diagram.
* The preview can be moved around by holding the left mouse button and dragging.
* Zooming can also be done by using the scroll wheel.
* The zoom and position on the preview will remain fixed as the diagram changes, to be able to work more easily with large diagrams.
+ * Double-clicking the preview resets the zoom/position.
+ * The preview can also be focused by clicking on it, case in which keyboard shortcuts can be used:
+ * <kbd>+</kbd> or <kbd>E</kbd> to zoom in, <kbd>-</kbd> or <kbd>Q</kbd> to zoom out.
+ * <kbd>/</kbd> to reset the zoom/position.
+ * Arrow keys or <kbd>W</kbd> <kbd>A</kbd> <kbd>S</kbd> <kbd>D</kbd> to pan. Holding <kbd>Shift</kbd> pans faster.
* The size of the source/preview panes can be adjusted by hovering over the border between them and dragging it with the mouse.
* In the <a class="reference-link" href="../Basic%20Concepts%20and%20Features/UI%20Elements/Floating%20buttons.md">Floating buttons</a> area:
* The source/preview can be laid out left-right or bottom-top via the _Move editing pane to the left / bottom_ option.
diff --git a/docs/User Guide/User Guide/Note Types/Mermaid Diagrams_image.png b/docs/User Guide/User Guide/Note Types/Mermaid Diagrams_image.png
index c0cc4cd31e..964dae4915 100644
Binary files a/docs/User Guide/User Guide/Note Types/Mermaid Diagrams_image.png and b/docs/User Guide/User Guide/Note Types/Mermaid Diagrams_image.png differ