New page from template with auto tag?

Hello,

Firstly, thank you for making silverbullet.md, it’s excellent!

I am unable to figure out the following scenario:

  • Create a template, something like this:
---
tags: template
description: "Create a new Regular PR"
hooks.newPage:
  suggestedName: "RegularPR/{{today}}-{{time}}"
  confirmName: false
  command: "Regular PR Note"
---

## Title
Title of the PR goes here

## PR

Summary
----
Summary of the PR goes here
  • I would like to have the notes created using this template with a tag, something like #regular-pr

Is this possible?

Absolutely! Add the following to define frontmatter on a page created using the template:

frontmatter: 
  tags: 
    - regular-pr

So you’re example would become:

---
tags: template
description: "Create a new Regular PR"
frontmatter: 
  tags: 
    - regular-pr
hooks.newPage:
  suggestedName: "RegularPR/{{today}}-{{time}}"
  confirmName: false
  command: "Regular PR Note"
---

## Title
Title of the PR goes here

## PR

Summary
----
Summary of the PR goes here
2 Likes

Glorious, so simple. Thank you!

1 Like