.Type is blank in _index.md since v0.63


I hope this topic has not been discussed already, I did do my homework but didn’t find it.

I have this in header.html : <div class="{{ .Type }}-heading">
In hugo v0.55.3 it rendered like this : <div class="page-heading">
In hugo v0.63.0 it now renders like this : <div class="-heading">

So “.Type” seems to be empty. In other pages or posts the behavior is OK.

I did a bisect on the hugo repo, the culprit is this commit : https://github.com/gohugoio/hugo/commit/c6d650c8c8b22fdc7ddedc1e42a3ca698e1390d6

Is this a bug, or is it normal ? I’ve read the release notes and didn’t find anything. Thanks for any thoughts or help.

-> hugo env
Hugo Static Site Generator v0.63.0-DEV linux/amd64 BuildDate: unknown

I’m sorry for bothering… It’s been fixed already in v0.64.0 : https://github.com/gohugoio/hugo/commit/e8831a056b5664c3a066b9a9c4c618d1f483b10c and https://github.com/gohugoio/hugo/issues/6805

As I was writing, I did an upgrade in the background and the hugo from the arch repository upgraded to 0.64, and the issue is gone. Fastest thread ever :slight_smile:

1 Like