Why did the Strange Case Theme break in Hugo 0.53?

The Strange Case Theme according to the Netlify deploy logs had its demo generated on the Hugo Themes website up until Hugo 0.52. Since the Themes repo was upgraded to 0.53 there is the following ERROR:

Error building site: failed to render pages: render of "page" failed: "/opt/build/repo/strange-case/layouts/_default/single.html:16:80": execute of template failed: template: _default/single.html:16:80: executing "_default/single.html" at <.Site.Params.datefor...>: invalid value; expected string

In the template under /layouts/_default/single.html this theme has the following: {{ .Date.Format .Site.Params.DateFormat }}.

Also this theme (which is a bit old) has no Example Site and instead it uses the Hugo Basic Example for its demo.

I tested it locally with an Example Site and I simply entered the following in config.toml:

dateformat = "Jan 2, 2006"

It seems that simply entering the missing dateformat parameter fixes the ERROR and the demo is once again generated, but I cannot figure out what changed in Hugo 0.53 (from the Release Notes) and why the above parameter is now required when before it wasn’t.

Also I’m not sure whether this is related to https://github.com/BurntSushi/toml/issues/237

Any pointers will be appreciated because I want to contact the theme author about the broken demo on the Hugo website.


cc: @digitalcraftsman @bep

It was a bug fix. It was even more broken before 0.53.

1 Like

Ok thank you for the reply. I will let the theme author know.