Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
Template bugfixes
Zerebos930632e6fe1a
diff --git a/package.json b/package.jsonindex 1b94b9e61d..11e67e8dba 100644--- a/package.json+++ b/package.json@@ -1,6 +1,6 @@{"name": "trilium.rocks",- "version": "1.0.0",+ "version": "1.0.1","description": "","main": "index.js","scripts": {diff --git a/src/templates/page.ejs b/src/templates/page.ejsindex f006bd86dc..30ecaf442d 100644--- a/src/templates/page.ejs+++ b/src/templates/page.ejs@@ -67,8 +67,8 @@ const customServerYml = `- url: "{protocol}://{domain}:{port}/etapi"<title><%= note.title %><% if (note.noteId !== subRoot.note.noteId) { %> - <%= subRoot.note.title %><% } %></title><!-- HTML Meta Tags -->- <meta name="description" content="A website for guides, reference, showcase, inspiration, and more, all for Trilium Notes! Not convinced? Come see for yourself just what Trilium can do."- ><!-- Facebook Meta Tags -->+ <meta name="description" content="A website for guides, reference, showcase, inspiration, and more, all for Trilium Notes! Not convinced? Come see for yourself just what Trilium can do.">+ <!-- Facebook Meta Tags --><meta property="og:url" content="https://trilium.rocks/"><meta property="og:type" content="website"><meta property="og:title" content="<%= note.title %><% if (note.noteId !== subRoot.note.noteId) { %> - <%= subRoot.note.title %><% } %>">@@ -95,9 +95,10 @@ content = content.replaceAll(headingRe, (...match) => {return match[0];});%>-<body data-note-id="<%= note.noteId %>" class="type-<%= note.type %><%= themeClass %>">+<body data-note-id="<%= note.noteId %>" class="type-<%= note.type %><%= themeClass %>" data-ancestor-note-id="<%= subRoot.note.noteId %>"><div id="mobile-header">- <a href="./">+ <!-- TODO: add option to use a clean home with / for fancy routing -->+ <a href="./<%= subRoot.note.noteId %>"><% if (subRoot.note.hasRelation("shareLogo")) { %><img src="api/images/<%= subRoot.note.getRelation("shareLogo").value %>/logo.svg" alt="Logo" /><% } %>@@ -109,7 +110,7 @@ content = content.replaceAll(headingRe, (...match) => {<div id="left-pane"><div id="navigation"><div id="site-header">- <a href="./">+ <a href="./<%= subRoot.note.noteId %>"><% if (subRoot.note.hasRelation("shareLogo")) { %><img src="api/images/<%= subRoot.note.getRelation("shareLogo").value %>/logo.svg" alt="Logo" /><% } %>@@ -131,7 +132,7 @@ content = content.replaceAll(headingRe, (...match) => {</div><% if (subRoot.note.hasVisibleChildren()) { %><nav id="menu">- <%- include('tree_item', {note: subRoot, activeNote: note, subRoot: subRoot}) %>+ <%- include('tree_item', {note: subRoot.note, activeNote: note, subRoot: subRoot}) %></nav><% } %></div>diff --git a/src/templates/tree_item.ejs b/src/templates/tree_item.ejsindex 8b3f5ecc5e..127c0a3641 100644--- a/src/templates/tree_item.ejs+++ b/src/templates/tree_item.ejs@@ -5,7 +5,7 @@ const linkHref = isExternalLink ? note.getLabelValue("shareExternal") : `./${notconst target = isExternalLink ? ` target="_blank" rel="noopener noreferrer"` : "";%>- <% if (note.noteId !== subRoot.noteId) { %>+ <% if (note.noteId !== subRoot.note.noteId) { %><a class="<%= linkClass %>" href="<%= linkHref %>"<%= target %>><% if (note.hasVisibleChildren()) { %><button class="collapse-button"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svg-icon right-triangle"><path d="M3 8L12 17L21 8"></path></svg></button><% } %><%= note.title %>