Skip to content

Build your personal knowledge base with Trilium Notes

docs(demo): statistics not rendering (closes #4178)

Elian Dorane27f5cd41933
diff --git a/apps/edit-docs/demo/!!!meta.json b/apps/edit-docs/demo/!!!meta.json
index 50d1460e2b..67b58e4242 100644
--- a/apps/edit-docs/demo/!!!meta.json
+++ b/apps/edit-docs/demo/!!!meta.json
@@ -5295,7 +5295,7 @@
"title": "Implementation",
"notePosition": 0,
"prefix": null,
- "isExpanded": false,
+ "isExpanded": true,
"type": "code",
"mime": "text/html",
"attributes": [],
@@ -5445,7 +5445,7 @@
"title": "js",
"notePosition": 0,
"prefix": null,
- "isExpanded": false,
+ "isExpanded": true,
"type": "code",
"mime": "application/javascript;env=frontend",
"attributes": [],
@@ -5477,6 +5477,26 @@
"attachments": [],
"dirFileName": "renderPieChart",
"children": [
+ {
+ "isClone": true,
+ "noteId": "piyimQhwfcy5",
+ "notePath": [
+ "root",
+ "rvaX6hEaQlmk",
+ "KZVWidxicAfn",
+ "xRQuuwkaobBM",
+ "GXUcReLM6dSe",
+ "oLPbgCo7djD7",
+ "AlL9eFopYuHg",
+ "9GZB2MeW51xv",
+ "piyimQhwfcy5"
+ ],
+ "title": "chart.js",
+ "prefix": null,
+ "dataFileName": "chart.js.clone.html",
+ "type": "text",
+ "format": "html"
+ },
{
"isClone": false,
"noteId": "3jaioienOLTR",
@@ -5492,7 +5512,7 @@
"3jaioienOLTR"
],
"title": "chartjs-plugin-datalabels.min.js",
- "notePosition": 0,
+ "notePosition": 10,
"prefix": null,
"isExpanded": false,
"type": "file",
@@ -5582,7 +5602,7 @@
"title": "template",
"notePosition": 10,
"prefix": null,
- "isExpanded": false,
+ "isExpanded": true,
"type": "code",
"mime": "text/html",
"attributes": [],
@@ -5810,7 +5830,7 @@
"title": "template",
"notePosition": 0,
"prefix": null,
- "isExpanded": false,
+ "isExpanded": true,
"type": "code",
"mime": "text/html",
"attributes": [],
@@ -5833,7 +5853,7 @@
"title": "js",
"notePosition": 0,
"prefix": null,
- "isExpanded": false,
+ "isExpanded": true,
"type": "code",
"mime": "application/javascript;env=frontend",
"attributes": [],
diff --git a/apps/edit-docs/demo/navigation.html b/apps/edit-docs/demo/navigation.html
index 8c425fc819..4d1381fe37 100644
--- a/apps/edit-docs/demo/navigation.html
+++ b/apps/edit-docs/demo/navigation.html
@@ -538,6 +538,9 @@
<li><a href="root/Trilium%20Demo/Scripting%20examples/Statistics/Attribute%20count/template/js/renderPieChart.js"
target="detail">renderPieChart</a>
<ul>
+ <li><a href="root/Trilium%20Demo/Scripting%20examples/Weight%20Tracker/Implementation/JS%20code/chart.js"
+ target="detail">chart.js</a>
+ </li>
<li><a href="root/Trilium%20Demo/Scripting%20examples/Statistics/Attribute%20count/template/js/renderPieChart/chartjs-plugin-datalabe.min.js"
target="detail">chartjs-plugin-datalabels.min.js</a>
</li>
diff --git a/apps/edit-docs/demo/root/Trilium Demo.html b/apps/edit-docs/demo/root/Trilium Demo.html
index 3920159069..16d1e91c07 100644
--- a/apps/edit-docs/demo/root/Trilium Demo.html
+++ b/apps/edit-docs/demo/root/Trilium Demo.html
@@ -18,6 +18,7 @@
width="150" height="150">
</figure>
<p><strong>Welcome to Trilium Notes!</strong>
+
</p>
<p>This is a "demo" document packaged with Trilium to showcase some of its
features and also give you some ideas on how you might structure your notes.
@@ -25,16 +26,20 @@
you wish.</p>
<p>If you need any help, visit <a href="https://triliumnotes.org">triliumnotes.org</a> or
our <a href="https://github.com/TriliumNext">GitHub repository</a>.</p>
- <h2>Cleanup</h2>
+ <h2>Cleanup</h2>
+
<p>Once you're finished with experimenting and want to cleanup these pages,
you can simply delete them all.</p>
- <h2>Formatting</h2>
+ <h2>Formatting</h2>
+
<p>Trilium supports classic formatting like <em>italic</em>, <strong>bold</strong>, <em><strong>bold and italic</strong></em>.
You can add links pointing to <a href="https://triliumnotes.org/">external pages</a> or&nbsp;&nbsp;
<a
class="reference-link" href="Trilium%20Demo/Formatting%20examples">Formatting examples</a>.</p>
- <h3>Lists</h3>
+ <h3>Lists</h3>
+
<p><strong>Ordered:</strong>
+
</p>
<ol>
<li data-list-item-id="e877cc655d0239b8bb0f38696ad5d8abb">First Item</li>
@@ -49,6 +54,7 @@
</li>
</ol>
<p><strong>Unordered:</strong>
+
</p>
<ul>
<li data-list-item-id="e68bf4b518a16671c314a72073c3d900a">Item</li>
@@ -58,7 +64,8 @@
</ul>
</li>
</ul>
- <h3>Block quotes</h3>
+ <h3>Block quotes</h3>
+
<blockquote>
<p>Whereof one cannot speak, thereof one must be silent”</p>
<p>– Ludwig Wittgenstein</p>
diff --git a/apps/edit-docs/demo/root/Trilium Demo/Books/Book template.html b/apps/edit-docs/demo/root/Trilium Demo/Books/Book template.html
index e54ae932e5..ac97c2f509 100644
--- a/apps/edit-docs/demo/root/Trilium Demo/Books/Book template.html
+++ b/apps/edit-docs/demo/root/Trilium Demo/Books/Book template.html
@@ -14,17 +14,22 @@
<div class="ck-content">
<h2>Main characters</h2>
+
<p>… here put main characters …</p>
<p>&nbsp;</p>
- <h2>Plot</h2>
+ <h2>Plot</h2>
+
<p>… describe main plot lines …</p>
<p>&nbsp;</p>
- <h2>Tone</h2>
+ <h2>Tone</h2>
+
<p>&nbsp;</p>
- <h2>Genre</h2>
+ <h2>Genre</h2>
+
<p>scifi / drama / romance</p>
<p>&nbsp;</p>
- <h2>Similar books</h2>
+ <h2>Similar books</h2>
+
<ul>
<li data-list-item-id="eebd9f297d5dc97dfc46579ba1f25d7bf">…</li>
</ul>
diff --git a/apps/edit-docs/demo/root/Trilium Demo/Scripting examples/Statistics/Attribute count/template/js/renderPieChart/chart.js.clone.html b/apps/edit-docs/demo/root/Trilium Demo/Scripting examples/Statistics/Attribute count/template/js/renderPieChart/chart.js.clone.html
new file mode 100644
index 0000000000..64e4de7c49
--- /dev/null
+++ b/apps/edit-docs/demo/root/Trilium Demo/Scripting examples/Statistics/Attribute count/template/js/renderPieChart/chart.js.clone.html
@@ -0,0 +1,21 @@
+<html>
+
+ <head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <link rel="stylesheet" href="../../../../../../../../style.css">
+ <base target="_parent">
+ <title data-trilium-title>chart.js</title>
+ </head>
+
+ <body>
+ <div class="content">
+ <h1 data-trilium-h1>chart.js</h1>
+
+ <div class="ck-content">
+ <p>This is a clone of a note. Go to its <a href="../../../../../Weight%20Tracker/Implementation/JS%20code/chart.js">primary location</a>.</p>
+ </div>
+ </div>
+ </body>
+
+</html>
\ No newline at end of file
diff --git a/apps/server/src/assets/db/demo.zip b/apps/server/src/assets/db/demo.zip
index acb4c966c3..d56b917565 100644
Binary files a/apps/server/src/assets/db/demo.zip and b/apps/server/src/assets/db/demo.zip differ