Global snippets with page specific markup

I’m curious how you all lovely people would tackle something like this!

I’ve got a “global” snippet that I aim to use for each of the page headers into which I pass whatever title I want to display, such as:

<?php snippet('global/page.header', ['title' => $page->title()]) ?>

The above works perfectly. Now I’m tinkering with adding a subtitle/tagline/thing but the markup for that would depend on the template.

<?php snippet('global/page.header', ['title' => $page->title()], 'subtitle' => $someVariable) ?>

As an example, for blogposts specifically I’d like to output a time element and fill the datetime attribute as well as a formatted displayed date, i.e:

<time datetime="2020">2020-01-01</time>

And as another example, on other pages it would simple be a p tag or similar:

<p>Some cool text</p>

What would be the best approach here? If statements in the page.header snippet?

The site I’m building is very simple and straight forward and the easiest way would probably be to omit the snippet and just build the header manually for the blogposts in this case. But I’m curious how you would approach and solve something this!

If it’s just one variation, I’d use an if statement or otherwise use snippets inside the header that are called via a field value.