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 b6f29a2df..29e5cac33 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 @@ -1,192 +1,346 @@

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

-

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

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

    -
  2. -
  3. -

    Access the Shared Note: The link provided will open the +

    + +
    +

    Features, interaction and limitations

    + +

    By note type

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
     Supported featuresLimitations
    Text + +
      +
    • Table of contents.
    • +
    • Syntax highlight of code blocks, provided a language is selected (does + not work if “Auto-detected” is enabled).
    • +
    • Rendering for math equations.
    • +
    +
    +
      +
    • Including notes is not supported.
    • +
    • Inline Mermaid diagrams are not rendered.
    • +
    +
    Code + +
      +
    • Basic support (displaying the contents of the note in a monospace font).
    • +
    +
    +
      +
    • No syntax highlight.
    • +
    +
    Saved Search + Not supported.
    Relation Map + Not supported.
    Note Map + Not supported.
    Render Note + Not supported.
    Book + +
      +
    • The child notes are displayed in a fixed format. 
    • +
    +
    +
      +
    • More advanced view types such as the calendar view are not supported.
    • +
    +
    Mermaid Diagrams + +
      +
    • The diagram is displayed as a vector image.
    • +
    +
    +
      +
    • No further interaction supported.
    • +
    +
    Canvas + +
      +
    • The diagram is displayed as a vector image.
    • +
    +
    +
      +
    • No further interaction supported.
    • +
    +
    Web View + Not supported.
    Mind Map + The diagram is displayed as a vector image. +
      +
    • No further interaction supported.
    • +
    +
    Geo Map + Not supported.
    File + Basic interaction (downloading the file). +
      +
    • No further interaction supported.
    • +
    +
    +
    +

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

    + +

    Some of these limitations may be addressed in future updates.

    +

    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

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

      +
    2. +
    3. 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).

      -

      - Shared Note Example -

      -
    4. -
    -

    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 -

    -

    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

    -

    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

    -

    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

    -

    The default shared page is basic in design, but you can customize it using - your own CSS:

    - -

    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();
    +      the URL will refer to localhost (127.0.0.1).
  4. +
+

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.

+

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

+

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

+

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

+

The default design should be a good starting point, but you can customize + it using your own CSS:

+ +

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();
 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). - This will change the URL to http://domain.tld/share/highlighting.

-

Important:

-
    -
  1. Ensure that aliases are unique.
  2. -
  3. Using slashes (/) within aliases to create subpaths is not - supported.
  4. -
-

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 -

-

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

-

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.

-

Limitations

-

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

- -

Some of these limitations may be addressed in future updates.

-

Attribute reference

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

-
    -
  • Setting the X-Robots-Tag: noindex HTTP header.
  • -
  • Setting the noindex, follow meta tag.
  • -
-
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.
-
\ No newline at end of file +

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). + This will change the URL to http://domain.tld/share/highlighting.

+

Important:

+
    +
  1. Ensure that aliases are unique.
  2. +
  3. Using slashes (/) within aliases to create subpaths is not + supported.
  4. +
+

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 +

+

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

+

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.

+

Attribute reference

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeDescription
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:

+
    +
  • Setting the X-Robots-Tag: noindex HTTP header.
  • +
  • Setting the noindex, follow meta tag.
  • +
+
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.
+
+

Credits

+

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, + etc.). This theme is an adaptation of the Trilium Rocks! by + zerebos.

\ No newline at end of file diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Sharing/1_Serving directly the conte.png b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Sharing/1_Serving directly the conte.png index 981a43146..23592294b 100644 Binary files a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Sharing/1_Serving directly the conte.png and b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Sharing/1_Serving directly the conte.png differ diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Sharing/Serving directly the content o.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Sharing/Serving directly the content o.html index a02f07641..9eb16d493 100644 --- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Sharing/Serving directly the content o.html +++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Sharing/Serving directly the content o.html @@ -1,25 +1,29 @@

When accessing a shared note, Trilium will render it as a web page. Sometimes it's desirable to serve the content directly so that it can be used in a script or downloaded by the user.

- - - - - - - - - - - - - -
A note displayed as a web page (HTML)A note displayed as a raw format
- - - -
- +
+ + + + + + + + + + + + + +
A note displayed as a web page (HTML)A note displayed as a raw format
+
+ +
+
+ +
+

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.

diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Sharing_image.png b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Sharing_image.png new file mode 100644 index 000000000..4c92b90c5 Binary files /dev/null and b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Sharing_image.png differ diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Sharing_share-multiple-not.png b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Sharing_share-multiple-not.png deleted file mode 100644 index 6b88c8b6e..000000000 Binary files a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Sharing_share-multiple-not.png and /dev/null differ diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Sharing_share-single-note-.png b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Sharing_share-single-note-.png deleted file mode 100644 index 744fd4cda..000000000 Binary files a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Sharing_share-single-note-.png and /dev/null differ diff --git a/docs/Release Notes/!!!meta.json b/docs/Release Notes/!!!meta.json index 3fed9ee6b..7ea9a04e6 100644 --- a/docs/Release Notes/!!!meta.json +++ b/docs/Release Notes/!!!meta.json @@ -61,6 +61,32 @@ "attachments": [], "dirFileName": "Release Notes", "children": [ + { + "isClone": false, + "noteId": "jthwbL0FdaeU", + "notePath": [ + "hD3V4hiu2VW4", + "jthwbL0FdaeU" + ], + "title": "v0.95.0", + "notePosition": 10, + "prefix": null, + "isExpanded": false, + "type": "text", + "mime": "text/html", + "attributes": [ + { + "type": "relation", + "name": "template", + "value": "wyurrlcDl416", + "isInheritable": false, + "position": 60 + } + ], + "format": "markdown", + "dataFileName": "v0.95.0.md", + "attachments": [] + }, { "isClone": false, "noteId": "7HGYsJbLuhnv", @@ -69,7 +95,7 @@ "7HGYsJbLuhnv" ], "title": "v0.94.1", - "notePosition": 10, + "notePosition": 20, "prefix": null, "isExpanded": false, "type": "text", @@ -95,7 +121,7 @@ "Neq53ujRGBqv" ], "title": "v0.94.0", - "notePosition": 20, + "notePosition": 30, "prefix": null, "isExpanded": false, "type": "text", @@ -121,7 +147,7 @@ "VN3xnce1vLkX" ], "title": "v0.93.0", - "notePosition": 30, + "notePosition": 40, "prefix": null, "isExpanded": false, "type": "text", @@ -139,7 +165,7 @@ "WRaBfQqPr6qo" ], "title": "v0.92.7", - "notePosition": 40, + "notePosition": 50, "prefix": null, "isExpanded": false, "type": "text", @@ -165,7 +191,7 @@ "a2rwfKNmUFU1" ], "title": "v0.92.6", - "notePosition": 50, + "notePosition": 60, "prefix": null, "isExpanded": false, "type": "text", @@ -183,7 +209,7 @@ "fEJ8qErr0BKL" ], "title": "v0.92.5-beta", - "notePosition": 60, + "notePosition": 70, "prefix": null, "isExpanded": false, "type": "text", @@ -201,7 +227,7 @@ "kkkZQQGSXjwy" ], "title": "v0.92.4", - "notePosition": 70, + "notePosition": 80, "prefix": null, "isExpanded": false, "type": "text", @@ -219,7 +245,7 @@ "vAroNixiezaH" ], "title": "v0.92.3-beta", - "notePosition": 80, + "notePosition": 90, "prefix": null, "isExpanded": false, "type": "text", @@ -237,7 +263,7 @@ "mHEq1wxAKNZd" ], "title": "v0.92.2-beta", - "notePosition": 90, + "notePosition": 100, "prefix": null, "isExpanded": false, "type": "text", @@ -255,7 +281,7 @@ "IykjoAmBpc61" ], "title": "v0.92.1-beta", - "notePosition": 100, + "notePosition": 110, "prefix": null, "isExpanded": false, "type": "text", @@ -273,7 +299,7 @@ "dq2AJ9vSBX4Y" ], "title": "v0.92.0-beta", - "notePosition": 110, + "notePosition": 120, "prefix": null, "isExpanded": false, "type": "text", @@ -291,7 +317,7 @@ "3a8aMe4jz4yM" ], "title": "v0.91.6", - "notePosition": 120, + "notePosition": 130, "prefix": null, "isExpanded": false, "type": "text", @@ -309,7 +335,7 @@ "8djQjkiDGESe" ], "title": "v0.91.5", - "notePosition": 130, + "notePosition": 140, "prefix": null, "isExpanded": false, "type": "text", @@ -327,7 +353,7 @@ "OylxVoVJqNmr" ], "title": "v0.91.4-beta", - "notePosition": 140, + "notePosition": 150, "prefix": null, "isExpanded": false, "type": "text", @@ -345,7 +371,7 @@ "tANGQDvnyhrj" ], "title": "v0.91.3-beta", - "notePosition": 150, + "notePosition": 160, "prefix": null, "isExpanded": false, "type": "text", @@ -363,7 +389,7 @@ "hMoBfwSoj1SC" ], "title": "v0.91.2-beta", - "notePosition": 160, + "notePosition": 170, "prefix": null, "isExpanded": false, "type": "text", @@ -381,7 +407,7 @@ "a2XMSKROCl9z" ], "title": "v0.91.1-beta", - "notePosition": 170, + "notePosition": 180, "prefix": null, "isExpanded": false, "type": "text", @@ -399,7 +425,7 @@ "yqXFvWbLkuMD" ], "title": "v0.90.12", - "notePosition": 180, + "notePosition": 190, "prefix": null, "isExpanded": false, "type": "text", @@ -417,7 +443,7 @@ "veS7pg311yJP" ], "title": "v0.90.11-beta", - "notePosition": 190, + "notePosition": 200, "prefix": null, "isExpanded": false, "type": "text", @@ -435,7 +461,7 @@ "sq5W9TQxRqMq" ], "title": "v0.90.10-beta", - "notePosition": 200, + "notePosition": 210, "prefix": null, "isExpanded": false, "type": "text", @@ -453,7 +479,7 @@ "yFEGVCUM9tPx" ], "title": "v0.90.9-beta", - "notePosition": 210, + "notePosition": 220, "prefix": null, "isExpanded": false, "type": "text", @@ -471,7 +497,7 @@ "o4wAGqOQuJtV" ], "title": "v0.90.8", - "notePosition": 220, + "notePosition": 230, "prefix": null, "isExpanded": false, "type": "text", @@ -504,7 +530,7 @@ "i4A5g9iOg9I0" ], "title": "v0.90.7-beta", - "notePosition": 230, + "notePosition": 240, "prefix": null, "isExpanded": false, "type": "text", @@ -522,7 +548,7 @@ "ThNf2GaKgXUs" ], "title": "v0.90.6-beta", - "notePosition": 240, + "notePosition": 250, "prefix": null, "isExpanded": false, "type": "text", @@ -540,7 +566,7 @@ "G4PAi554kQUr" ], "title": "v0.90.5-beta", - "notePosition": 250, + "notePosition": 260, "prefix": null, "isExpanded": false, "type": "text", @@ -567,7 +593,7 @@ "zATRobGRCmBn" ], "title": "v0.90.4", - "notePosition": 260, + "notePosition": 270, "prefix": null, "isExpanded": false, "type": "text", @@ -585,7 +611,7 @@ "sCDLf8IKn3Iz" ], "title": "v0.90.3", - "notePosition": 270, + "notePosition": 280, "prefix": null, "isExpanded": false, "type": "text", @@ -603,7 +629,7 @@ "VqqyBu4AuTjC" ], "title": "v0.90.2-beta", - "notePosition": 280, + "notePosition": 290, "prefix": null, "isExpanded": false, "type": "text", @@ -621,7 +647,7 @@ "RX3Nl7wInLsA" ], "title": "v0.90.1-beta", - "notePosition": 290, + "notePosition": 300, "prefix": null, "isExpanded": false, "type": "text", @@ -639,7 +665,7 @@ "GyueACukPWjk" ], "title": "v0.90.0-beta", - "notePosition": 300, + "notePosition": 310, "prefix": null, "isExpanded": false, "type": "text", @@ -657,7 +683,7 @@ "wyurrlcDl416" ], "title": "Release Template", - "notePosition": 310, + "notePosition": 320, "prefix": null, "isExpanded": false, "type": "text", diff --git a/docs/User Guide/!!!meta.json b/docs/User Guide/!!!meta.json index 7813f0102..b945b30de 100644 --- a/docs/User Guide/!!!meta.json +++ b/docs/User Guide/!!!meta.json @@ -9190,6 +9190,90 @@ "value": "bx bx-share-alt", "isInheritable": false, "position": 30 + }, + { + "type": "relation", + "name": "internalLink", + "value": "iPIMuisry3hd", + "isInheritable": false, + "position": 60 + }, + { + "type": "relation", + "name": "internalLink", + "value": "m523cpzocqaD", + "isInheritable": false, + "position": 70 + }, + { + "type": "relation", + "name": "internalLink", + "value": "iRwzGnHPzonm", + "isInheritable": false, + "position": 80 + }, + { + "type": "relation", + "name": "internalLink", + "value": "bdUJEHsAPYQR", + "isInheritable": false, + "position": 90 + }, + { + "type": "relation", + "name": "internalLink", + "value": "HcABDtFCkbFN", + "isInheritable": false, + "position": 100 + }, + { + "type": "relation", + "name": "internalLink", + "value": "GTwFsgaA0lCt", + "isInheritable": false, + "position": 110 + }, + { + "type": "relation", + "name": "internalLink", + "value": "s1aBHPd79XYj", + "isInheritable": false, + "position": 120 + }, + { + "type": "relation", + "name": "internalLink", + "value": "grjYqerjn243", + "isInheritable": false, + "position": 130 + }, + { + "type": "relation", + "name": "internalLink", + "value": "1vHRoWCEjj0L", + "isInheritable": false, + "position": 140 + }, + { + "type": "relation", + "name": "internalLink", + "value": "gBbsAeiuUxI5", + "isInheritable": false, + "position": 150 + }, + { + "type": "relation", + "name": "internalLink", + "value": "81SGnPGMk7Xc", + "isInheritable": false, + "position": 160 + }, + { + "type": "relation", + "name": "internalLink", + "value": "W8vYD3Q1zjCR", + "isInheritable": false, + "position": 170 } ], "format": "markdown", @@ -9204,20 +9288,12 @@ "dataFileName": "Sharing_shared-list.png" }, { - "attachmentId": "DFUCyGDOpqOt", - "title": "share-multiple-notes-web.png", + "attachmentId": "ibqWQUOCMhIE", + "title": "image.png", "role": "image", "mime": "image/png", "position": 10, - "dataFileName": "Sharing_share-multiple-not.png" - }, - { - "attachmentId": "Il8udowRLald", - "title": "share-single-note-web.png", - "role": "image", - "mime": "image/png", - "position": 10, - "dataFileName": "Sharing_share-single-note-.png" + "dataFileName": "Sharing_image.png" }, { "attachmentId": "ShhsPSZVMQKx", @@ -9258,10 +9334,10 @@ "dataFileName": "Serving directly the conte.png" }, { - "attachmentId": "xicVjsf2Kmaz", + "attachmentId": "ixkXFTSSkdpL", "title": "image.png", "role": "image", - "mime": "image/jpg", + "mime": "image/png", "position": 10, "dataFileName": "1_Serving directly the conte.png" } diff --git a/docs/User Guide/User Guide/Advanced Usage/Sharing.md b/docs/User Guide/User Guide/Advanced Usage/Sharing.md index 9be69d58a..4e540cda5 100644 --- a/docs/User Guide/User Guide/Advanced Usage/Sharing.md +++ b/docs/User Guide/User Guide/Advanced Usage/Sharing.md @@ -1,6 +1,32 @@ # Sharing 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. +
+ +## Features, interaction and limitations + +* Searching by note title. +* Automatic dark/light mode based on the user's browser settings. +* Mobile-friendly layout, with sidebar. +* Collapsible tree with the same note icons as the application. +* Customizable logo. +* Toggle button for dark/light mode, which also stores the user preferences. +* Quick navigation buttons (previous and next note). +* Displaying the date of the last update of the note. + +### By note type + +
 Supported featuresLimitations
Text
  • Table of contents.
  • Syntax highlight of code blocks, provided a language is selected (does not work if “Auto-detected” is enabled).
  • Rendering for math equations.
  • Including notes is not supported.
  • Inline Mermaid diagrams are not rendered.
Code
  • Basic support (displaying the contents of the note in a monospace font).
  • No syntax highlight.
Saved SearchNot supported.
Relation MapNot supported.
Note MapNot supported.
Render NoteNot supported.
Book
  • The child notes are displayed in a fixed format. 
  • More advanced view types such as the calendar view are not supported.
Mermaid Diagrams
  • The diagram is displayed as a vector image.
  • No further interaction supported.
Canvas
  • The diagram is displayed as a vector image.
  • No further interaction supported.
Web ViewNot supported.
Mind MapThe diagram is displayed as a vector image.
  • No further interaction supported.
Geo MapNot supported.
FileBasic interaction (downloading the file).
  • No further interaction supported.
+ +While the sharing feature is powerful, it has some limitations: + +* **Code Notes**: No syntax highlighting. +* **Static Note Tree** +* **Protected Notes**: Cannot be shared. +* **Include Notes**: Not supported. + +Some of these limitations may be addressed in future updates. + ## 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. @@ -11,15 +37,11 @@ To use the sharing feature, you must have a Code note to the shared page by adding a `~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. * **Omitting Default CSS**: For extensive styling changes, use the `#shareOmitDefaultCss` label to avoid conflicts with Trilium's [default stylesheet](../Basic%20Concepts%20and%20Features/Themes.md). @@ -79,19 +101,10 @@ To customize the favicon for your shared pages, create a relation `~shareFavicon 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. -## Limitations - -While the sharing feature is powerful, it has some limitations: - -* **No Relation Map Support** -* **Book Notes**: Only show a list of child notes. -* **Code Notes**: No syntax highlighting. -* **Static Note Tree** -* **Protected Notes**: Cannot be shared. -* **Include Notes**: Not supported. - -Some of these limitations may be addressed in future updates. - ## Attribute reference -
AttributeDescription
shareHiddenFromTreethis note is hidden from left navigation tree, but still accessible with its URL
shareExternalLinknote will act as a link to an external website in the share tree
shareAliasdefine an alias using which the note will be available under https://your_trilium_host/share/[your_alias]
shareOmitDefaultCssdefault share page CSS will be omitted. Use when you make extensive styling changes.
shareRootmarks note which is served on /share root.
shareDescriptiondefine text to be added to the HTML meta tag for description
shareRawNote 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:

  • Setting the X-Robots-Tag: noindex HTTP header.
  • Setting the noindex, follow meta tag.
shareCredentialsrequire 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.
shareIndexNote with this label will list all roots of shared notes.
\ No newline at end of file +
AttributeDescription
shareHiddenFromTreethis note is hidden from left navigation tree, but still accessible with its URL
shareExternalLinknote will act as a link to an external website in the share tree
shareAliasdefine an alias using which the note will be available under https://your_trilium_host/share/[your_alias]
shareOmitDefaultCssdefault share page CSS will be omitted. Use when you make extensive styling changes.
shareRootmarks note which is served on /share root.
shareDescriptiondefine text to be added to the HTML meta tag for description
shareRawNote 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:

  • Setting the X-Robots-Tag: noindex HTTP header.
  • Setting the noindex, follow meta tag.
shareCredentialsrequire 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.
shareIndexNote with this label will list all roots of shared notes.
+ +## Credits + +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, etc.). This theme is an adaptation of the [Trilium Rocks!](https://github.com/zerebos/trilium.rocks) by [zerebos](https://github.com/zerebos). \ No newline at end of file diff --git a/docs/User Guide/User Guide/Advanced Usage/Sharing/1_Serving directly the conte.png b/docs/User Guide/User Guide/Advanced Usage/Sharing/1_Serving directly the conte.png index 981a43146..23592294b 100644 Binary files a/docs/User Guide/User Guide/Advanced Usage/Sharing/1_Serving directly the conte.png and b/docs/User Guide/User Guide/Advanced Usage/Sharing/1_Serving directly the conte.png differ diff --git a/docs/User Guide/User Guide/Advanced Usage/Sharing/Serving directly the content o.md b/docs/User Guide/User Guide/Advanced Usage/Sharing/Serving directly the content o.md index 72a495a47..54531bf31 100644 --- a/docs/User Guide/User Guide/Advanced Usage/Sharing/Serving directly the content o.md +++ b/docs/User Guide/User Guide/Advanced Usage/Sharing/Serving directly the content o.md @@ -1,9 +1,7 @@ # Serving directly the content of a note When accessing a shared note, Trilium will render it as a web page. Sometimes it's desirable to serve the content directly so that it can be used in a script or downloaded by the user. -| A note displayed as a web page (HTML) | A note displayed as a raw format | -| --- | --- | -| ![](1_Serving%20directly%20the%20conte.png) | ![](Serving%20directly%20the%20conte.png) | +
A note displayed as a web page (HTML)A note displayed as a raw format
## By adding an attribute to the note diff --git a/docs/User Guide/User Guide/Advanced Usage/Sharing_image.png b/docs/User Guide/User Guide/Advanced Usage/Sharing_image.png new file mode 100644 index 000000000..4c92b90c5 Binary files /dev/null and b/docs/User Guide/User Guide/Advanced Usage/Sharing_image.png differ diff --git a/docs/User Guide/User Guide/Advanced Usage/Sharing_share-multiple-not.png b/docs/User Guide/User Guide/Advanced Usage/Sharing_share-multiple-not.png deleted file mode 100644 index 6b88c8b6e..000000000 Binary files a/docs/User Guide/User Guide/Advanced Usage/Sharing_share-multiple-not.png and /dev/null differ diff --git a/docs/User Guide/User Guide/Advanced Usage/Sharing_share-single-note-.png b/docs/User Guide/User Guide/Advanced Usage/Sharing_share-single-note-.png deleted file mode 100644 index 744fd4cda..000000000 Binary files a/docs/User Guide/User Guide/Advanced Usage/Sharing_share-single-note-.png and /dev/null differ