Getting started
Getting started
Section titled āGetting startedāNameGuard keeps note names unique across your whole vault. When you create, move, or rename a note in a way that would collide with a name that already exists somewhere else, NameGuard stops the operation before it happens.
This matters most when New link format is set to Shortest path when possible, because that is
when Obsidian silently rewrites your existing [[wikilinks]] to keep them unambiguous. See
How it works for the details.
Install
Section titled āInstallā- Download
main.js,manifest.json, andstyles.cssfrom the latest release. - Copy them into
<your-vault>/.obsidian/plugins/name-guard/. - Reload Obsidian.
- Open Settings ā Community plugins and enable NameGuard.
To build from source instead:
bun installbun run buildThe mental model
Section titled āThe mental modelāThink of a noteās name (its file name without the folder and extension) as a unique key. With NameGuard enabled and your vault in shortest-link mode:
- Creating
projects/Foobar.mdwhennotes/Foobar.mdalready exists ā blocked. - Renaming or moving any note into the name
FoobarwhileFoobarexists ā blocked. - Creating
notes/Foobar.mdwhen no otherFoobarexists ā allowed. - Moving
notes/Foobar.mdtoarchive/Foobar.md(same name) ā allowed, because no new name is introduced.
Two notes that were already named the same before you installed NameGuard are left alone. NameGuard only guards new collisions.
First run
Section titled āFirst runāNameGuard works immediately with its defaults ā there is nothing to configure. When it blocks an operation, youāll see a short notice telling you which existing note caused the conflict. Rename your new note to something unique, or temporarily disable the plugin under Settings ā Community plugins.
Quick try-out
Section titled āQuick try-outā- Confirm Settings ā Files and links ā New link format is Shortest path when possible.
- Create a note called
Foobarin any folder. - Try to create another note called
Foobarin a different folder.
The second creation is blocked, and the first noteās links stay exactly as you wrote them.