Migration issues 0.21 -> 0.37: .Site.Sections doens't work as expected

First and foremost, I’ve tried to read about 0.32 here https://gohugo.io/about/new-in-032/ and browsed the discussions but couldn’t figure out what I’m doing wrong.

I have a lot of index.md files that generate errors that go away after renaming them to _index.md. (The relrefs gave an error)
But in a section file, I do something like this:

{{ range $name, $el := .Site.Sections }}
name is {{ $name }}

And $name is not the name anymore, but simply “0” or “1”. I got that from https://discuss.gohugo.io/t/menu-structure-with-full-menu-tree-or-drop-downs/1953/6
I can’t seem to find anything “new” or breaking in the newer versions regarding .Site.Sections - it’s difficult to have an overview when migrating.

Do I need to do something with .Resource instead of .Site.Sections?
Thanks for any help!

The .Resources API introduced in Hugo 0.32 was improved and changed a bit in subsequent versions. See the updated documentation at: https://gohugo.io/content-management/page-resources/#readout

Regarding your Sections issue, I haven’t come across this problem myself. It would help if you could share the source of your Hugo project for others to see what’s going on.

Yes of course I forgot to add the link everything is on github:

This is the page that doesn’t render the posts-list anymore, starting from linenr 39

Nobody? :frowning: