docs(dev): add frontpage

This commit is contained in:
Elian Doran
2025-11-03 20:13:21 +02:00
parent e893c2f17a
commit d784acaf13
5 changed files with 71 additions and 56 deletions

View File

@@ -1,5 +1,5 @@
<aside class="admonition tip"> <aside class="admonition tip">
<p>For a quick start, consult the&nbsp;<a class="reference-link" href="#root/pgxEVkzLl1OP/_help_9qPsTWBorUhQ">API Reference</a>.</p> <p>For a quick start, consult the&nbsp;<a class="reference-link" href="#root/_help_9qPsTWBorUhQ">API Reference</a>.</p>
</aside> </aside>
<p>ETAPI is Trilium's public/external REST API. It is available since Trilium <p>ETAPI is Trilium's public/external REST API. It is available since Trilium
v0.50.</p> v0.50.</p>
@@ -7,7 +7,7 @@
<p>As an alternative to calling the API directly, there are client libraries <p>As an alternative to calling the API directly, there are client libraries
to simplify this</p> to simplify this</p>
<ul> <ul>
<li data-list-item-id="e3342ddfa108f6c8c6c47d7d3da8b02fa"><a href="https://github.com/Nriver/trilium-py">trilium-py</a>, you can <li><a href="https://github.com/Nriver/trilium-py">trilium-py</a>, you can
use Python to communicate with Trilium.</li> use Python to communicate with Trilium.</li>
</ul> </ul>
<h2>Obtaining a token</h2> <h2>Obtaining a token</h2>
@@ -25,10 +25,10 @@ Authorization: ETAPITOKEN</code></pre>
<p>Since v0.56 you can also use basic auth format:</p><pre><code class="language-text-x-trilium-auto">GET https://myserver.com/etapi/app-info <p>Since v0.56 you can also use basic auth format:</p><pre><code class="language-text-x-trilium-auto">GET https://myserver.com/etapi/app-info
Authorization: Basic BATOKEN</code></pre> Authorization: Basic BATOKEN</code></pre>
<ul> <ul>
<li data-list-item-id="ec59ac570a3d2a846da38378a5f2428ed">Where <code>BATOKEN = BASE64(username + ':' + password)</code> - this is <li>Where <code>BATOKEN = BASE64(username + ':' + password)</code> - this is
a standard Basic Auth serialization</li> a standard Basic Auth serialization</li>
<li data-list-item-id="e18e2e73ebecc949dd4a51cd9f8bb0b91">Where <code>username</code> is "etapi"</li> <li>Where <code>username</code> is "etapi"</li>
<li data-list-item-id="ee892223f95cef4a53caec5477ab31edb">And <code>password</code> is the generated ETAPI token described above.</li> <li>And <code>password</code> is the generated ETAPI token described above.</li>
</ul> </ul>
<p>Basic Auth is meant to be used with tools which support only basic auth.</p> <p>Basic Auth is meant to be used with tools which support only basic auth.</p>
<h2>Interaction using Bash scripts</h2> <h2>Interaction using Bash scripts</h2>
@@ -44,10 +44,10 @@ NOTE_ID="i6ra4ZshJhgN"
curl "$SERVER/etapi/notes/$NOTE_ID/content" -H "Authorization: $TOKEN" </code></pre> curl "$SERVER/etapi/notes/$NOTE_ID/content" -H "Authorization: $TOKEN" </code></pre>
<p>Make sure to replace the values of:</p> <p>Make sure to replace the values of:</p>
<ul> <ul>
<li data-list-item-id="e68020f83acc951e180bb405d149a64a5"><code>TOKEN</code> with your ETAPI token.</li> <li><code>TOKEN</code> with your ETAPI token.</li>
<li data-list-item-id="ef4c31df5f6d18811e7de0ee8ff95f3a7"><code>SERVER</code> with the correct protocol, host name and port to your <li><code>SERVER</code> with the correct protocol, host name and port to your
Trilium instance.</li> Trilium instance.</li>
<li data-list-item-id="e25086bb4c54d32259f987f9366e22204"><code>NOTE_ID</code> with an existing note ID to download.</li> <li><code>NOTE_ID</code> with an existing note ID to download.</li>
</ul> </ul>
<p>As another example, to obtain a .zip export of a note and place it in <p>As another example, to obtain a .zip export of a note and place it in
a directory called <code>out</code>, simply replace the last statement in a directory called <code>out</code>, simply replace the last statement in

View File

@@ -1,7 +1,6 @@
<aside class="admonition tip"> <aside class="admonition tip">
<p>For a quick understanding of the Mermaid syntax, see&nbsp;<a class="reference-link" <p>For a quick understanding of the Mermaid syntax, see&nbsp;<a class="reference-link"
href="#root/pOsGYCXsbNQG/KSZ04uQ2D1St/s1aBHPd79XYj/_help_WWgeUaBb7UfC">Syntax reference</a>&nbsp;(official href="#root/_help_WWgeUaBb7UfC">Syntax reference</a>&nbsp;(official documentation).</p>
documentation).</p>
</aside> </aside>
<figure class="image image-style-align-center"> <figure class="image image-style-align-center">
<img style="aspect-ratio:886/663;" src="2_Mermaid Diagrams_image.png" <img style="aspect-ratio:886/663;" src="2_Mermaid Diagrams_image.png"
@@ -15,9 +14,9 @@
<p>Depending on the chart being edited and user preference, there are two <p>Depending on the chart being edited and user preference, there are two
layouts supported by the Mermaid note type:</p> layouts supported by the Mermaid note type:</p>
<ul> <ul>
<li data-list-item-id="e5998f20495a1079ee7b6e284dc4d14e4">Horizontal, where the source code (editable part) is on the left side <li>Horizontal, where the source code (editable part) is on the left side
of the screen and the preview is to the right.</li> of the screen and the preview is to the right.</li>
<li data-list-item-id="ebebfbd8cf2125c70056e3e9075d8681e">Vertical, where the source code is at the bottom of the screen and the <li>Vertical, where the source code is at the bottom of the screen and the
preview is at the top.</li> preview is at the top.</li>
</ul> </ul>
<p>It's possible to switch between the two layouts at any time by pressing <p>It's possible to switch between the two layouts at any time by pressing
@@ -25,48 +24,44 @@
<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="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> <h2>Interaction</h2>
<ul> <ul>
<li data-list-item-id="e67d8f093c4793e19e2ade2d58728ae81">The source code of the diagram (in Mermaid format) is displayed on the <li>The source code of the diagram (in Mermaid format) is displayed on the
left or bottom side of the note (depending on the layout). left or bottom side of the note (depending on the layout).
<ul> <ul>
<li data-list-item-id="e4d777ef787093815b961d734021ccc55">Changing the diagram code will refresh automatically the diagram.</li> <li>Changing the diagram code will refresh automatically the diagram.</li>
</ul> </ul>
</li> </li>
<li data-list-item-id="e6faf589831e3252f8cda42f62248377a">The preview of the diagram is displayed at the right or top side of the <li>The preview of the diagram is displayed at the right or top side of the
note (depending on the layout): note (depending on the layout):
<ul> <ul>
<li data-list-item-id="e1dc5994137e511eb29657629d9e729a3">There are dedicated buttons at the bottom-right of the preview to control <li>There are dedicated buttons at the bottom-right of the preview to control
the zoom in, zoom out or re-center the diagram: the zoom in, zoom out or re-center the diagram:
<img src="1_Mermaid Diagrams_image.png"> <img src="1_Mermaid Diagrams_image.png">
</li> </li>
<li data-list-item-id="e51812ca016db170ceb6814007a60eb10">The preview can be moved around by holding the left mouse button and dragging.</li> <li>The preview can be moved around by holding the left mouse button and dragging.</li>
<li <li>Zooming can also be done by using the scroll wheel.</li>
data-list-item-id="e617128e494ed43ca5d0f5c749a8c9208">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
<li data-list-item-id="e7b87c55d329003996861f24d8d162b85">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>
changes, to be able to work more easily with large diagrams.</li> </ul>
</ul>
</li> </li>
<li data-list-item-id="e11cf4ecd9d2408ce5a46b949dea40b06">The size of the source/preview panes can be adjusted by hovering over <li>The size of the source/preview panes can be adjusted by hovering over
the border between them and dragging it with the mouse.</li> the border between them and dragging it with the mouse.</li>
<li data-list-item-id="ebc96b0fe8366ef4e00561de1c866d53b">In the&nbsp;<a class="reference-link" href="#root/_help_XpOYSgsLkTJy">Floating buttons</a>&nbsp;area: <li>In the&nbsp;<a class="reference-link" href="#root/_help_XpOYSgsLkTJy">Floating buttons</a>&nbsp;area:
<ul> <ul>
<li data-list-item-id="e12f31dc31db3c8be1fe87822ca2f451e">The source/preview can be laid out left-right or bottom-top via the <em>Move editing pane to the left / bottom</em> option.</li> <li>The source/preview can be laid out left-right or bottom-top via the <em>Move editing pane to the left / bottom</em> option.</li>
<li <li>Press <em>Lock editing</em> to automatically mark the note as read-only.
data-list-item-id="ed29e7616e6c77105103a68b1e8a6f7b3">Press <em>Lock editing</em> to automatically mark the note as read-only.
In this mode, the code pane is hidden and the diagram is displayed full-size. In this mode, the code pane is hidden and the diagram is displayed full-size.
Similarly, press <em>Unlock editing</em> to mark a read-only note as editable.</li> Similarly, press <em>Unlock editing</em> to mark a read-only note as editable.</li>
<li <li>Press the <em>Copy image reference to the clipboard</em> to be able to insert
data-list-item-id="e2bc7d5d8d1f8f02e61a6d86a3faae3b4">Press the <em>Copy image reference to the clipboard</em> to be able to insert the image representation of the diagram into a text note. See&nbsp;<a class="reference-link"
the image representation of the diagram into a text note. See&nbsp;<a class="reference-link" href="#root/_help_0Ofbk1aSuVRu">Image references</a>&nbsp;for more information.</li>
href="#root/_help_0Ofbk1aSuVRu">Image references</a>&nbsp;for more information.</li> <li>Press the <em>Export diagram as SVG</em> to download a scalable/vector rendering
<li of the diagram. Can be used to present the diagram without degrading when
data-list-item-id="ecaac01dc52bce394f720be2826e82026">Press the <em>Export diagram as SVG</em> to download a scalable/vector rendering zooming.</li>
of the diagram. Can be used to present the diagram without degrading when <li>Press the <em>Export diagram as PNG</em> to download a normal image (at
zooming.</li>
<li data-list-item-id="e9c815090884a394d60e06628b9e38add">Press the <em>Export diagram as PNG</em> to download a normal image (at
1x scale, raster) of the diagram. Can be used to send the diagram in more 1x scale, raster) of the diagram. Can be used to send the diagram in more
traditional channels such as e-mail.</li> traditional channels such as e-mail.</li>
</ul> </ul>
</li> </li>
</ul> </ul>
<h2>Errors in the diagram</h2> <h2>Errors in the diagram</h2>
<p>If there is an error in the source code, the error will be displayed in <p>If there is an error in the source code, the error will be displayed in

View File

@@ -14,8 +14,24 @@
"isExpanded": false, "isExpanded": false,
"type": "text", "type": "text",
"mime": "text/html", "mime": "text/html",
"attributes": [], "attributes": [
{
"type": "label",
"name": "label:shareAlias",
"value": "promoted,alias=Slug,single,text",
"isInheritable": true,
"position": 10
},
{
"type": "label",
"name": "iconClass",
"value": "bx bx-code-alt",
"isInheritable": false,
"position": 20
}
],
"format": "markdown", "format": "markdown",
"dataFileName": "Developer Guide.md",
"attachments": [], "attachments": [],
"dirFileName": "Developer Guide", "dirFileName": "Developer Guide",
"children": [ "children": [

View File

@@ -0,0 +1,4 @@
# Developer Guide
This documentation is intended for developers planning to implement new features or maintain the Trilium Notes application, as it describes the architecture of the application.
For the user-facing documentation, including how to write scripts and the various APIs, consult the [user guide](https://docs.triliumnotes.org/user-guide/) instead.

View File

@@ -55,7 +55,7 @@
"name": "iconClass", "name": "iconClass",
"value": "bx bx-help-circle", "value": "bx bx-help-circle",
"isInheritable": false, "isInheritable": false,
"position": 40 "position": 30
} }
], ],
"format": "markdown", "format": "markdown",
@@ -8814,17 +8814,24 @@
{ {
"type": "relation", "type": "relation",
"name": "internalLink", "name": "internalLink",
"value": "XpOYSgsLkTJy", "value": "WWgeUaBb7UfC",
"isInheritable": false, "isInheritable": false,
"position": 10 "position": 10
}, },
{ {
"type": "relation", "type": "relation",
"name": "internalLink", "name": "internalLink",
"value": "0Ofbk1aSuVRu", "value": "XpOYSgsLkTJy",
"isInheritable": false, "isInheritable": false,
"position": 20 "position": 20
}, },
{
"type": "relation",
"name": "internalLink",
"value": "0Ofbk1aSuVRu",
"isInheritable": false,
"position": 30
},
{ {
"type": "label", "type": "label",
"name": "shareAlias", "name": "shareAlias",
@@ -8838,13 +8845,6 @@
"value": "bx bx-selection", "value": "bx bx-selection",
"isInheritable": false, "isInheritable": false,
"position": 20 "position": 20
},
{
"type": "relation",
"name": "internalLink",
"value": "WWgeUaBb7UfC",
"isInheritable": false,
"position": 30
} }
], ],
"format": "markdown", "format": "markdown",
@@ -12589,6 +12589,13 @@
"type": "text", "type": "text",
"mime": "text/markdown", "mime": "text/markdown",
"attributes": [ "attributes": [
{
"type": "relation",
"name": "internalLink",
"value": "9qPsTWBorUhQ",
"isInheritable": false,
"position": 10
},
{ {
"type": "label", "type": "label",
"name": "shareAlias", "name": "shareAlias",
@@ -12602,13 +12609,6 @@
"value": "bx bx-extension", "value": "bx bx-extension",
"isInheritable": false, "isInheritable": false,
"position": 30 "position": 30
},
{
"type": "relation",
"name": "internalLink",
"value": "9qPsTWBorUhQ",
"isInheritable": false,
"position": 40
} }
], ],
"format": "markdown", "format": "markdown",