Closed
Description
How to reproduce
- Create a new site from scratch as described here.
- Create a new page inside the
docs
folder:hugo new content/docs/_index.md
- Run
hugo -D
and you will get this warning:
hugo v0.98.0-165d299cde259c8b801abadc6d3405a229e449f6+extended windows/amd64 BuildDate=2022-04-28T10:23:30Z VendorInfo=gohugoio
WARNING: calling IsSet with unsupported type "invalid" (<nil>) will always return false.
WARN 2022/05/09 09:57:25 .File.UniqueID on zero object. Wrap it in if or with: {{ with .File }}{{ .UniqueID }}{{ end }}
Using hugo --panicOnWarning
, you can track down where the error originates:
Error: Error building site: failed to render pages: render of "section" failed:
execute of template failed: template: docs/list.html:12:11:
executing "main" at <partial "section-index.html" .>
: error calling partial: "...\layouts\partials\section-index.html:7:17":
execute of template failed: template: partials/section-index.html:7:17
: executing "partials/section-index.html"
at <where $pages "Parent.File.UniqueID" "==" $parent.File.UniqueID>:
error calling where:
Warning trapped. Remove the --panicOnWarning flag to continue.
So the offending code line is here:
Metadata
Metadata
Assignees
Labels
No labels