Custom metatags

Today you can add custom meta tags to the meta info at the top of a post or page and reference it later in the page or in a template using braces—e.g. {some-tag}

if the tag is NOT defined, then the reference just shows as-is in the rendered page/post. It would be nice if it was rendered as an empty string instead.

Additionally, it’d be nice if you could specify a default value in the configuration file for posts/pages that do not define the meta tag. If this is already possible, then please let me know how to do it in the config.

Cheers
Michael

1 Like

It’s funny you bring this up, because I actually “fixed” this a few days ago, but then realized that doing so broke a ton of other things, and I had to revert the change. It turns out that things like {foo} can be valid JS, and so there were some very valid scripts and content that people wanted to be in place being stripped out. Yikes!

The way I think I’m going to handle this is by letting you specify a list of tags that should receive the “remove if no data is present” treatment in your configuration. That way, you’ll be able to explicitly control what’s removed, which should prevent any mishaps. Aiming to get this in place within the next week or so — stay tuned!

1 Like