Folder Indexes With Obsidian and Dataview
Using the excellent Dataview Obsidian plugin, inserting this snippet (below) into the note will create a table listing:
- all notes in the same folder as the note, and in all sub-folders, recursively
- all notes which link to the note
- all notes linked to by the note
Particularly when used in a "folder note" (a note which serves as the key note in any given folder), this is a simple way to create a kind of "section index" for that part of the folder hierarchy.
```dataview
TABLE rows.file.link AS Pages
WHERE
contains(file.folder, this.file.folder)
OR contains(file.inlinks, this.file.link)
OR contains(file.outlinks, this.file.link)
AND file != this.file
GROUP BY file.folder AS Folder
```
If you would like to leave a comment - or read other comments - please go to this Mastodon post.