Skip to content

Build your personal knowledge base with Trilium Notes

added support for #pageUrl into shared notes

zadamfeffd57f2404
diff --git a/src/public/stylesheets/share.css b/src/public/stylesheets/share.css
index 9c2bcae207..1031eaa9fc 100644
--- a/src/public/stylesheets/share.css
+++ b/src/public/stylesheets/share.css
@@ -117,6 +117,15 @@ iframe.pdf-view {
margin-right: 20px;
}
+#noteClippedFrom {
+ padding: 10px 0 10px 0;
+ margin: 20px 0 20px 0;
+ color: #666;
+ border: 1px solid #ddd;
+ border-left: 0;
+ border-right: 0;
+}
+
#toggleMenuButton::after {
position: relative;
top: -2px;
diff --git a/src/views/share/page.ejs b/src/views/share/page.ejs
index 0f1ccaa1ba..ab488525d6 100644
--- a/src/views/share/page.ejs
+++ b/src/views/share/page.ejs
@@ -36,6 +36,10 @@
<h1 id="title"><%= note.title %></h1>
+ <% if (note.hasLabel("pageUrl")) { %>
+ <div id="noteClippedFrom">This note was originally clipped from <a href="<%= note.getLabelValue("pageUrl") %>"><%= note.getLabelValue("pageUrl") %></a></div>
+ <% } %>
+
<% if (note.type === 'book') { %>
<% } else if (isEmpty) { %>
<p>This note has no content.</p>