Blake Cary1k downloadsMake duplicate note names in graph view readable by adding folder context.
Context Titles is an Obsidian community plugin that makes repeated note names easier to read in Graph View and Local Graph by adding folder context to the displayed label.
Projects/Alpha/Overview.md
-> Alpha - Overview
The real file stays Overview.md. Context Titles does not rename files, edit note contents, or require frontmatter titles.
Context Titles normally uses the shortest configured folder context. If that still produces duplicate graph labels, it automatically adds another parent folder only to the labels that still collide.
For example:
Projects/Alpha/Tasks.md
School/Alpha/Tasks.md
-> Projects - Alpha - Tasks
-> School - Alpha - Tasks
A third file that is already clear stays short:
Projects/Gamma/Tasks.md
-> Gamma - Tasks
This fixes the case where two notes have both the same basename and the same immediate parent-folder name.



The selected path mode is the minimum context used for a graph label. Context Titles can expand beyond that minimum when necessary to keep duplicate labels unique.
Alpha - Tasks.Projects - Alpha - Tasks.For example, with Parent folder only, these two notes would initially both produce Alpha - Tasks:
Projects/Alpha/Tasks.md
School/Alpha/Tasks.md
Context Titles detects that collision and expands them to:
Projects - Alpha - Tasks
School - Alpha - Tasks
-, rendered with clean spacing as Alpha - Overview.Templates, Generated, Media, Attachments.Root files and files inside ignored folders keep their normal basename.
Context Titles saves settings in the plugin's data.json file and normalizes invalid saved values back to defaults when the plugin loads.
Folder-scope paths are normalized for extra spaces, repeated slashes, trailing slashes, and Windows backslashes. Matching includes nested folders.
Obsidian does not expose a public Graph View label-provider API. Context Titles therefore uses an isolated runtime adapter for Graph View and Local Graph. The adapter changes graph renderer labels at display time and restores normal labels when the plugin unloads or graph labels are disabled.
Because that integration depends on Obsidian's internal graph renderer, future Obsidian changes may require maintenance.
Other display areas remain intentionally unsupported because they would require additional DOM or internal patching with relatively little benefit:
| Display area | v1.0.1 |
|---|---|
| Graph View | Supported |
| Local Graph | Supported |
| File Explorer | Not modified |
| Tabs / editor title / breadcrumbs | Not modified |
| Quick Switcher | Not modified |
| Search | Not modified |
| Backlinks / Outgoing Links | Not modified |
| Canvas cards | Not modified |
Install dependencies:
npm install
Run tests:
npm test
Run lint:
npm run lint
Build the plugin:
npm run build
Start watch mode:
npm run dev
The build writes main.js in the project root. Context Titles v1.0.1 requires Obsidian 1.13.0 or newer.
The repository also includes a GitHub Actions CI workflow that runs install, tests, build, and lint on pushes to main and on pull requests.
Do not develop or test plugins in your main vault. Use a separate Obsidian development vault.
npm run build..obsidian/plugins/context-titles/ inside the dev vault.main.js, manifest.json, and styles.css into that folder.Create notes such as:
Projects/Alpha/Overview.md
Projects/Beta/Overview.md
Projects/Alpha/Tasks.md
School/Alpha/Tasks.md
Templates/Overview.md
Main.md
Then verify:
Projects/Alpha/Overview.md and Projects/Beta/Overview.md display as Alpha - Overview and Beta - Overview.Projects/Alpha/Tasks.md and School/Alpha/Tasks.md expand to Projects - Alpha - Tasks and School - Alpha - Tasks instead of both displaying Alpha - Tasks.