Ways - How to find Broken Front Matter in Jekyll Posts

Occasionally I discover I have created some blog posts with the incorrect or missing front matter. This bash script searches through all my _posts/ including my subfolders (one per year) and writes the path to a file. I can then go file by file and check for issues, in this code snippet I am looking for missing layout keys. This results in the plain text being shown in the browser. for f in…