I would like to find all the files in my vault that do not start with YAML headers: ---
I could not find a plugin that does what I need.
I read but could not understand various threads about using regex for vault-wide searches, and I could not adapt the regex examples to work as I need them to.
Is it possible with a plugin, core query, regex, or anything else to search all the files in the vault and find those that do not have YAML headers?
You’ve also got an option of using dataviewjs and scanning the metadataCache to see if there is a frontmatter section at the start of the cache.
Just wanted to mention it, although that would require a little more coding compared to just checking the size of file.frontmatter. There might also be a difference with regards to who illegal frontmatter is reported in the two alternatives.
Which leads to the most expensive version of actually scanning the first line of every file in the vault.
Many thanks. DataviewJS is way beyond what I can understand, but I appreciate the extra info. The solution provided works perfectly for my needs, so I will use that.