Skip to content

Error when building user guide with hugo 0.141.0 #2176

@deining

Description

@deining

When building docsy's user guide with latest released 0.141.0, an error is thrown:

Start building sites … 
hugo v0.141.0-e7bd51698e5c3778a86003018702b1a7dcb9559a+extended linux/amd64 BuildDate=2025-01-16T13:11:18Z VendorInfo=gohugoio

Built in 992 ms
Error: error building site: render: failed to render pages: render of "/home/andreas/docsy/userguide/content/en/docs/adding-content/diagrams-and-formulae/index.md" failed: "/home/andreas/docsy/layouts/docs/baseof.html:35:7": execute of template failed: template: docs/single.html:35:7: executing "docs/single.html" at <partial "scripts.html" .>: error calling partial: "/home/andreas/docsy/layouts/partials/scripts.html:73:4": execute of template failed: template: partials/scripts.html:73:4: executing "partials/scripts.html" at <partial "scripts/mermaid.html" .>: error calling partial: "/home/andreas/docsy/layouts/partials/scripts/mermaid.html:5:10": execute of template failed: template: partials/scripts/mermaid.html:5:10: executing "partials/scripts/mermaid.html" at <.Err>: can't evaluate field Err in type resource.Resource: Resource.Err was removed in Hugo v0.141.0 and replaced with a new try keyword, see https://gohugo.io/functions/go-template/try/

I will look into this and try to come up with a PR that fixes this issue shortly.
If we make use of the new try keyword as suggested, this will raise the minimum required version for docsy to 0.141.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions