Skip to content

Add .OutputFormat to the page object #9368

@regisphilibert

Description

@regisphilibert

There is at the moment no built-in solution to simply retrieve the current output format object of a given "page" or template.

Currently user has to compare .AlternateOutputFormats with a list of defined outputs and isolate the missing one. I understand the complexity as output formats are sharing the same content file, but if we have .AlternateOuputFormats, I suppose we are able to retrieve the current one?

{{ if eq .OutputFormat.Name "debug_data" }}
{{ <meta name="robots" content="noindex"> }}
{{ end }}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions