halogenica / beautifulhugo

Theme for the Hugo static website generator
Other
1.13k stars 602 forks source link

Is this template compatible with hugo 0.93.x ? #423

Open ecow opened 2 years ago

ecow commented 2 years ago

It seems that the template provided by gitlab pages does not compile anymore with registry.gitlab.com/pages/hugo:latest . Last working release is hugo_0.92.2 . What are hugo requirements for this template?

edzob commented 2 years ago

I did notice the same thing with my gitlab pipeline that is using Hugo latest. Is there something we can do to help in resolving this?

edzob commented 2 years ago

Success: image: registry.gitlab.com/pages/hugo:0.92.2

Failed: image: registry.gitlab.com/pages/hugo:0.94.2

RoneoOrg commented 2 years ago

Hi all, could you please provide the build logs?

edzob commented 2 years ago

Here the logfiles from gitlab from a failed run Using docker image sha256:e1a336c59d3d6216d6f20b6a3cfeb01b11a23c30f3b2c12d07c580bad1b56c08 for registry.gitlab.com/pages/hugo:0.94.2 with digest registry.gitlab.com/pages/hugo@sha256:877bbefe661539dd9e5681dc67cc74f42e2fba4d014b8e69474ff4121cc97f48 ... $ hugo Start building sites … hugo v0.94.2-48FB9E4D linux/amd64 BuildDate=2022-03-12T10:28:42Z VendorInfo=gohugoio ERROR 2022/03/21 13:36:33 render of "page" failed: execute of template failed: template: _default/single.html:3:5: executing "_default/single.html" at <partial "head.html" .>: error calling partial: "/builds/edzob/edzob.gitlab.io/themes/beautifulhugo/layouts/partials/head.html:33:38": execute of template failed: template: partials/head.html:33:38: executing "partials/head.html" at <.URL>: can't evaluate field URL in type *hugolib.pageState ERROR 2022/03/21 13:36:33 render of "page" failed: execute of template failed: template: _default/single.html:3:5: executing "_default/single.html" at <partial "head.html" .>: error calling partial: "/builds/edzob/edzob.gitlab.io/themes/beautifulhugo/layouts/partials/head.html:33:38": execute of template failed: template: partials/head.html:33:38: executing "partials/head.html" at <.URL>: can't evaluate field URL in type *hugolib.pageState ERROR 2022/03/21 13:36:33 render of "page" failed: execute of template failed: template: _default/single.html:3:5: executing "_default/single.html" at <partial "head.html" .>: error calling partial: "/builds/edzob/edzob.gitlab.io/themes/beautifulhugo/layouts/partials/head.html:33:38": execute of template failed: template: partials/head.html:33:38: executing "partials/head.html" at <.URL>: can't evaluate field URL in type *hugolib.pageState ERROR 2022/03/21 13:36:33 render of "page" failed: execute of template failed: template: _default/single.html:3:5: executing "_default/single.html" at <partial "head.html" .>: error calling partial: "/builds/edzob/edzob.gitlab.io/themes/beautifulhugo/layouts/partials/head.html:33:38": execute of template failed: template: partials/head.html:33:38: executing "partials/head.html" at <.URL>: can't evaluate field URL in type *hugolib.pageState Error: Error building site: failed to render pages: render of "page" failed: execute of template failed: template: _default/single.html:3:5: executing "_default/single.html" at <partial "head.html" .>: error calling partial: "/builds/edzob/edzob.gitlab.io/themes/beautifulhugo/layouts/partials/head.html:33:38": execute of template failed: template: partials/head.html:33:38: executing "partials/head.html" at <.URL>: can't evaluate field URL in type *hugolib.pageState Total in 1[24](https://gitlab.com/edzob/edzob.gitlab.io/-/jobs/2229122654#L24) ms Cleaning up project directory and file based variables 00:01 ERROR: Job failed: exit code [25](https://gitlab.com/edzob/edzob.gitlab.io/-/jobs/2229122654#L25)5

stapelberg commented 2 years ago

I recently fixed a similar problem in my hugo site.

The solution was to replace “.URL” (which older hugo versions actually warn is deprecated) with “.Permalink” in my partials/head.html file.

edzob commented 2 years ago

I recently fixed a similar problem in my hugo site.

The solution was to replace “.URL” (which older hugo versions actually warn is deprecated) with “.Permalink” in my partials/head.html file.

@stapelberg - Is this something to include in the new versions of this template?

stapelberg commented 2 years ago

Not sure what to make of that question? Yes, it would be good to include the fix, I assume? But I’m not even using this template, so not sure why you’re asking me :)

edzob commented 2 years ago

Not sure what to make of that question? Yes, it would be good to include the fix, I assume? But I’m not even using this template, so not sure why you’re asking me :)

:) Ah. my question was based on many assumptions and not knowning how code-changes work in this repo (of beautifulhugo)