Skip to content

Build fails with Hugo v0.156.0 — .Author removed from site object #1149

@major

Description

@major

Issue description

Hugo v0.156.0 removed the deprecated .Site.Author field entirely. This causes a hard build failure in warnings.html at line 10, where .Author is checked to warn about the old author config location.

The irony is that the warning about migrating away from .Author now itself breaks the build because .Author no longer exists.

Reproduction:

  1. Use Congo v2.13.0 with Hugo v0.156.0
  2. Run hugo --minify
  3. Build fails

Fix: Remove or guard the .Author check on line 10 of layouts/_partials/functions/warnings.html. The simplest fix is to delete lines 10-12 since anyone still on the old config would have hit this warning long ago, and the field no longer exists to check against.

Theme version

v2.13.0

Hugo version

hugo v0.156.0+extended linux/amd64

Hugo output or build error messages

ERROR error building site: render: failed to render pages: render of "/categories" failed:
  "themes/congo/layouts/baseof.html:1:4": execute of template failed:
  template: taxonomy.html:1:4: executing "taxonomy.html" at
  <partial "functions/warnings.html" .Site>: error calling partial:
  "themes/congo/layouts/_partials/functions/warnings.html:10:6":
  execute of template failed: at <.Author>: can't evaluate field Author
  in type *page.siteWrapper

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions