mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 03:16:11 +01:00
docs(user): improve documentation on sharing
This commit is contained in:
520
apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Sharing.html
generated
vendored
520
apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Sharing.html
generated
vendored
@@ -1,192 +1,346 @@
|
||||
<p>Trilium allows you to share selected notes as <strong>publicly accessible</strong> read-only
|
||||
documents. This feature is particularly useful for publishing content directly
|
||||
from your Trilium notes, making it accessible to others online.</p>
|
||||
<h2>Prerequisites</h2>
|
||||
<p>To use the sharing feature, you must have a <a class="reference-link"
|
||||
href="#root/_help_WOcw2SLH6tbX">Server Installation</a> of Trilium.
|
||||
This is necessary because the notes will be hosted from the server.</p>
|
||||
<h2>How to Share a Note</h2>
|
||||
<ol>
|
||||
<li>
|
||||
<p><strong>Enable Sharing</strong>: To share a note, toggle the <code>Shared</code> switch
|
||||
within the note's interface. Once sharing is enabled, an URL will appear,
|
||||
which you can click to access the shared note.</p>
|
||||
<p>
|
||||
<img src="Sharing_share-single-note.png" alt="Share Note">
|
||||
</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><strong>Access the Shared Note</strong>: The link provided will open the
|
||||
<figure
|
||||
class="image">
|
||||
<img style="aspect-ratio:1144/660;" src="Sharing_image.png" width="1144"
|
||||
height="660">
|
||||
</figure>
|
||||
<h2>Features, interaction and limitations</h2>
|
||||
<ul>
|
||||
<li>Searching by note title.</li>
|
||||
<li>Automatic dark/light mode based on the user's browser settings.</li>
|
||||
<li>Mobile-friendly layout, with sidebar.</li>
|
||||
<li>Collapsible tree with the same note icons as the application.</li>
|
||||
<li>Customizable logo.</li>
|
||||
<li>Toggle button for dark/light mode, which also stores the user preferences.</li>
|
||||
<li>Quick navigation buttons (previous and next note).</li>
|
||||
<li>Displaying the date of the last update of the note.</li>
|
||||
</ul>
|
||||
<h3>By note type</h3>
|
||||
<figure class="table" style="width:100%;">
|
||||
<table class="ck-table-resized">
|
||||
<colgroup>
|
||||
<col style="width:19.92%;">
|
||||
<col style="width:41.66%;">
|
||||
<col style="width:38.42%;">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th> </th>
|
||||
<th>Supported features</th>
|
||||
<th>Limitations</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th><a class="reference-link" href="#root/pOsGYCXsbNQG/KSZ04uQ2D1St/_help_iPIMuisry3hd">Text</a>
|
||||
</th>
|
||||
<td>
|
||||
<ul>
|
||||
<li>Table of contents.</li>
|
||||
<li>Syntax highlight of code blocks, provided a language is selected (does
|
||||
not work if “Auto-detected” is enabled).</li>
|
||||
<li>Rendering for math equations.</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<ul>
|
||||
<li>Including notes is not supported.</li>
|
||||
<li>Inline Mermaid diagrams are not rendered.</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><a class="reference-link" href="#root/pOsGYCXsbNQG/KSZ04uQ2D1St/_help_6f9hih2hXXZk">Code</a>
|
||||
</th>
|
||||
<td>
|
||||
<ul>
|
||||
<li>Basic support (displaying the contents of the note in a monospace font).</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<ul>
|
||||
<li>No syntax highlight.</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><a class="reference-link" href="#root/pOsGYCXsbNQG/KSZ04uQ2D1St/_help_m523cpzocqaD">Saved Search</a>
|
||||
</th>
|
||||
<td colspan="2">Not supported.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><a class="reference-link" href="#root/pOsGYCXsbNQG/KSZ04uQ2D1St/_help_iRwzGnHPzonm">Relation Map</a>
|
||||
</th>
|
||||
<td colspan="2">Not supported.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><a class="reference-link" href="#root/pOsGYCXsbNQG/KSZ04uQ2D1St/_help_bdUJEHsAPYQR">Note Map</a>
|
||||
</th>
|
||||
<td colspan="2">Not supported.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><a class="reference-link" href="#root/pOsGYCXsbNQG/KSZ04uQ2D1St/_help_HcABDtFCkbFN">Render Note</a>
|
||||
</th>
|
||||
<td colspan="2">Not supported.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><a class="reference-link" href="#root/pOsGYCXsbNQG/KSZ04uQ2D1St/_help_GTwFsgaA0lCt">Book</a>
|
||||
</th>
|
||||
<td>
|
||||
<ul>
|
||||
<li>The child notes are displayed in a fixed format. </li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<ul>
|
||||
<li>More advanced view types such as the calendar view are not supported.</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><a class="reference-link" href="#root/pOsGYCXsbNQG/KSZ04uQ2D1St/_help_s1aBHPd79XYj">Mermaid Diagrams</a>
|
||||
</th>
|
||||
<td>
|
||||
<ul>
|
||||
<li>The diagram is displayed as a vector image.</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<ul>
|
||||
<li>No further interaction supported.</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><a class="reference-link" href="#root/pOsGYCXsbNQG/KSZ04uQ2D1St/_help_grjYqerjn243">Canvas</a>
|
||||
</th>
|
||||
<td>
|
||||
<ul>
|
||||
<li>The diagram is displayed as a vector image.</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<ul>
|
||||
<li>No further interaction supported.</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><a class="reference-link" href="#root/pOsGYCXsbNQG/KSZ04uQ2D1St/_help_1vHRoWCEjj0L">Web View</a>
|
||||
</th>
|
||||
<td colspan="2">Not supported.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><a class="reference-link" href="#root/pOsGYCXsbNQG/KSZ04uQ2D1St/_help_gBbsAeiuUxI5">Mind Map</a>
|
||||
</th>
|
||||
<td>The diagram is displayed as a vector image.</td>
|
||||
<td>
|
||||
<ul>
|
||||
<li>No further interaction supported.</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><a class="reference-link" href="#root/pOsGYCXsbNQG/KSZ04uQ2D1St/_help_81SGnPGMk7Xc">Geo Map</a>
|
||||
</th>
|
||||
<td colspan="2">Not supported.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><a class="reference-link" href="#root/pOsGYCXsbNQG/KSZ04uQ2D1St/_help_W8vYD3Q1zjCR">File</a>
|
||||
</th>
|
||||
<td>Basic interaction (downloading the file).</td>
|
||||
<td>
|
||||
<ul>
|
||||
<li>No further interaction supported.</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</figure>
|
||||
<p>While the sharing feature is powerful, it has some limitations:</p>
|
||||
<ul>
|
||||
<li><strong>Code Notes</strong>: No syntax highlighting.</li>
|
||||
<li><strong>Static Note Tree</strong>
|
||||
</li>
|
||||
<li><strong>Protected Notes</strong>: Cannot be shared.</li>
|
||||
<li><strong>Include Notes</strong>: Not supported.</li>
|
||||
</ul>
|
||||
<p>Some of these limitations may be addressed in future updates.</p>
|
||||
<h2>Prerequisites</h2>
|
||||
<p>To use the sharing feature, you must have a <a class="reference-link"
|
||||
href="#root/_help_WOcw2SLH6tbX">Server Installation</a> of Trilium.
|
||||
This is necessary because the notes will be hosted from the server.</p>
|
||||
<h2>How to Share a Note</h2>
|
||||
<ol>
|
||||
<li>
|
||||
<p><strong>Enable Sharing</strong>: To share a note, toggle the <code>Shared</code> switch
|
||||
within the note's interface. Once sharing is enabled, an URL will appear,
|
||||
which you can click to access the shared note.</p>
|
||||
<p>
|
||||
<img src="Sharing_share-single-note.png" alt="Share Note">
|
||||
</p>
|
||||
</li>
|
||||
<li><strong>Access the Shared Note</strong>: 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 <code>localhost (127.0.0.1)</code>.</p>
|
||||
<p>
|
||||
<img src="Sharing_share-single-note-.png" alt="Shared Note Example">
|
||||
</p>
|
||||
</li>
|
||||
</ol>
|
||||
<h2>Sharing a Note Subtree</h2>
|
||||
<p>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.</p>
|
||||
<p>
|
||||
<img src="Sharing_share-multiple-not.png" alt="Shared Subtree Example">
|
||||
</p>
|
||||
<h2>Viewing All Shared Notes</h2>
|
||||
<p>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.</p>
|
||||
<h2>Security Considerations</h2>
|
||||
<p>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.</p>
|
||||
<h3>Password Protection</h3>
|
||||
<p>To protect shared notes with a username and password, you can use the <code>#shareCredentials</code> attribute.
|
||||
Add this label to the note with the format <code>#shareCredentials="username:password"</code>.
|
||||
To protect an entire subtree, make sure the label is <a href="#root/_help_bwZpz2ajCEwO">inheritable</a>.</p>
|
||||
<h2>Advanced Sharing Options</h2>
|
||||
<h3>Customizing the Appearance of Shared Notes</h3>
|
||||
<p>The default shared page is basic in design, but you can customize it using
|
||||
your own CSS:</p>
|
||||
<ul>
|
||||
<li><strong>Custom CSS</strong>: Link a CSS <a class="reference-link"
|
||||
href="#root/_help_6f9hih2hXXZk">Code</a> note to the shared page by
|
||||
adding a <code>~shareCss</code> 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 <code>#shareHiddenFromTree</code> label.</li>
|
||||
<li><strong>Omitting Default CSS</strong>: For extensive styling changes,
|
||||
use the <code>#shareOmitDefaultCss</code> label to avoid conflicts with Trilium's
|
||||
<a
|
||||
href="#root/_help_Wy267RK4M69c">default stylesheet</a>.</li>
|
||||
</ul>
|
||||
<h3>Adding JavaScript</h3>
|
||||
<p>You can inject custom JavaScript into the shared note using the <code>~shareJs</code> relation.
|
||||
This allows you to access note attributes or traverse the note tree using
|
||||
the <code>fetchNote()</code> API, which retrieves note data based on its
|
||||
ID.</p>
|
||||
<p>Example:</p><pre><code class="language-application-javascript-env-backend">const currentNote = await fetchNote();
|
||||
the URL will refer to <code>localhost (127.0.0.1)</code>.</li>
|
||||
</ol>
|
||||
<h2>Sharing a Note Subtree</h2>
|
||||
<p>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.</p>
|
||||
<h2>Viewing All Shared Notes</h2>
|
||||
<p>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.</p>
|
||||
<h2>Security Considerations</h2>
|
||||
<p>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.</p>
|
||||
<h3>Password Protection</h3>
|
||||
<p>To protect shared notes with a username and password, you can use the <code>#shareCredentials</code> attribute.
|
||||
Add this label to the note with the format <code>#shareCredentials="username:password"</code>.
|
||||
To protect an entire subtree, make sure the label is <a href="#root/_help_bwZpz2ajCEwO">inheritable</a>.</p>
|
||||
<h2>Advanced Sharing Options</h2>
|
||||
<h3>Customizing the Appearance of Shared Notes</h3>
|
||||
<p>The default design should be a good starting point, but you can customize
|
||||
it using your own CSS:</p>
|
||||
<ul>
|
||||
<li><strong>Custom CSS</strong>: Link a CSS <a class="reference-link"
|
||||
href="#root/_help_6f9hih2hXXZk">Code</a> note to the shared page by
|
||||
adding a <code>~shareCss</code> 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 <code>#shareHiddenFromTree</code> label.</li>
|
||||
<li><strong>Omitting Default CSS</strong>: For extensive styling changes,
|
||||
use the <code>#shareOmitDefaultCss</code> label to avoid conflicts with Trilium's
|
||||
<a
|
||||
href="#root/_help_Wy267RK4M69c">default stylesheet</a>.</li>
|
||||
</ul>
|
||||
<h3>Adding JavaScript</h3>
|
||||
<p>You can inject custom JavaScript into the shared note using the <code>~shareJs</code> relation.
|
||||
This allows you to access note attributes or traverse the note tree using
|
||||
the <code>fetchNote()</code> API, which retrieves note data based on its
|
||||
ID.</p>
|
||||
<p>Example:</p><pre><code class="language-application-javascript-env-backend">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);
|
||||
}</code></pre>
|
||||
<h3>Creating Human-Readable URL Aliases</h3>
|
||||
<p>Shared notes typically have URLs like <code>http://domain.tld/share/knvU8aJy4dJ7</code>,
|
||||
where the last part is the note's ID. You can make these URLs more user-friendly
|
||||
by adding the <code>#shareAlias</code> label to individual notes (e.g., <code>#shareAlias=highlighting</code>).
|
||||
This will change the URL to <code>http://domain.tld/share/highlighting</code>.</p>
|
||||
<p><strong>Important</strong>:</p>
|
||||
<ol>
|
||||
<li>Ensure that aliases are unique.</li>
|
||||
<li>Using slashes (<code>/</code>) within aliases to create subpaths is not
|
||||
supported.</li>
|
||||
</ol>
|
||||
<h3>Viewing and Managing Shared Notes</h3>
|
||||
<p>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.</p>
|
||||
<p>
|
||||
<img src="Sharing_shared-list.png" alt="Shared Notes List">
|
||||
</p>
|
||||
<h3>Setting a Custom Favicon</h3>
|
||||
<p>To customize the favicon for your shared pages, create a relation <code>~shareFavicon</code> pointing
|
||||
to a file note containing the favicon (e.g., in <code>.ico</code> format).</p>
|
||||
<h3>Sharing a Note as the Root</h3>
|
||||
<p>You can designate a specific note or folder as the root of your shared
|
||||
content by adding the <code>#shareRoot</code> label. This note will be linked
|
||||
when visiting <code>[http://domain.tld/share](http://domain/share)</code>,
|
||||
making it easier to use Trilium as a fully-fledged website. Consider combining
|
||||
this with the <code>#shareIndex</code> label, which will display a list of
|
||||
all shared notes.</p>
|
||||
<h2>Limitations</h2>
|
||||
<p>While the sharing feature is powerful, it has some limitations:</p>
|
||||
<ul>
|
||||
<li><strong>No Relation Map Support</strong>
|
||||
</li>
|
||||
<li><strong>Book Notes</strong>: Only show a list of child notes.</li>
|
||||
<li><strong>Code Notes</strong>: No syntax highlighting.</li>
|
||||
<li><strong>Static Note Tree</strong>
|
||||
</li>
|
||||
<li><strong>Protected Notes</strong>: Cannot be shared.</li>
|
||||
<li><strong>Include Notes</strong>: Not supported.</li>
|
||||
</ul>
|
||||
<p>Some of these limitations may be addressed in future updates.</p>
|
||||
<h2>Attribute reference</h2>
|
||||
<figure class="table">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Attribute</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>shareHiddenFromTree</code>
|
||||
</td>
|
||||
<td>this note is hidden from left navigation tree, but still accessible with
|
||||
its URL</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>shareExternalLink</code>
|
||||
</td>
|
||||
<td>note will act as a link to an external website in the share tree</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>shareAlias</code>
|
||||
</td>
|
||||
<td>define an alias using which the note will be available under <code>https://your_trilium_host/share/[your_alias]</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>shareOmitDefaultCss</code>
|
||||
</td>
|
||||
<td>default share page CSS will be omitted. Use when you make extensive styling
|
||||
changes.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>shareRoot</code>
|
||||
</td>
|
||||
<td>marks note which is served on /share root.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>shareDescription</code>
|
||||
</td>
|
||||
<td>define text to be added to the HTML meta tag for description</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>shareRaw</code>
|
||||
</td>
|
||||
<td>Note will be served in its raw format, without HTML wrapper. See also
|
||||
<a
|
||||
class="reference-link" href="#root/_help_Qjt68inQ2bRj">Serving directly the content of a note</a> for an alternative method
|
||||
without setting an attribute.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>shareDisallowRobotIndexing</code>
|
||||
</td>
|
||||
<td>
|
||||
<p>Indicates to web crawlers that the page should not be indexed of this
|
||||
note by:</p>
|
||||
<ul>
|
||||
<li>Setting the <code>X-Robots-Tag: noindex</code> HTTP header.</li>
|
||||
<li>Setting the <code>noindex, follow</code> meta tag.</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>shareCredentials</code>
|
||||
</td>
|
||||
<td>require credentials to access this shared note. Value is expected to be
|
||||
in format <code>username:password</code>. Don't forget to make this inheritable
|
||||
to apply to child-notes/images.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>shareIndex</code>
|
||||
</td>
|
||||
<td>Note with this label will list all roots of shared notes.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</figure>
|
||||
<h3>Creating Human-Readable URL Aliases</h3>
|
||||
<p>Shared notes typically have URLs like <code>http://domain.tld/share/knvU8aJy4dJ7</code>,
|
||||
where the last part is the note's ID. You can make these URLs more user-friendly
|
||||
by adding the <code>#shareAlias</code> label to individual notes (e.g., <code>#shareAlias=highlighting</code>).
|
||||
This will change the URL to <code>http://domain.tld/share/highlighting</code>.</p>
|
||||
<p><strong>Important</strong>:</p>
|
||||
<ol>
|
||||
<li>Ensure that aliases are unique.</li>
|
||||
<li>Using slashes (<code>/</code>) within aliases to create subpaths is not
|
||||
supported.</li>
|
||||
</ol>
|
||||
<h3>Viewing and Managing Shared Notes</h3>
|
||||
<p>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.</p>
|
||||
<p>
|
||||
<img src="Sharing_shared-list.png" alt="Shared Notes List">
|
||||
</p>
|
||||
<h3>Setting a Custom Favicon</h3>
|
||||
<p>To customize the favicon for your shared pages, create a relation <code>~shareFavicon</code> pointing
|
||||
to a file note containing the favicon (e.g., in <code>.ico</code> format).</p>
|
||||
<h3>Sharing a Note as the Root</h3>
|
||||
<p>You can designate a specific note or folder as the root of your shared
|
||||
content by adding the <code>#shareRoot</code> label. This note will be linked
|
||||
when visiting <code>[http://domain.tld/share](http://domain/share)</code>,
|
||||
making it easier to use Trilium as a fully-fledged website. Consider combining
|
||||
this with the <code>#shareIndex</code> label, which will display a list of
|
||||
all shared notes.</p>
|
||||
<h2>Attribute reference</h2>
|
||||
<figure class="table">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Attribute</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>shareHiddenFromTree</code>
|
||||
</td>
|
||||
<td>this note is hidden from left navigation tree, but still accessible with
|
||||
its URL</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>shareExternalLink</code>
|
||||
</td>
|
||||
<td>note will act as a link to an external website in the share tree</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>shareAlias</code>
|
||||
</td>
|
||||
<td>define an alias using which the note will be available under <code>https://your_trilium_host/share/[your_alias]</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>shareOmitDefaultCss</code>
|
||||
</td>
|
||||
<td>default share page CSS will be omitted. Use when you make extensive styling
|
||||
changes.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>shareRoot</code>
|
||||
</td>
|
||||
<td>marks note which is served on /share root.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>shareDescription</code>
|
||||
</td>
|
||||
<td>define text to be added to the HTML meta tag for description</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>shareRaw</code>
|
||||
</td>
|
||||
<td>Note will be served in its raw format, without HTML wrapper. See also
|
||||
<a
|
||||
class="reference-link" href="#root/_help_Qjt68inQ2bRj">Serving directly the content of a note</a> for an alternative method
|
||||
without setting an attribute.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>shareDisallowRobotIndexing</code>
|
||||
</td>
|
||||
<td>
|
||||
<p>Indicates to web crawlers that the page should not be indexed of this
|
||||
note by:</p>
|
||||
<ul>
|
||||
<li>Setting the <code>X-Robots-Tag: noindex</code> HTTP header.</li>
|
||||
<li>Setting the <code>noindex, follow</code> meta tag.</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>shareCredentials</code>
|
||||
</td>
|
||||
<td>require credentials to access this shared note. Value is expected to be
|
||||
in format <code>username:password</code>. Don't forget to make this inheritable
|
||||
to apply to child-notes/images.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>shareIndex</code>
|
||||
</td>
|
||||
<td>Note with this label will list all roots of shared notes.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</figure>
|
||||
<h2>Credits</h2>
|
||||
<p>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 <a href="https://github.com/zerebos/trilium.rocks">Trilium Rocks!</a> by
|
||||
<a
|
||||
href="https://github.com/zerebos">zerebos</a>.</p>
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 11 KiB |
@@ -1,25 +1,29 @@
|
||||
<p>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.</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>A note displayed as a web page (HTML)</th>
|
||||
<th>A note displayed as a raw format</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<img src="1_Serving directly the conte.png">
|
||||
</td>
|
||||
<td>
|
||||
<img src="Serving directly the conte.png">
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<figure class="table">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>A note displayed as a web page (HTML)</th>
|
||||
<th>A note displayed as a raw format</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<figure class="image">
|
||||
<img style="aspect-ratio:738/275;" src="1_Serving directly the conte.png"
|
||||
width="738" height="275">
|
||||
</figure>
|
||||
</td>
|
||||
<td>
|
||||
<img src="Serving directly the conte.png">
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</figure>
|
||||
<h2>By adding an attribute to the note</h2>
|
||||
<p>Simply add the <code>#shareRaw</code> attribute and the note will always
|
||||
be rendered <em>raw</em> when accessed from the share URL.</p>
|
||||
|
||||
BIN
apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Sharing_image.png
generated
vendored
Normal file
BIN
apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Sharing_image.png
generated
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 79 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 101 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 68 KiB |
Reference in New Issue
Block a user