kdevo / osprey-delight

Osprey Delight is the free-minded artist's choice for a clutter-free and blazingly fast single-page portfolio.
https://hugo-mods.github.io/
Apache License 2.0
95 stars 42 forks source link

Breaking change: author field #48

Open bluefander opened 9 months ago

bluefander commented 9 months ago

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/v5@v5.0.6/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/v5@v5.0.6/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/v5@v5.0.6/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/v5@v5.0.6/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/v5@v5.0.6/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/v5@v5.0.6/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 commented 9 months ago

Oops. Seems like the recent commits introduced an unwanted breaking change that requires manual intervention. Thanks for posting the error.

For now (as a quick fix), you can restructure the author param as follows:

From:

Params:
  author: "example"

To:

Params:
  author:
    name: "example"

Will implement a proper fix as soon as I have some free time. PR welcome.

bluefander commented 9 months ago

I see, thanks for the fix!