Skip to content

Conversation

@logoff
Copy link

@logoff logoff commented Jan 9, 2026

Summary

  • Fixes wikilink resolution to search all directories, not just relative to the current file
  • Wikilinks like [[PageName]] now correctly resolve to any matching PageName.md in the project

Problem

Wikilinks (e.g., [[PageName]]) were only resolved relative to the current file's directory. This meant:

  • [[MyPage]] in docs/blog/post.md would only find docs/blog/MyPage.md
  • It would NOT find docs/pages/MyPage.md even though that's the intended target

This is inconsistent with how Obsidian, mkdocs-roamlinks-plugin, and other wikilink tools work - they search the entire vault/project for matching filenames.

Solution

For wikilinks specifically, search all nodes by filename instead of resolving relative paths. Standard markdown links [text](path) continue to resolve relative to the current file as before.

Test plan

  • Tested on a documentation project with ~255 pages
  • Verified edge count increased significantly after fix (from ~100 to ~2300 edges)
  • Standard markdown links still work correctly

Wikilinks like [[PageName]] typically reference files without full paths,
expecting the link to resolve to any matching file regardless of its
directory location. This is consistent with how tools like Obsidian and
roamlinks handle wikilinks.

Previously, wikilinks were only resolved relative to the current file's
directory, which meant [[PageName]] in docs/subdir/file.md would only
find docs/subdir/PageName.md, not docs/other/PageName.md.

Now, wikilinks search all nodes by filename, while standard markdown
links [text](path) continue to resolve relative to the current file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant