Skip to content

Commit c2ce36d

Browse files
committed
docs(user): mention structure difference
1 parent 3359ff5 commit c2ce36d

File tree

6 files changed

+33
-16
lines changed

6 files changed

+33
-16
lines changed

apps/server/src/assets/doc_notes/en/User Guide/!!!meta.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 22 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Note Revisions
2+
The revision API on the server side is managed by `apps/server/src/routes/api/revisions.ts`

docs/User Guide/!!!meta.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12093,7 +12093,7 @@
1209312093
"R9pX4DGra2Vt",
1209412094
"ycBFjKrrwE9p"
1209512095
],
12096-
"title": "Exporting HTML for web publishing",
12096+
"title": "Exporting static HTML for web publishing",
1209712097
"notePosition": 20,
1209812098
"prefix": null,
1209912099
"isExpanded": false,
@@ -12130,7 +12130,7 @@
1213012130
}
1213112131
],
1213212132
"format": "markdown",
12133-
"dataFileName": "Exporting HTML for web publish.md",
12133+
"dataFileName": "Exporting static HTML for web .md",
1213412134
"attachments": []
1213512135
},
1213612136
{

docs/User Guide/User Guide/Advanced Usage/Sharing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ You can view a list of all shared notes by clicking on "Show Shared Notes Subtre
5050

5151
* Shared notes are published on the open internet and can be accessed by anyone with the URL unless the notes are password-protected.
5252
* The URL's randomness does not provide security, so it is crucial not to share sensitive information through this feature.
53-
* Trilium takes precautions to protect your publicly shared instance from leaking information for non-shared notes, including opening a separate read-only connection to the <a class="reference-link" href="Database.md">Database</a>. Depending on your threat model, it might make more sense to use <a class="reference-link" href="Sharing/Exporting%20HTML%20for%20web%20publish.md">Exporting HTML for web publishing</a> and use battle-tested web servers such as Nginx or Apache to serve static content.
53+
* Trilium takes precautions to protect your publicly shared instance from leaking information for non-shared notes, including opening a separate read-only connection to the <a class="reference-link" href="Database.md">Database</a>. Depending on your threat model, it might make more sense to use <a class="reference-link" href="Sharing/Exporting%20static%20HTML%20for%20web%20.md">Exporting HTML for web publishing</a> and use battle-tested web servers such as Nginx or Apache to serve static content.
5454

5555
### Password protection
5656

docs/User Guide/User Guide/Advanced Usage/Sharing/Exporting HTML for web publish.md renamed to docs/User Guide/User Guide/Advanced Usage/Sharing/Exporting static HTML for web .md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Exporting HTML for web publishing
1+
# Exporting static HTML for web publishing
22
As described in <a class="reference-link" href="../Sharing.md">Sharing</a>, Trilium can act as a public server in which the shared notes are displayed in read-only mode. While this can work in most cases, it's generally not meant for high-traffic websites and since it's running on a Node.js server it can be potentially exploited.
33

44
Another alternative is to generate static HTML files (just like other static site generators such as [MkDocs](https://www.mkdocs.org/)). Since the normal HTML ZIP export does not contain any styling or additional functionality, Trilium provides a way to export the same layout and style as the <a class="reference-link" href="../Sharing.md">Sharing</a> function into static HTML files.
@@ -23,6 +23,10 @@ Apart from normal <a class="reference-link" href="../Sharing.md">Sharing</a>, e
2323

2424
* The name of the files/URLs will prefer `shareAlias` to allow for clean URLs.
2525
* The export requires a functional web server as the pages will not render properly if accessed locally via a web browser due to the use of module scripts.
26+
* The directory structure is also slightly different:
27+
* A normal HTML export results in an index file and a single directory.
28+
* Instead, for static exporting the top-root level becomes the index file and the child directories are on the root instead.
29+
* This makes it possible to easily publish to a website, without forcing everything but the root note to be in a sub-directory.
2630

2731
## Testing locally
2832

0 commit comments

Comments
 (0)