README file from
GithubBetter Markdown Links
[[Wikilinks]] are not part of the Markdown spec, so a vault that uses them stops making sense outside
Obsidian. Switch to Markdown links and you hit the next problem: Obsidian writes
[Title](path%20with%20space/note%20with%20space.md), which is unreadable, and it writes relative paths
without a leading ./, which other editors resolve differently than Obsidian does — the same link, two
meanings.
This plugin makes Obsidian generate the readable, unambiguous form instead: angle brackets around paths
with spaces, an explicit ./ on relative links, and tidy file:// URLs. It can also convert the links
you already have, in one note, one folder, or the whole vault.
Demo vault
The documentation is a demo vault. Every feature has a note that explains what it does and why you would want it, with awkward paths already in place to try it against.
Start reading here — it is plain markdown, so it works on GitHub with nothing installed.
A copy of the vault ships with every release. You can access it via any of the following:
- Running the Better Markdown Links: Open demo vault command.
- Downloading
better-markdown-links-demo-vault-<version>.zip(<version>is the release version) from the Releases. - Browsing its source in
demo-vault/in this repository.
What it does
- Angle bracket links —
[Title](<path with space/note with space.md>)instead of%20noise. The Markdown spec allows it and Obsidian understands it; Obsidian just never generates it. 01 Angle bracket links - Explicit relative links — a leading
./, so a relative path cannot be mistaken for an absolute one by anything that reads your vault. 02 Relative links - Convert what you already have — one note, one folder, or the whole vault; on command, on save, on auto-save, or on every modification, whichever suits how eagerly you want it to work. 03 Convert links
file://normalization —[note](file:///C:%5Cnotes%5Ctodo.md)becomes[note](file:///C:/notes/todo.md). Other links are left alone. 03 Convert links- Links keep working when notes move — renames and moves update the links pointing at them. 04 Settings
For plugin developers
This plugin adds an additional overload to
app.fileManager.generateMarkdownLink(). To use the extended signature from
your own plugin, copy
generate-markdown-link-extended.d.ts into your code.
Integration with other plugins
This plugin handles rename and delete events according to its settings. Similar handlers ship in:
Those handlers are designed to work with each other, so the plugins can be installed together.
For better performance on a large vault, consider also installing Backlink Cache.
Installation
The plugin is available in the official Community Plugins repository.
Beta versions
To install the latest beta release of this plugin (regardless if it is available in the official Community Plugins repository or not), follow these steps:
- Ensure you have the BRAT plugin installed and enabled.
- Click Install via BRAT.
- An Obsidian pop-up window should appear. In the window, click the
Add pluginbutton once and wait a few seconds for the plugin to install.
Debugging
By default, debug messages for this plugin are hidden.
To show them, run the following command:
window.DEBUG.enable('better-markdown-links');
For more details, refer to the documentation.
Changelog
All notable changes to this project will be documented in the CHANGELOG.
Contributing
Contributions are welcome — see CONTRIBUTING to get set up.
Support
My other Obsidian resources
See my other Obsidian resources.