"Live" Wiki Links in Frontmatter

Hi, maybe I’m overcomplicating things but is it possible to have “live” wiki links in the frontmatter?

What I’m trying to do: I’d like to have list of gifts, where each page represents one gift. In the frontmatter, there should be a “to” field, indicating who the gift is for (and here not only the name as a string but as a wiki link to a dedicated person page). On that person’s page I’d like to query all gifts with ...where to = @page.name

So essentially this:
Gift Page:

---
tags: gift
to: [[Path/To/Person X]]
---

Person Page:

```query
page where to =~ "{{@page.name}}"
```

Now the issue is if I rename the person’s page the “to:” fields aren’t updated throughout Silverbullet, resulting in an incomplete query.

Thank you so much!

Looking at the code, doesn’t seem very hard. I also want this feature, so I created a GitHub Issue for the request (not to steal your thunder, I can link code fragments there)

I think just that would already show the gifts on the person’s page via the Linked Mentions (backlinks), although your query would still be useful to get specifically only the person linked with to:, in case you link other people in the gift page text.

2 Likes