Little hack for frontmatter and templater

I came up with this simple hack to prevent templates that have frontmatter from being processed as frontmatter.

For example, I don’t want to see templates in the result of some dataview query :smile:.

More info:

7 Likes

Neat, thanks for sharing! I think we can also use your <%"ThingToEscapeInTheTemplate"%> trick to interrupt other Markdown in templates, for example surrounding ONE of the starting brackets of a Wikilink with the template tag and quotes removes the link from the local graph of the template file. (This is useful if the link target is computed by the template - I did not need a lot of file.date math in my local graph!)

I’ve been looking into using the same trick to essentially disable code-fences inside a template’s Live Preview or Reading modes and display the actual code rather than trying to execute it on the unresolved Templater statements, but I am not sure it are the right solution there.
Edit: Remove unwanted space.

1 Like