README file from
GithubConsistent Attachments and Links
Obsidian resolves links with a clever search that only Obsidian has, so a vault can be perfectly navigable inside it and full of dead links the moment you open a note anywhere else — in another editor, published to GitHub, or exported as a folder. Move a note and its attachments stay behind; delete one and you either strand files or take someone else's with you.
This plugin makes a vault consistent in the plainest sense: every link a real relative path in standard Markdown, every attachment in its note's own folder. Then it keeps it that way — moving attachments with their note, updating links on rename, and cleaning up what is left behind.
[!WARNING]
As the plugin might change your vault layout, it is crucial that you backup your vault before making any massive changes with this plugin!
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 example notes to run 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 Consistent Attachments and Links: Open demo vault command.
- Downloading
consistent-attachments-and-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
- Attachments follow their note. Move or delete a note and its attachments go with it — safely, never taking a file another note still references. 01 Attachments move with their note
- Links stay valid. Renaming and moving rewrite the links that point at what you touched. 02 Links stay valid on rename and move
- Audit the whole vault and get a report of bad links, bad embed paths, wikilinks and wiki-embeds, changing nothing. 03 Check vault consistency
- Convert an existing vault — wikilinks to Markdown links, paths to relative, attachments collected into place, empty folders swept — in one command or step by step. 04 Reorganize and convert links · 07 Commands
- Settings, including which of the destructive operations are unlocked. 05 Settings
- Obsidian's own settings matter too — link format, attachment location — and the vault explains which ones to change and why. 06 Recommended Obsidian settings
Attachment Subfolder setting
Moved to 06 Recommended Obsidian settings.
Since v3.0.0
this setting is no longer managed by the plugin; it follows Obsidian's built-in
Default location for new attachments.
This heading stays so links already pointing at it keep resolving.
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('consistent-attachments-and-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.
License
© dy-sh
Maintainer: Michael Naumov