beautifulhugo icon indicating copy to clipboard operation
beautifulhugo copied to clipboard

Is this template compatible with hugo 0.93.x ?

Open ecow opened this issue 3 years ago • 8 comments

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?

ecow avatar Mar 18 '22 15:03 ecow

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 avatar Mar 21 '22 13:03 edzob

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

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

edzob avatar Mar 21 '22 13:03 edzob

Hi all, could you please provide the build logs?

RoneoOrg avatar Mar 22 '22 08:03 RoneoOrg

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

edzob avatar Mar 22 '22 13:03 edzob

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 avatar Apr 17 '22 20:04 stapelberg

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?

edzob avatar May 09 '22 10:05 edzob

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 :)

stapelberg avatar May 09 '22 11:05 stapelberg

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)

edzob avatar May 09 '22 11:05 edzob