Custom handling of specific YAML keys

See my reply here for a little more details on why this is hard:

To summarise, the tags and aliases have dedicated classes which make them targetable by CSS. The other don’t, and could to some extent be targetted by applying stuff like nth-child(). This however requires a very strict usage of order in the frontmatter, which is hard to do consistently.

I’ve seen some custom classes plugins, but I don’t think they’re applicable to the frontmatter. So I reckon you’d have to turn to some plugin, which could parse the frontmatter, and then add classes similar to the tags and aliases classes. I’ve not seen this plugin so far.

Another option could be to move stuff out of your frontmatter into inline fields, which has is pros and cons. One of the pros is that the fields themselves are then tagged with more classes than they’re in the frontmatter. But I’m not sure if that is a viable/wanted solution for you.

1 Like