Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Breaking change (Hugo >v0.120.0): author field #48

Open
bluefander opened this issue Dec 14, 2023 · 2 comments
Open

Breaking change (Hugo >v0.120.0): author field #48

bluefander opened this issue Dec 14, 2023 · 2 comments

Comments

@bluefander
Copy link

Hi all!

I am getting this error:

`hugo server
Watching for changes in /home/stefan/bla/{archetypes,assets,content,data,layouts,static}
Watching for config changes in /home/stefan/bla/config.yaml, /home/stefan/bla/go.mod
Start building sites …
hugo v0.120.1+extended linux/amd64 BuildDate=unknown

ERROR render of "page" failed: "/home/stefan/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/kdevo/osprey-delight/[email protected]/layouts/_default/single.html:6:5": execute of template failed: template: _default/single.html:6:5: executing "_default/single.html" at <partial "head.html" .>: error calling partial: "/home/stefan/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/kdevo/osprey-delight/[email protected]/layouts/partials/head.html:29:36": execute of template failed: template: partials/head.html:29:36: executing "partials/head.html" at : can't evaluate field name in type string
ERROR render of "home" failed: "/home/stefan/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/kdevo/osprey-delight/[email protected]/layouts/index.html:3:5": execute of template failed: template: index.html:3:5: executing "index.html" at <partial "head.html" .>: error calling partial: "/home/stefan/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/kdevo/osprey-delight/[email protected]/layouts/partials/head.html:29:36": execute of template failed: template: partials/head.html:29:36: executing "partials/head.html" at : can't evaluate field name in type string
Built in 126 ms
Error: error building site: render: failed to render pages: render of "page" failed: "/home/stefan/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/kdevo/osprey-delight/[email protected]/layouts/_default/single.html:6:5": execute of template failed: template: _default/single.html:6:5: executing "_default/single.html" at <partial "head.html" .>: error calling partial: "/home/stefan/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/kdevo/osprey-delight/[email protected]/layouts/partials/head.html:29:36": execute of template failed: template: partials/head.html:29:36: executing "partials/head.html" at : can't evaluate field name in type string
`

Any ideas what I am doing wrong?
Thanks!

@kdevo
Copy link
Owner

kdevo commented Dec 16, 2023

Important

Pinning this issue. The following is actually required for Hugo >v0.120.0.

As a fix, users can restructure the author param as follows:

From:

Params:
  author: "example"

To:

Params:
  author:
    name: "example"

@kdevo kdevo changed the title ERROR render of "page" failed Breaking change: author field Dec 16, 2023
@kdevo kdevo added bug Something isn't working compatibility labels Dec 16, 2023
@bluefander
Copy link
Author

I see, thanks for the fix!

kdevo added a commit that referenced this issue Jan 17, 2025
after bumping to Hugo v0.120.0, the old field is deprecated anyway. Relates to #48.
@kdevo kdevo pinned this issue Jan 17, 2025
@kdevo kdevo removed the bug Something isn't working label Jan 17, 2025
@kdevo kdevo changed the title Breaking change: author field Breaking change (Hugo >v0.120.0): author field Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants