Blake Cary31 downloadsMake duplicate note names readable by adding folder context.
Context Titles is an Obsidian community plugin that makes repeated note names easier to read by adding folder context to the displayed title.
Projects/Alpha/Overview.md
-> Alpha - Overview
The real file stays Overview.md. The plugin does not rename files, modify note contents, or require frontmatter titles.
By default, Context Titles only changes Graph View labels when the visible graph contains duplicate file names. A unique note like Reference/Guides/Index.md stays Index, while duplicate notes like Projects/Alpha/Tasks.md and Projects/Beta/Tasks.md become Alpha - Tasks and Beta - Tasks.
Repeated note names like Overview, Tasks, and Research can be hard to tell apart in Graph View.

Context Titles adds folder context to duplicate labels so they become easier to understand.

Context Titles includes settings for graph label mode, folder include/exclude rules, path mode, custom separators, and live preview.

Context Titles changes Graph View and Local Graph labels at display time so repeated note names are easier to tell apart.
In duplicate-only mode, labels receive folder context only when the visible graph contains more than one file with the same basename. If only one Tasks.md is visible, it stays Tasks. If Projects/Alpha/Tasks.md and Projects/Beta/Tasks.md are both visible, they display as Alpha - Tasks and Beta - Tasks.
TFile.path and TFile.basename.Folder - File.-, rendered with clean spacing as Alpha - Overview.Templates, Generated, Media, Attachments.If a file is inside an ignored folder, Context Titles returns only the normal basename. Root files also return only the basename.
Files inside ignored folders keep their normal basename.
Context Titles saves settings in the plugin's data.json file and normalizes bad saved values back to defaults when the plugin loads.
Duplicate file names only.Projects/Alpha or Resources/Templates. Enter one folder per line. Leave blank for all folders.-, displayed as Alpha - Overview. Blank separators display with the default separator.Projects/Alpha/Overview.md becomes Alpha - Overview.Projects/Alpha/Overview.md becomes Projects - Alpha - Overview.Areas/Projects/Alpha/Overview.md becomes Projects - Alpha - Overview.Vault/Areas/Projects/Alpha/Overview.md becomes Areas - Projects - Alpha - Overview.Projects/Alpha/Overview.md.Folder scope uses vault-relative folder paths. Blank lines, extra spaces, repeated slashes, trailing slashes, and Windows backslashes are normalized. A blank folder list means all folders.
Nested folders are included in the match. For example, Projects/Alpha also matches Projects/Alpha/Research/Tasks.md.
Obsidian does not expose a public Graph View label-provider API. Context Titles supports Graph View and Local Graph through an isolated runtime adapter that touches Obsidian's internal graph renderer labels and restores normal labels when the plugin unloads or when graph labels are disabled. This may need maintenance if Obsidian changes Graph View internals.
Obsidian also does not expose a general public title-provider API for built-in display areas. Context Titles supports Graph View and Local Graph first because they are where duplicate note basenames are most confusing, and because their adapter can be isolated behind one setting with unload cleanup.
Context Titles does not rename files, modify notes, add frontmatter, or edit Canvas files.
| Display area | Clean public API? | DOM/internal patching required? | v0.3 decision |
|---|---|---|---|
| Graph View | No public label-provider API found. | Yes. Uses the internal graph renderer node list and Pixi text labels. | Supported through the experimental graph adapter. |
| Local Graph | No public label-provider API found. | Yes. Uses the same renderer family as Graph View. | Supported through the experimental graph adapter. |
| File Explorer | No public file-name display provider found. | Yes. Would require patching File Explorer DOM or internal tree items. | Delayed. Folder nesting already provides context, so the value is low. |
| Tabs/editor title/breadcrumbs | No public title override provider for built-in file views. | Yes. Would require patching view title methods or workspace DOM. | Delayed. Breadcrumbs already show folder context, and this previously created duplicated paths. |
| Built-in Quick Switcher | No public result-rendering hook found. | Yes. Would require patching modal internals. | Delayed. |
| Search | Search helper functions are public, but the built-in Search pane result labels are not exposed for replacement. | Yes. Would require patching core Search view DOM or internals. | Delayed. |
| Backlinks/Outgoing Links | No public result-label hook found. | Yes. Would require patching core plugin DOM or internals. | Delayed. |
| Canvas cards | Public .canvas data types exist, but no runtime display-title provider was found. |
Yes, or it would require modifying .canvas files, which this plugin must not do. |
Delayed. |
The Graph View adapter patches labels at runtime and restores the normal labels when the plugin unloads or when the graph-label setting is disabled.
The previous workspace title experiment was removed because it affected the normal note header/breadcrumb area, where folder context is already visible.
Those areas should wait for dedicated public APIs, a future Obsidian API addition, or a separate experimental adapter with a clear setting and unload cleanup.
Install dependencies:
npm install
Run tests:
npm test
Run lint:
npm run lint
Build the plugin:
npm run build
Start watch mode during development:
npm run dev
The build writes main.js in the project root.
Context Titles v0.3.5 requires Obsidian 1.0.0 or newer.
Do not develop or test plugins in your main vault. Use a separate Obsidian development vault.
npm run build..obsidian/plugins/context-titles/.main.js, manifest.json, and styles.css into that folder.For local development, the plugin folder name should match the manifest id: context-titles.
Create notes like these in a development vault:
Projects/Alpha/Overview.md
Projects/Beta/Overview.md
Projects/Alpha/Tasks.md
Templates/Overview.md
Main.md
Reference/Certificates/Sample.pdf
Then verify:
Show active context title shows Alpha - Overview for Projects/Alpha/Overview.md.Show active context title shows Beta - Overview for Projects/Beta/Overview.md.Show active context title shows Overview for Templates/Overview.md.Show active context title shows Main for Main.md.Refresh graph labels forces Graph View and Local Graph labels to rescan.Alpha - Tasks and Beta - Tasks.Achievements.Every visible graph file brings back the previous behavior where all visible graph files receive context.Include / exclude off and entering folder paths only affects those folder trees.Include / exclude on and entering folder paths skips those folder trees.Reset to defaults restores separator -, path mode Parent folder only, and the default folder scope.