folder-note
The folder-note concept: which note, if any, is the one whose properties describe a FOLDER itself.
Obsidian has no such concept — it is a convention the community settled on, and the plugin that owns it for most vaults is folder-notes. So the answer to “which note belongs to this folder” is that plugin’s to give whenever it is installed, and this module asks it rather than inventing a second answer: FolderNoteLocation.Auto — the default — reads its live configuration at every use.
Reading it live rather than copying its values into a consumer’s own settings is deliberate: a copy goes stale the moment that plugin is reconfigured, and it would need a settings migration to seed. Everything else is the caller’s explicit choice, and then the other plugin is not consulted at all.
The other folder-note plugins (Folder Note, Waypoint, Folder Index) are read the same way, each through an * ThirdPartyPluginAdapter whose API is its verified live settings, and [resolveFolderNotePluginConfigs](/obsidian-lib/api/folder-note/resolveFolderNotePluginConfigs/)n * collects the setups of every enabled one.
Nothing here ever CREATES a note. A folder with no folder note answers null, which is what lets a caller layer folder-note behavior onto a click without risking a file appearing on the user’s disk.
Interfaces
Section titled “Interfaces”| Interface | Description |
|---|---|
| FolderIndexPluginSettings | The settings of the Folder Index plugin (obsidian-folder-index), narrowed to what names its index note. Read from its 1.0.30. |
| FolderNoteConfig | A folder-note setup with FolderNoteLocation.Auto already resolved to a concrete answer. |
| FolderNotePluginSettings | The settings of the Folder Note plugin (folder-note-plugin), narrowed to what places and names its folder note. Read from its 0.7.3. |
| FolderNotesPluginSettings | The settings of the Folder notes plugin (folder-notes), narrowed to what places, names and hides its folder note. Read from its 1.8.26. |
| GetFolderNoteFolderParams | Parameters for getFolderNoteFolder. |
| ResolveFolderNoteConfigParams | Parameters for resolveFolderNoteConfig. |
| ResolveFolderNoteParams | Parameters for resolveFolderNote. |
| ResolveFolderNotePluginConfigsParams | Parameters for resolveFolderNotePluginConfigs. |
| WaypointPluginSettings | The settings of the Waypoint plugin (waypoint), narrowed to what places and names its folder note. Read from its 3.0.1. |
Functions
Section titled “Functions”| Function | Description |
|---|---|
| getFolderIndexFolderNoteConfig | Maps Folder Index’s settings onto a folder-note setup: the index note sits inside its folder, named FolderIndexPluginSettings.indexFilename when the user specified one, otherwise after the folder. |
| getFolderNoteFolder | Finds the folder a file is the folder note of — the inverse of resolveFolderNote. The answer is checked through resolveFolderNote itself, so the two can never disagree: a file is a folder’s note exactly when resolving that folder’s note yields this very file. A file that does not exist in the vault (one built for a path with nothing at it) is never a folder note. |
| getFolderNotePluginFolderNoteConfig | Maps Folder Note’s settings onto a folder-note setup. |
| getFolderNotesPluginFolderNoteConfig | Maps Folder notes’ settings onto a folder-note setup — the mapping FolderNoteLocation.Auto uses. |
| getWaypointFolderNoteConfig | Maps Waypoint’s settings onto a folder-note setup. |
| resolveFolderNote | Finds a folder’s folder note — the one note whose properties describe the folder itself. Never creates. A folder that has no folder note answers null, and so does the vault root under FolderNoteLocation.ParentFolder (nothing can sit beside it). |
| resolveFolderNoteConfig | Resolves FolderNoteLocation.Auto into a concrete folder-note setup. folder-notes’ vaultFolder storage (every folder note pooled in one central folder) has no counterpart here and falls back rather than guessing: with the notes pooled, the note belonging to a folder is no longer derivable from that folder’s path alone. |
| resolveFolderNotePluginConfigs | Resolves the folder-note setup of every ENABLED folder-note plugin this library recognizes, so every consumer reads their conventions the same way: Folder notes, Folder Note, Waypoint and Folder Index, in the order of their downloads. A plugin whose settings are not a shape its adapter recognizes, and a Folder notes set to a storage location with no counterpart here, contribute nothing. The settings are read on every call, so a plugin reconfigured, enabled or disabled is followed at once. |
| Enum | Description |
|---|---|
| FolderNoteLocation | Where a folder’s folder note lives. The three concrete members are the shapes the folder-note ecosystem actually uses: charlie/charlie.md and charlie/index.md are both FolderNoteLocation.InsideFolder (they differ only in the NAME, which is why naming is a callback and not a fourth member), while charlie.md beside the folder is FolderNoteLocation.ParentFolder — whose whole point is that [[alpha/bravo/charlie]] links to a folder with no special syntax. |
Variables
Section titled “Variables”| Variable | Description |
|---|---|
| FOLDER_INDEX_PLUGIN_ADAPTER | The ThirdPartyPluginAdapter of Folder Index. Its API is the plugin’s LIVE settings object, verified as FolderIndexPluginSettings. |
| FOLDER_INDEX_PLUGIN_ID | The Folder Index plugin’s id, as its manifest declares it. |
| FOLDER_NOTE_PLUGIN_ADAPTER | The ThirdPartyPluginAdapter of Folder Note. Its API is the plugin’s LIVE settings object, verified as FolderNotePluginSettings. |
| FOLDER_NOTE_PLUGIN_ID | The Folder Note plugin’s id, as its manifest declares it. |
| FOLDER_NOTES_PLUGIN_ADAPTER | The ThirdPartyPluginAdapter of Folder notes. Its API is the plugin’s LIVE settings object, verified as FolderNotesPluginSettings, so a reconfiguration is read at once. |
| FOLDER_NOTES_PLUGIN_ID | The folder-notes plugin’s id, as its manifest declares it. |
| WAYPOINT_PLUGIN_ADAPTER | The ThirdPartyPluginAdapter of Waypoint. Its API is the plugin’s LIVE settings object, verified as WaypointPluginSettings. |
| WAYPOINT_PLUGIN_ID | The Waypoint plugin’s id, as its manifest declares it. |