building failure about `mastodon.html`
zwyyy456 opened this issue · comments
Describe the problem:
Today, I update the hugo-coder theme and then run hugo serve
, then I meet building failure.
My last hugo-coder theme is c340320a
, it works well, and there is nomastodon.html
in that version.
the log is as follows:
❯ hugo serve
Watching for changes in /Users/zwyyy/code/blog/coder_blogs/{archetypes,assets,content,data,i18n,layouts,static,themes}
Watching for config changes in /Users/zwyyy/code/blog/coder_blogs/config.toml, /Users/zwyyy/code/blog/coder_blogs/themes/coder/config.toml
Start building sites …
hugo v0.124.1-db083b05f16c945fec04f745f0ca8640560cf1ec+extended darwin/arm64 BuildDate=2024-03-20T11:40:10Z VendorInfo=brew
ERROR render of "page" failed: "/Users/zwyyy/code/blog/coder_blogs/themes/coder/layouts/posts/single.html:48:11": execute of template failed: template: posts/single.html:48:11: executing "content" at <partial "posts/mastodon.html" .>: error calling partial: "/Users/zwyyy/code/blog/coder_blogs/themes/coder/layouts/partials/posts/mastodon.html:4:91": execute of template failed: template: partials/posts/mastodon.html:4:91: executing "partials/posts/mastodon.html" at <.host>: can't evaluate field host in type bool
Built in 504 ms
Error: error building site: render: failed to render pages: render of "page" failed: "/Users/zwyyy/code/blog/coder_blogs/themes/coder/layouts/posts/single.html:48:11": execute of template failed: template: posts/single.html:48:11: executing "content" at <partial "posts/mastodon.html" .>: error calling partial: "/Users/zwyyy/code/blog/coder_blogs/themes/coder/layouts/partials/posts/mastodon.html:4:91": execute of template failed: template: partials/posts/mastodon.html:4:91: executing "partials/posts/mastodon.html" at <.host>: can't evaluate field host in type bool
it seems that commits 60fdc75
cause the building failure.
same issue, hugo v0.128.0+extended linux/amd64
update: in my case, same errore
Error: error building site: render: failed to render pages: render of "page" failed: "/home/halon/code/quickstart/themes/hugo-coder/layouts/posts/single.html:48:11": execute of template failed: template: posts/single.html:48:11: executing "content" at <partial "posts/mastodon.html" .>: error calling partial: "/home/halon/code/quickstart/themes/hugo-coder/layouts/partials/posts/mastodon.html:4:91": execute of template failed: template: partials/posts/mastodon.html:4:91: executing "partials/posts/mastodon.html" at <.host>: can't evaluate field host in type bool
It comes from the presence of the comments: true
key in the header of some posts. Removing this key eliminates the error.