Skip to content

Instantly share code, notes, and snippets.

@exdeejay
Last active March 30, 2022 17:02
Show Gist options
  • Select an option

  • Save exdeejay/6fe8cfb7d4671538c61140686e696a51 to your computer and use it in GitHub Desktop.

Select an option

Save exdeejay/6fe8cfb7d4671538c61140686e696a51 to your computer and use it in GitHub Desktop.
Obsidian Dataview snippet - List all pages that aren't linked to in any other file
## Homeless Notes
*Notes that aren't linked to at all*
%% Copy the below text, including the ```, to use in your own file %%
%% Make sure to turn on "Enable Javascript Queries" in Dataview's settings! %%
```dataviewjs
// Lists all pages that aren't linked to in any other file.
// Fill `unlisted` with all the pages/directories
// you don't want to show up in this list
let unlisted = ['+Home', 'Daily', 'Templates', 'Archive']
dv.list(
dv.pages(unlisted.map(f => `!"${f}"`).join(' AND '))
.filter(f => f.file.inlinks.length == 0)
.sort(f => f.file.name, 'asc')
.map(f => f.file.link)
)
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment