Internal link targets look wrong

In my vaults I have the “Use [[Wikilinks]]” setting turned off. I’ve noticed that when I type [[xxx, it pops up an auto-complete list with existing note titles that match xxx, and when I select one it types a Markdown-formatted link like this:

[Title](filename.md)

The weird thing is, if the page I’m linking to is in a different directory than the note I’m typing, I would expect the link to look like this:

[Title](../directory/filename.md)

The link works when I click it within Obsidian, but if I use some other program (like Marked2) to view the raw markdown files, the links don’t work because they point to files which don’t exist. I suspect they only work in Obsidian because it looks up the link target in a database of some kind.

I also set up a case where two folders contain notes with identically named notes, i.e. VAULT/dummy1/testing.md and VAULT/dummy2/testing.md. When I type [[testing]], it offers both notes, and creates one of the following:

* [testing](dummy1/testing.md)
* [testing](dummy2/testing.md)

Again, these links only work within Obsidian, probably because there’s some kind of database shenanigans going on. I would expect them to be relative links, like this:

* [testing](../dummy1/testing.md)
* [testing](../dummy2/testing.md)

This smells like a bug to me, but the fact that it works within Obsidian tells me that somebody designed it this way, and didn’t think about the fact that other programs might need to view these files.

And are there any plans to fix this, so the automatically generated links actually point to the correct files, and will therefore work when programs other than Obsidian are viewing them?

(Note: in all of the examples above, the note I’m editing is in a child folder within the vault, so links to other folders should start with ../.)

First, in your case it seem you should use both wikilink off and relative path mode on.
Second, relative path mode is currently incomplete/broken.

I totally missed the “New link format” option. Maybe somebody can add a note about this, in the explanatory text below the “Use [[Wikilinks]]” option? Something like “Also see the ‘New link format’ option above if using Markdown-formatted links”.

I’m also going to keep an eye on those other two bugs - I don’t generally move notes once they’ve been created (other than moving notes from /Daily Notes/ to /Daily Notes Archive/yyyy-mm/ every so often) but I can see where not changing the links correctly would be an issue.

Thanks for the pointer.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.