frjo / hugo-theme-zen

A fast and clean Hugo base theme with css-grid and Hugo pipes support.
https://zen-demo.xdeb.org/
GNU General Public License v2.0
263 stars 74 forks source link

There are many errors when using hugo v0.127.0 #113

Open note4 opened 3 weeks ago

note4 commented 3 weeks ago

PS C:\hugo-mysite> hugo --cleanDestinationDir
>>
Start building sites … 
hugo v0.127.0-74e0f3bd63c51f3c7a0f07a7c779eec9e922957e+extended windows/amd64 BuildDate=2024-06-05T10:27:59Z VendorInfo=gohugoio

WARN  deprecated: .Site.GoogleAnalytics was deprecated in Hugo v0.120.0 and will be removed in a future release. Use .Site.Config.Services.GoogleAnalytics.ID instead.
ERROR render of "term" failed: "C:\hugo-mysite\themes\zen\layouts\_default\baseof.html:32:34": execute of template failed: template: _default/list.html:32:34: executing "_default/list.html" at <partial "menu.html" .>: error calling partial: "C:\hugo-mysite\themes\zen\layouts\partials\menu.html:15:78": execute of template failed: template: partials/menu.html:15:78: executing "partials/menu.html" at <.File.UniqueID>: error calling UniqueID: runtime error: invalid memory address or nil pointer dereference
Total in 2098 ms
Error: error building site: render: failed to render pages: render of "term" failed: "C:\hugo-mysite\themes\zen\layouts\_default\baseof.html:32:34": execute of template failed: template: _default/list.html:32:34: executing "_default/list.html" – File is nil; wrap it in if or with: {{ with partial "menu.html" .>: error calling partial: "C:\hugo-mysite\themes\zen\layouts\partials\menu.html:15:78": execute of template failed: template: partials/menu.html:15:78: executing "partials/menu.html" at <.File }}{{ .UniqueID }}{{ end }}
PS C:\hugo-mysite> hugo server --disableFastRender
>>
Watching for changes in C:\hugo-mysite\{archetypes,assets,content,data,i18n,layouts,static,themes}
Watching for config changes in C:\hugo-mysite\config.yml, C:\hugo-mysite\themes\zen\config.yaml
Start building sites …
hugo v0.127.0-74e0f3bd63c51f3c7a0f07a7c779eec9e922957e+extended windows/amd64 BuildDate=2024-06-05T10:27:59Z VendorInfo=gohugoio

WARN  deprecated: .Site.GoogleAnalytics was deprecated in Hugo v0.120.0 and will be removed in a future release. Use .Site.Config.Services.GoogleAnalytics.ID instead.
ERROR render of "section" failed: "C:\hugo-mysite\themes\zen\layouts\_default\baseof.html:32:34": execute of template failed: template: _default/list.html:32:34: executing "_default/list.html" at <partial "menu.html" .>: error calling partial: "C:\hugo-mysite\themes\zen\layouts\partials\menu.html:15:78": execute of template failed: template: partials/menu.html:15:78: executing "partials/menu.html" at <.File.UniqueID>: error calling UniqueID: runtime error: invalid memory address or nil pointer dereference
ERROR render of "term" failed: "C:\hugo-mysite\themes\zen\layouts\_default\baseof.html:32:34": execute of template failed: template: _default/list.html:32:34: executing "_default/list.html" at <partial "menu.html" .>: error calling partial: "C:\hugo-mysite\themes\zen\layouts\partials\menu.html:15:78": execute of template failed: template: partials/menu.html:15:78: executing "partials/menu.html" at <.File.UniqueID>: error calling UniqueID: runtime error: invalid memory address or nil pointer dereference
Built in 690 ms
Error: error building site: render: failed to render pages: render of "term" failed: "C:\hugo-mysite\themes\zen\layouts\_default\baseof.html:32:34": execute of template failed: template: _default/list.html:32:34: executing "_default/list.html" – File is nil; wrap it in if or with: {{ with partial "menu.html" .>: error calling partial: "C:\hugo-mysite\themes\zen\layouts\partials\menu.html:15:78": execute of template failed: template: partials/menu.html:15:78: executing "partials/menu.html" at <.File }}{{ .UniqueID }}{{ end }}
PS C:\hugo-mysite> ^C
PS C:\hugo-mysite> hugo --cleanDestinationDir
>>   
Start building sites … 
hugo v0.127.0-74e0f3bd63c51f3c7a0f07a7c779eec9e922957e+extended windows/amd64 BuildDate=2024-06-05T10:27:59Z VendorInfo=gohugoio

ERROR render of "section" failed: "C:\hugo-mysite\themes\zen\layouts\_default\baseof.html:32:34": execute of template failed: template: _default/list.html:32:34: executing "_default/list.html" at <partial "menu.html" .>: error calling partial: "C:\hugo-mysite\themes\zen\layouts\partials\menu.html:15:78": execute of template failed: template: partials/menu.html:15:78: executing "partials/menu.html" at <.File.UniqueID>: error calling UniqueID: runtime error: invalid memory address or nil pointer dereference
ERROR render of "page" failed: "C:\hugo-mysite\themes\zen\layouts\_default\baseof.html:32:34": execute of template failed: template: _default/single.html:32:34: executing "_default/single.html" at <partial "menu.html" .>: error calling partial: "C:\hugo-mysite\themes\zen\layouts\partials\menu.html:15:78": execute of template failed: template: partials/menu.html:15:78: executing "partials/menu.html" at <.File.UniqueID>: error calling UniqueID: runtime error: invalid memory address or nil pointer dereference
ERROR render of "term" failed: "C:\hugo-mysite\themes\zen\layouts\_default\baseof.html:32:34": execute of template failed: template: _default/list.html:32:34: executing "_default/list.html" at <partial "menu.html" .>: error calling partial: "C:\hugo-mysite\themes\zen\layouts\partials\menu.html:15:78": execute of template failed: template: partials/menu.html:15:78: executing "partials/menu.html" at <.File.UniqueID>: error calling UniqueID: runtime error: invalid memory address or nil pointer dereference
Total in 879 ms
Error: error building site: render: failed to render pages: render of "taxonomy" failed: "C:\hugo-mysite\themes\zen\layouts\_default\baseof.html:32:34": execute of template failed: template: _default/list.html:32:34: executing "_default/list.html" – File is nil; wrap it in if or with: {{ with partial "menu.html" .>: error calling partial: "C:\hugo-mysite\themes\zen\layouts\partials\menu.html:15:78": execute of template failed: template: partials/menu.html:15:78: executing "partials/menu.html" at <.File }}{{ .UniqueID }}{{ end }}
PS C:\hugo-mysite> hugo server --disableFastRender
>>
Watching for changes in C:\hugo-mysite\{archetypes,assets,content,data,i18n,layouts,static,themes}
Watching for config changes in C:\hugo-mysite\config.yml, C:\hugo-mysite\themes\zen\config.yaml
Start building sites …
hugo v0.127.0-74e0f3bd63c51f3c7a0f07a7c779eec9e922957e+extended windows/amd64 BuildDate=2024-06-05T10:27:59Z VendorInfo=gohugoio

ERROR render of "term" failed: "C:\hugo-mysite\themes\zen\layouts\_default\baseof.html:32:34": execute of template failed: template: _default/list.html:32:34: executing "_default/list.html" at <partial "menu.html" .>: error calling partial: "C:\hugo-mysite\themes\zen\layouts\partials\menu.html:15:78": execute of template failed: template: partials/menu.html:15:78: executing "partials/menu.html" at <.File.UniqueID>: error calling UniqueID: runtime error: invalid memory address or nil pointer dereference
ERROR render of "page" failed: "C:\hugo-mysite\themes\zen\layouts\_default\baseof.html:32:34": execute of template failed: template: _default/single.html:32:34: executing "_default/single.html" at <partial "menu.html" .>: error calling partial: "C:\hugo-mysite\themes\zen\layouts\partials\menu.html:15:78": execute of template failed: template: partials/menu.html:15:78: executing "partials/menu.html" at <.File.UniqueID>: error calling UniqueID: runtime error: invalid memory address or nil pointer dereference
Built in 688 ms
Error: error building site: render: failed to render pages: render of "section" failed: "C:\hugo-mysite\themes\zen\layouts\_default\baseof.html:32:34": execute of template failed: template: _default/list.html:32:34: executing "_default/list.html" – File is nil; wrap it in if or with: {{ with partial "menu.html" .>: error calling partial: "C:\hugo-mysite\themes\zen\layouts\partials\menu.html:15:78": execute of template failed: template: partials/menu.html:15:78: executing "partials/menu.html" at <.File }}{{ .UniqueID }}{{ end }}
frjo commented 3 weeks ago

Thanks for checking out the Zen theme.

Add some content, or a main menu, to your site and most of the errors will disappear. They come from trying to build an automatic menu in partials/menu.html. Never bothered to code around that. In a future version I might delete the code for automatic menu, I almost never use it for my own projects.

The only remaining warning is the one about .Site.GoogleAnalytics. I have a check to see if the new or old GoogleAnalytics conf is used. When I decide to make the min Hugo version supported >= v0.120.0 I will remove that code.