Is there a way to get the current output format being used?
So I created a new output format, and I’m using it for pages belonging to a certain section (which, apparently I can’t really do, all pages now have this output format).
For this section, I created a new template specifically for the output format and that’s working well. There’s a small change I want to make in the header.html partial based on the output format. I could simple create a new template for the header, which I’m currently going to do, but it would be much easier to have a variable containing the current output format so that I may use an 'if block instead. I see that for Page variables, .AlternativeOutputFormats and .OutputFormats exists but doesn’t tell me which one is currently being rendered.
An Output Formats aware partial system - this way I can call {{ partial "header" . }} and if layouts/partials/header.format.html exists, it will use it, otherwise falls back to layouts/partials/header.html.
A Page variable `{{ .CurrentOutputFormat }} which would return the current output format being rendered.
I’m currently going down the route of seeing if I can combine .OutputFormats and .AlternativeOutputFormats. The latter seems to not include the current output format being rendered. So if can use Hugo/Go template functions to compare the two and find the one missing, then I know which format is currently being rendered.