Is there a way to exclude empty pages from simple queries? Ideally also excluding aliases?
I want to do something like:
{{query (and (not (page-property :page-type)) (page-file))}}
to find all pages without a page-type
property, but I don’t know what to put in the page-file
position.
Eh, I reverted to advanced queries, and this works and doesn’t require an explicit pages-without-files exclusion.
#+BEGIN_QUERY
{:title "pages with no page-type property"
:query [:find (pull ?p [*])
:where
[?p :block/name _]
[?p :block/properties ?prop]
(not [(get ?prop :page-type) _])
; (page-property ?p :page-type _)
]
}
#+END_QUERY
I guess this is good enough for now, but I’d still be interested in knowing if this is possible with simple queries.