snezhig / obsidian-front-matter-title

Plugin for Obsidian.md
GNU General Public License v3.0
245 stars 19 forks source link

Links do not get updated until editing the file. #197

Open vivekkalyan opened 10 months ago

vivekkalyan commented 10 months ago

Currently, if the there is an existing link, and the linked file title is changed, the change is not reflected in the parent file until the parent file is edited in some manner. Is it possible to auto-update links in parent files when the alias is changed?

Example:

X.md

# test1
This file links to [[Y|test2]].

Y.md

# test2
When this file title is changed from test2 to test3, test1 file is not updated unless it is edited.

Is this an Obsidian limitation?

snezhig commented 10 months ago

Yea, now plugin watching on files that are currently opened. But I think how to wide this part of plugin.

vivekkalyan commented 10 months ago

Could it find files based on backlinks? I'm happy to tackle this as a PR if you could point me to the relevant section in the repo (where the watching happens now).

snezhig commented 10 months ago

I will check it. NoteLinkFeature is responsible for file link changes (https://github.com/snezhig/obsidian-front-matter-title/tree/master/src/Feature/NoteLink)

anamyk commented 8 months ago

Would be awesome, if it could update without editing the file first :)

satche commented 5 months ago

I wonder if this issue is still considered ? I didn't have must time to play with it, but I was wondering if something could trigger at save, check all internal links referenced in the note and update the title.