silverbulletmd / silverbullet

The knowledge hacker's notebook
https://silverbullet.md
MIT License
2.14k stars 155 forks source link

Backlinks are lost when links are generated by templates #711

Open brouberol opened 5 months ago

brouberol commented 5 months ago

When I generate a list of links by performing a query of some kind, it seems that the pages the rendered links link to don't include any backlink.

This seems to be because even though the query might multiple links on the page, Silverbullet only registers a single link, with a ref of {{ @p.ref }}.

Link template

Screenshot 2024-02-15 at 09 24 37

Rendered page

Screenshot 2024-02-15 at 09 24 31

When I visit the Journal page, I only see a single backlink, corresponding to the non-templatized [[Journal]] link appearing on the index page:

Screenshot 2024-02-15 at 09 28 50

Is that expected? And if so, do you know of any what to make backlinks work with templatized links?

Thanks!