Settings: New Link Format: What is "Shortest path when possible"?

I understand what Absolute & Relative paths are & how they work, but I can’t quite understand what Obsidian does when “Shortest path when possible” is chosen.

Thanks

“Shortest path when possible” will use only the note name, unless there’s two notes with the same names. Then it uses as little of the file path as possible to make sure the link is unique.

6 Likes

Thank you, that was very helpful.

How is the shortest path calculated? is it the number of hops towards a common ancestor?

I asked the devs this question, and this is their answer:

If the file name is unique, then it’s just the filename. If it’s not unique, then it’s the absolute path from the vault root

2 Likes

Thank you!

I got confused with the option ‘shortest path when possible’.

I better understand with ‘omit path when possible’ :slight_smile: