adityatelange / hugo-PaperMod

A fast, clean, responsive Hugo theme.
https://adityatelange.github.io/hugo-PaperMod/
MIT License
9.53k stars 2.58k forks source link

[BUG] Render of "page" failed: #1430

Closed trashcatt closed 6 months ago

trashcatt commented 6 months ago

Describe the bug

Steps to reproduce the behavior:

The ERROR Start building sites … hugo v0.122.0 linux/amd64 BuildDate=unknown ERROR render of "page" failed: "/builds/sm0ggles/sm0ggles.gitlab.io/layouts/_default/single.html:25:6": execute of template failed: template: _default/single.html:25:6: executing "main" at <partial "cover.html" (dict "cxt" . "IsHome" false "isHidden" $isHidden)>: error calling partial: "/builds/sm0ggles/sm0ggles.gitlab.io/themes/PaperMod/layouts/partials/cover.html:4:22": execute of template failed: template: partials/cover.html:4:22: executing "partials/cover.html" at <$.IsSingle>: invalid value; expected bool Total in 363 ms Error: error building site: render: failed to render pages: render of "page" failed: "/builds/sm0ggles/sm0ggles.gitlab.io/layouts/_default/single.html:25:6": execute of template failed: template: _default/single.html:25:6: executing "main" at <partial "cover.html" (dict "cxt" . "IsHome" false "isHidden" $isHidden)>: error calling partial: "/builds/sm0ggles/sm0ggles.gitlab.io/themes/PaperMod/layouts/partials/cover.html:4:22": execute of template failed: template: partials/cover.html:4:22: executing "partials/cover.html" at <$.IsSingle>: invalid value; expected bool Cleaning up project directory and file based variables 00:00 ERROR: Job failed: exit code 1

Expected behavior:

For it to build correctly Repo/Source where this issue can be reproduced: This repo isn't setup to build hugo but I needed to move the code to a public repo

https://gitlab.com/trashcatt/blog Screenshots

Additional context

adityatelange commented 6 months ago

Can't reproduce. You might have made any custom changes to theme pull from upstream. https://github.com/adityatelange/hugo-PaperMod/commit/b288ede80cbd70151e2f07f2e09ad6258e64f7fa

thomjiji commented 2 months ago

Same issue. I change the line 4 in themes/PaperMod/layouts/partials/cover.html from:

{{- $loading := cond $.IsSingle "eager" "lazy" }}

to

{{- $loading := cond (eq $.IsSingle true) "eager" "lazy" }}

Then it can render as normal.