I added code to Frontmatter using Templater to ensure I put a title in. Because I am brain damaged.
It works, but it turned a lot of the matter red. What does that red mean? It is annoying and I can’t get rid of it.
Questions:
Is it a problem?
What do the colors mean?
Is the code written incorrectly even if it works?
Things I have tried
I’ve tried location. I have tried making it a field. I don’t know, that’s about it. I could split it into two templates, but do I want to execute two templates.
When viewing a template file you’re often not having a valid frontmatter, which is causing it to be red. So either you need to make it valid (which can be rather hard in some cases),or use a little bit of trickery.
The easiest way is to do this is to replace the first line with something like <% "---" %>, which in essence “disables” the frontmatter when viewed as a template file, but act normally after usage of the template.