{{@page.name}} not working in page template

Hi!
first of all, I love silverbullet, the new stuff from 0.6 and 0.7 is exactly what I was looking for in my workflow, thank you so much for working on it.

I have an issue with page templates tough. I created a new silverbullet space because I didn’t have much anyway and I wanted to make sure I was getting everything new and working right away without upgrading issues.

I am creating my first page template like this:

---
tags: template
hooks.newPage:
  suggestedName: "Projects/"
  forPrefix: "Projects/"
  command: "Create New Project"
  key: "Ctrl-Alt-w"
frontmatter:
  created: "{{today}}"
  start_date:
  end_date:
  status: "active"
  tags: "project"
---

# {{@page.name}}

|^|

[[projects|Projects List]] - [[actions| Actions List]]

# Active

# Waiting

# Completed

# Meetings

however, the {{@page.name}} bit seems to break the template picker? Meaning I can still choose the template from the list after running “Page: from template” command, but nothing happens and the name choice is not popping up. If I remove {{@page.name}}, everything works as expected.

Did something changed about this?

This also happens if I just copy the example page template from the Page Template documentation.

1 Like

Update: I am attaching also a screenshot of the browser console below with some errors

My bad. Indeed I didn’t pass in the @page global variable when creating new pages (or snippets for that matter). Both are fixed now. Will be part of the next release, and will be in the edge builds in a few minutes if you don’t want to wait.

Update: fix is in edge now.

1 Like

Thanks for the swift fix :slight_smile: is the edge build still available for the Deno builds? I remeber a discussion about possibly removing them and I don’t see any reference to it.

In any case, I can wait for the regular release as well.

It is available, if you know where to find it. You can still get them from https://edge.silverbullet.md/silverbullet.js :slight_smile:

I tried getting the edge build using this

deno install -f --name silverbullet  --unstable-kv --unstable-worker-options -A https://edge.silverbullet.md/silverbullet.js

Seems to install correctly but when I point it to a folder I get:

error: Uncaught (in promise) TypeError: Deno.openKv is not a function
    at ga (https://edge.silverbullet.md/silverbullet.js:168:11873200)
    at U.k7 [as actionHandler] (https://edge.silverbullet.md/silverbullet.js:168:11875826)
    at U.execute (https://edge.silverbullet.md/silverbullet.js:23:8788)
    at async U.parseCommand (https://edge.silverbullet.md/silverbullet.js:23:6490)
    at async https://edge.silverbullet.md/silverbullet.js:233:6809

Sorry, this is probably my lack of knowledge regarding Deno, did I break something? I did not uninstall before running the command above, but also uninstalling/reinstalling doesn’t seem to work.

edit, deno version:

deno 1.40.2 (release, aarch64-apple-darwin)
v8 12.1.285.6
typescript 5.3.

This is my command for deno using edge, if it helps

deno run --allow-all --no-config --unstable --reload https://edge.silverbullet.md/silverbullet.js --sync-only /home/user/silverbullet

maybe the problem is the unstable-kv flag?

Please upgrade to Deno 1.40.3 (deno upgrade) they fixed deno install there.

Sorry, just saw your edit, I’ll wait for the homebrew package to be upgraded as well then :slight_smile:

This actually works tough, thanks :slight_smile: I tried removing the flag, but I had the same issue

Thanks to both for the help, I ended up installing deno 1.40.03 manually, installing the edge build and now everything works :slight_smile:

1 Like