From b8851565ebcba216d5dc025a513edda9242e73ca Mon Sep 17 00:00:00 2001 From: Kevin Leutzinger <6435727+kleutzinger@users.noreply.github.com> Date: Wed, 1 Oct 2025 03:53:29 -0400 Subject: [PATCH] docs: clarify shareHtmlLocation goes on snippet note --- docs/User Guide/User Guide/Advanced Usage/Sharing.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/User Guide/User Guide/Advanced Usage/Sharing.md b/docs/User Guide/User Guide/Advanced Usage/Sharing.md index 793389ae2..caee9238e 100644 --- a/docs/User Guide/User Guide/Advanced Usage/Sharing.md +++ b/docs/User Guide/User Guide/Advanced Usage/Sharing.md @@ -69,7 +69,7 @@ You can inject custom JavaScript into the shared note using the `~shareJs` relat ### Adding custom HTML -You can inject custom HTML snippets into specific locations of the shared page using the `~shareHtml` relation. The HTML note should contain the raw HTML content you want to inject, and you can control where it appears using the `#shareHtmlLocation` label. +You can inject custom HTML snippets into specific locations of the shared page using the `~shareHtml` relation. The HTML note should contain the raw HTML content you want to inject, and you can control where it appears by adding the `#shareHtmlLocation` label to the HTML snippet note itself. The `#shareHtmlLocation` label accepts values in the format `location:position`: - **Locations**: `head`, `body`, `content` @@ -123,7 +123,7 @@ To do so, create a shared text note and apply the `shareIndex` label. When viewe ## Attribute reference -
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. 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 . |