List all pages with only dangling outlinks

Things I have tried

Found dv.app.metadataCache.unresolvedLinks - seems like I should be able to use this to check for them.

What I’m trying to do

I’d like to list all pages that have only dangling outlinks, preferably in a table looking something like:

| File        | Dangling links                                          |
|------------ | ------------------------------------------------------- |
| File1       | [[Dev/Link1|Link1]] [[Link2]] [[Personal/Link3|Link3]]  |

Note I don't want pages that have a valid link on them - only if all the links are invalid. Basically I'm looking for "dangling pages".

OK, so the last comment ended up in the codeblock by accident, so just to clarify so it’s readable.

Well, in case anybody is interested, I did this without JS in the end :slight_smile:

MIght be nice to fold the non-existing outlinks into a list that can displatý on one line in a column, but this will do me for now :slight_smile:

  TABLE WITHOUT ID file.link AS "File"
FLATTEN file.outlinks as Outlink
  WHERE !Outlink.file
    AND !startswith(file.path, "_templates/") 
  GROUP BY file

OK, I take that back - this is all pages with dangling links, not only dangling links. I need a way to compare the length of the lists I think …