Skip to content

Find files that are missing required meta data, like a category tag or a meta data field that should have a value

List all files with missing category tag

Basic

Look for missing category tags

LIST
FROM "10 Example Data/books"
WHERE !contains(file.tags, "#type/")

Look for empty, but required meta data

LIST
FROM "10 Example Data/books"
WHERE !author

Variants

Check for empty meta data fields that are lists

Use case

This is handy when you prefill your yaml frontmatter, i.e. via a template, with something like
genres: -

`genres` is _not_ empty in this case and won't be found via `WHERE !genres`
LIST
FROM "10 Example Data/books"
WHERE !genres OR (length(genres) = 1 AND contains(genres, null))