After updating Hugo from 0.95 to 0.125 I get an error and I am clueless about the reason.
How can I address this issue?
Start building sites …
hugo v0.125.3-474c4c02212cf97712c6fbf4159c68822ea6e078+extended linux/amd64 BuildDate=2024-04-22T17:18:35Z VendorInfo=gohugoio
INFO static: removing all files from destination that don't exist in static dirs
INFO static: syncing static files to / duration 15.252404ms
INFO build: step process substep collect files 1414 files_total 1414 duration 69.357788ms
INFO build: step process duration 69.408412ms
INFO build: step assemble duration 27.512643ms
INFO build: step render pages 758 content 755 duration 8.021755044s
INFO build: step postProcess duration 11.802µs
INFO build: duration 8.118929724s
Total in 8145 ms
Error: error building site: render: failed to render pages: render of "section" failed: "/home/runner/work/cplace-doc-ops/cplace-doc-ops/themes/cplace/layouts/space/list.html:93:94": execute of template failed: template: space/list.html:93:94: executing "main" at <.File.ContentBaseName>: can't evaluate field File in type *source.File
[13:44:55]
[13:44:55] 'hugo' errored after 8.21 s
[13:44:55] Error: Command failed: HUGO_ENV=production; hugo --cleanDestinationDir --printPathWarnings -v
This is the relevant part of list.html:
{{- $sub_sections_pages := (union .Pages .Sections) -}}
{{ if gt (len $sub_sections_pages) 0 -}}
<div class="chapter-list">
<ol class="list-unstyled mb-0">
{{- range $sub_sections_pages.ByWeight }}
<li>
<a href="{{- .RelPermalink -}}">
{{- if .Title -}}
{{- .Title -}}
{{- else -}}
{{ with .File }}{{- humanize .ContentBaseName -}}{{ end }}
{{- end -}}
</a>