Hey there,
I know this question has been asked a lot. I just can’t find a solution for it.
My goal is to build a Zettelkasten type blog where pages are connected in a bi-directional way. Therefore, it would be nice to have automatic backlinks on the pages.
Page A has a manual link to Page B
Page B has an automatic link back to Page A
Is there any way to achieve this in Kirby?
Thanks a lot
Max
There’s basically two ways to this:
- Use a page.update:after hook: Whenever a page references a new other page, update this other page to also reference the original page.
- Do not add back references explicitly, but filter all relevant pages by whether they contain a reference to page A.
- Would be a variation of option A, where you do not actually update the other page, but keep reference of these backlinks in some sort of cache file or json file per page. Which will be faster than option 2, but not have the downside of option A, which might fail if the page is locked when edited by another user.
Thanks a lot. I am going to try my luck with that and let you know how it worked out. 