Closed davidsneighbour closed 2 months ago
See https://discourse.gohugo.io/t/drafts-vs-undefined-values/51219
HUGOLately — this is not pinnable to a version number, it just stopped working, after August 12th — I am unable to use hugo server -D due to type casting errors: hugo server: ❯ hugo server Watching for changes in /home/patrick/github.com/davidsneighbour/kollitsch.dev/{archetypes,assets,content,data,documentation,i18n,layouts,package.json,postcss.tailwind.config.js,static,tailwind.config.js} Watching for config changes in /home/patrick/github.com/davidsneighbour/kollitsch.dev/config/_default, /home...
Lately --- this is not pinnable to a version number, it just stopped working, after August 12th --- I am unable to use
hugo server -D
due to type casting errors:hugo server
:hugo server -D
:The template in question is this:
and it worked before, I am pretty sure.
The only thing that changed is the version of Golang in my system (installed via Snap).
Could it be that something changed with the way Hugo works with typecasting? I can change the template by wrapping it with
{{ with . }}
, but then another template error takes over, this time complaining about another undefined value.I tried to minimize the frontmatter of the draft post, to no change. As soon as I have any post with
draft: true
in it's frontmatterhugo server -D
gives up.Basically trying to use drafts results in my install having issues with undefined values that did not exist before.