Code on in layouts/tags/baseof.html and layouts/tags/list.html only runs after hugo server when --disableFastRender flag is added.
Essentially the categories and tags layouts declare a block in the baseof.html then define it in their respective list.html at layouts/tags/list.html (and the equivalent for categories).
Those blocks don’t exist in the default layouts/_default/baseof.html and layouts/_default/list.html
The code processes and adds an image to the inline background styling for the body tag.
It’s not complicated code. The partial checks for an image name in frontmatter, then processes it and inserts it.
While the website builds properly to public, so that it deploys correctly. When using Hugo server, either the tags page or the categories page gets the taxonomy specific code (a background image). The other taxonomy page seems to use the layouts/_default/baseof.html and layouts/_default/list.html.
I’ve emptied _gen and rebuilt, but the server problem persists. Only adding --disableFastRender flag gets hugo server to respect the code in layouts/categories and layouts/tags templates consistently.
Could this behavior be related to a configuration setting?
There is a little code that calls path.Dir, which might be the source for the zero object. I removed the IsSet calls awhile ago. Searched recently and haven’t found any.
WARN 2023/03/18 20:23:49 .File.Dir on zero object. Wrap it in if or with: {{ with .File }}{{ .Dir }}{{ end }}
WARNING: calling IsSet with unsupported type "invalid" (<nil>) will always return false.
The third warning when --printPathWarnings is invoked returns the following:
WARN 2023/03/18 20:23:57 Duplicate target paths: \categories\index.html (2), \categories\index.xml (2), \categories\science\index.html (2), \tags\index.html (2), \tags\index.xml (2), \tags\science\index.html (2)
Total in 8172 ms
I see now there are two content directories, off the root taxonomy nodes, with index.md files, categories/science/index.md and tags/science/index.md.
They had referenced images, but serve no function in this build and can be removed.