Hi, I would like to develop my own plugin, based on that request since I also would love to see something like this implemented.
I noticed it is possible to get links with:
const links = this.app.metadataCache.getFileCache(file)?.links;
So half of the job is done. But is there a way to get backlinks?
I kinda don’t want to iterate over whole vault since there is already a backlinks official plugin, so I assume optimal solution is already made.
Like I could just look at official plugin source code and continue from here, couldn’t I?
I noticed there is answer to similar question. Even though it is said here that getBacklinksForFile is not documented officially, I couldn’t find it in Typescript typing definitions.
I also think I could just take both “Backlinks” and “Outgoing links” html content and put it inside one tab, but it’s not that fun.
So to sum up: is there a viable way to find backlinks for the current file? If not, what possible workaround?