diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Sharing.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Sharing.html
index 000dd8356..0b3f471f6 100644
--- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Sharing.html
+++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Sharing.html
@@ -6,173 +6,178 @@ class="image">
-
-
| - | Supported features | -Limitations | -
|---|---|---|
| Text - | -
-
|
-
-
|
-
| Code - | -
-
|
-
-
|
-
| Saved Search - | -Not supported. | -- |
| Relation Map - | -Not supported. | -- |
| Note Map - | -Not supported. | -- |
| Render Note - | -Not supported. | -- |
| Collections - | -
-
|
-
-
|
-
| Mermaid Diagrams - | -
-
|
-
-
|
-
| Canvas - | -
-
|
-
-
|
-
| Web View - | -Not supported. | -- |
| Mind Map - | -The diagram is displayed as a vector image. | -
-
|
-
| Geo Map View - | -Not supported. | -- |
| File - | -Basic interaction (downloading the file). | -
-
|
-
| + | Supported features | +Limitations | +
|---|---|---|
| Text + | +
+
|
+
+
|
+
| Code + | +
+
|
+
+
|
+
| Saved Search + | +Not supported. | ++ |
| Relation Map + | +Not supported. | ++ |
| Note Map + | +Not supported. | ++ |
| Render Note + | +Not supported. | ++ |
| Collections + | +
+
|
+
+
|
+
| Mermaid Diagrams + | +
+
|
+
+
|
+
| Canvas + | +
+
|
+
+
|
+
| Web View + | +Not supported. | ++ |
| Mind Map + | +The diagram is displayed as a vector image. | +
+
|
+
| Geo Map View + | +Not supported. | ++ |
| File + | +Basic interaction (downloading the file). | +
+
|
+
While the sharing feature is powerful, it has some limitations:
Some of these limitations may be addressed in future updates.
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.
Access the Shared Note: The link provided will open the
- note in your browser. If your server is not configured with a public IP,
- the URL will refer to localhost (127.0.0.1).
localhost (127.0.0.1).When you share a note, you actually share the entire subtree of notes @@ -220,12 +223,13 @@ class="image">
The default design should be a good starting point, but you can customize it using your own CSS:
~shareCss relation to the note. If you want this style to
apply to the entire subtree, make the label inheritable. You can hide the
CSS code note from the tree navigation by adding the #shareHiddenFromTree label.#shareOmitDefaultCss label to avoid conflicts with Trilium's
default stylesheet.The #shareHtmlLocation label accepts values in the format location:position:
head, body, content
+ head, body, content
start, end
+ start, end
For example:
#shareHtmlLocation=head:start - Injects HTML at the beginning
+ #shareHtmlLocation=head:start - Injects HTML at the beginning
of the <head> section#shareHtmlLocation=head:end - Injects HTML at the end of the <head> section
+ #shareHtmlLocation=head:end - Injects HTML at the end of the <head> section
(default)#shareHtmlLocation=body:start - Injects HTML at the beginning
+ #shareHtmlLocation=body:start - Injects HTML at the beginning
of the <body> section#shareHtmlLocation=content:start - Injects HTML at the beginning
+ #shareHtmlLocation=content:start - Injects HTML at the beginning
of the content area#shareHtmlLocation=content:end - Injects HTML at the end of
+ #shareHtmlLocation=content:end - Injects HTML at the end of
the content areaIf no location is specified, the HTML will be injected at content:end by
@@ -276,10 +280,20 @@ for (const attr of parentNote.attributes) {
This will change the URL to http://domain.tld/share/highlighting.
Important:
/) within aliases to create subpaths is not
+ /) within aliases to create subpaths is not
supported.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).
| Attribute | -Description | -
|---|---|
shareHiddenFromTree
- |
- this note is hidden from left navigation tree, but still accessible with - its URL | -
shareExternalLink
- |
- note will act as a link to an external website in the share tree | -
shareAlias
- |
- define an alias using which the note will be available under https://your_trilium_host/share/[your_alias]
- |
-
shareOmitDefaultCss
- |
- default share page CSS will be omitted. Use when you make extensive styling - changes. | -
shareRoot
- |
- marks note which is served on /share root. | -
shareDescription
- |
- define text to be added to the HTML meta tag for description | -
shareRaw
- |
- Note will be served in its raw format, without HTML wrapper. See also - Serving directly the content of a note for an alternative method - without setting an attribute. | -
shareDisallowRobotIndexing
- |
-
- Indicates to web crawlers that the page should not be indexed of this - note by: -
|
-
shareCredentials
- |
- require credentials to access this shared note. Value is expected to be
- in format username:password. Don't forget to make this inheritable
- to apply to child-notes/images. |
-
shareIndex
- |
- Note with this label will list all roots of shared notes. | -
shareHtmlLocation
- |
- defines where custom HTML injected via ~shareHtml relation
- should be placed. Applied to the HTML snippet note itself. Format: location:position where
- location is head, body, or content and
- position is start or end. Defaults to content:end. |
-
| Attribute | +Description | +
|---|---|
shareHiddenFromTree
+ |
+ this note is hidden from left navigation tree, but still accessible with + its URL | +
shareExternalLink
+ |
+ note will act as a link to an external website in the share tree | +
shareAlias
+ |
+ define an alias using which the note will be available under https://your_trilium_host/share/[your_alias]
+ |
+
shareOmitDefaultCss
+ |
+ default share page CSS will be omitted. Use when you make extensive styling + changes. | +
shareRoot
+ |
+ marks note which is served on /share root. | +
shareDescription
+ |
+ define text to be added to the HTML meta tag for description | +
shareRaw
+ |
+ Note will be served in its raw format, without HTML wrapper. See also + Serving directly the content of a note for an alternative method + without setting an attribute. | +
shareDisallowRobotIndexing
+ |
+
+ Indicates to web crawlers that the page should not be indexed of this + note by: +
|
+
shareCredentials
+ |
+ require credentials to access this shared note. Value is expected to be
+ in format username:password. Don't forget to make this inheritable
+ to apply to child-notes/images. |
+
shareIndex
+ |
+ Note with this label will list all roots of shared notes. | +
shareHtmlLocation
+ |
+ defines where custom HTML injected via ~shareHtml relation
+ should be placed. Applied to the HTML snippet note itself. Format: location:position where
+ location is head, body, or content and
+ position is start or end. Defaults to content:end. |
+
Since v0.95.0, a new theme was introduced (and enabled by default) which greatly improves the visual aspect of the Share feature, as well as its functionality (such as mobile support, dark/light mode, collapsible tree, diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Sharing/Exporting HTML for web publish.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Sharing/Exporting HTML for web publish.html index 2f3341063..c8d26bf85 100644 --- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Sharing/Exporting HTML for web publish.html +++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Sharing/Exporting HTML for web publish.html @@ -1,4 +1,4 @@ -
As described in Sharing, +
As described in Sharing, 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 @@ -7,7 +7,7 @@ static site generators such as MkDocs). 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 Sharing function + as the Sharing function into static HTML files.
Apart from the enhanced security, these HTML files are also easy to deploy on “serverless” deployments such as GitHub Pages or CloudFlare Pages and @@ -21,25 +21,24 @@ static web format.
Apart from normal Sharing, +
Apart from normal Sharing, exporting to static HTML files comes with a few subtle differences:
example.com/share/noteid, the notes follow
an hierarchical structure, such as docs.triliumnotes.org/user-guide/concepts/navigation/tree-concepts.favicon.ico is not handled automatically, it needs to be
+ favicon.ico is not handled automatically, it needs to be
manually added on the server after the export is generated.shareAlias to allow
+ shareAlias to allow
for clean URLs.npm i -g http-server
Once installed simply:
http-server.http-server.Local only desktop/laptop - Allows a single instance on a desktop and will save the notes locally on that desktop.
Server with web only access - Installs the application on the server and allows access from any web browser on any device, including mobile.
Combination of server and desktop/laptop - Install the application on both a server, for web access and data synchronisation, @@ -23,12 +22,11 @@ desktop application will sync and store the data locally so that it can be used when offline.