Not sure if this is helpful to anybody else but here’s a solution for something I expected to be easy but was actually quite hard.
Imagine you have a blog where posts have different tags. You want the hero (header) for the tag list pages to be unique. For example you want to control the hero (heading) for this page:
I could not find a way to access the custom metadata in /content/tags/tag_X/
Otherwise it would have been easy - i could just have set heroTitle: “whatever”
So in stead I had to create headless content and then use if statements in the tags layout to decide when to use it…