Panic Error with .GetPage in Hugo 0.45

The underlying GetPage is returning nil. It’s always a good idea to with that first call and not chain the next func unconditionally.

Try:

{{ with .Site.GetPage (printf "/%s" .Section) }}
    {{ $sections := .Sections.ByWeight }}
    ..
{{ end }}
1 Like