I created two templates to hook on page top:
---
description: Adds last modified date/time to page
tags:
- template
hooks.top:
where: "parent != 'builtin' and page !~ /^📌/ and tags != 'meta' and tags != 'template'"
order: 1
---
**Last modified:** `{{niceDateTime(@page.lastModified)}}`
and
---
description: Adds created date/time to page
tags:
- template
hooks.top:
where: "parent != 'builtin' and page !~ /^📌/ and tags != 'meta' and tags != 'template'"
order: 2
---
**Created:** `{{niceDateTime(@page.created)}}`
Only the first one is shown on pages. I have no idea why. I also see some weird errors on console:
14:05:22.377 Parse error {
"type": "âš ",
"from": 29,
"to": 29,
"children": [
{
"from": 29,
"to": 29,
"text": ""
}
]
} index.plug.js:2:8131
14:05:22.377
An exception was thrown as a result of invoking function renderTemplateWidgetsTop error: Parse error in: index.plug.js:1:728
It http://silverbullet.local:12345/_plug/index.plug.js:1
14:05:22.378
Error: Parse error in:
onMessage worker_sandbox.ts:93
onmessage worker_sandbox.ts:59
Not sure if it’s related but it looks like that… I have also no idea how to debug this. Thanks for ideas.
UPDATE Idea: may it be because of the text": ""
?