Skip to content

config/allconfig: Improve resilience of hugo mod init #15253

Description

@jmooring

If the project configuration references output formats defined by an imported module, hugo mod init fails before it can do its job. For example:

ERROR failed to create config: unknown output format "print" for kind "section"

The module that defines the output format can't be loaded until the project is initialized, so the command should tolerate unknown output formats rather than refusing to run. Same applies to defaultOutputFormat.

Reference: https://discourse.gohugo.io/t/57512

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions