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

Lazy load cover images in lists - breaks hugo server #1417

Closed krvpal closed 6 months ago

krvpal commented 7 months ago

Describe the bug

From commit 65c2720 - lazy load cover images in lists only - running hugo server leads to an error. Specifically, it throws an error while executing file "partials/cover.html" at line 4, with the message at <$.IsSingle>: invalid value; expected bool

In my config.yml, I have the following which has been working fine until this commit:

  cover:
    hidden: false # hide everywhere but not in structured data
    hiddenInList: false # hide on list pages and home
    hiddenInSingle: true # hide on single page
FULL ERROR message ```bash ERROR render of "term" failed: "/Users/hugosite/layouts/_default/list.html:77:6": execute of template failed: template: _default/list.html:77:6: executing "main" at : error calling partial: "/Users/hugosite/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 Built in 25 ms Error: error building site: render: failed to render pages: render of "section" failed: "/Users/hugosite/layouts/_default/list.html:77:6": execute of template failed: template: _default/list.html:77:6: executing "main" at : error calling partial: "/Users/hugosite/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 ```

Steps to reproduce the behavior:

Expected behavior: Server should run without error. Commits before 65c2720 works fine.

I'd really appreciate help to solve this bug. Thanks for the great theme!

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