open-neuromorphic / open-neuromorphic.github.io

Public website, hosted through GitHub pages.
https://open-neuromorphic.org
MIT License
13 stars 17 forks source link

Using latest stable Hugo version 0.123 seems to break build #172

Closed biphasic closed 7 months ago

biphasic commented 7 months ago

When I run npm run dev, which calls hugo server under the hood, everything works locally. That is, as long as I have Hugo v0.118.2 installed (as is specified in the Github actions build). I do get a warning saying

WARN  .File.Dir on zero object. Wrap it in if or with: {{ with .File }}{{ .Dir }}{{ end }}

but otherwise it builds.

Yesterday, a new stable version of Hugo was released, and my Snap package automatically updated to v0.123.2. When I try to build the website, I get the following error:

> hugoplate@1.7.7 dev
> hugo serve --buildFuture

Watching for changes in /home/gregorlenz/Development/open-neuromorphic.github.io/{assets,content,data,hugo_stats.json,i18n,package.json,postcss.config.js,static,tailwind.config.js,themes}
Watching for config changes in /home/gregorlenz/Development/open-neuromorphic.github.io/hugo.toml, /home/gregorlenz/Development/open-neuromorphic.github.io/config/_default, /home/gregorlenz/Development/open-neuromorphic.github.io/go.mod
Start building sites … 
hugo v0.123.2-929b91fe75cb0d041f22b4707700dfc117115ad4+extended linux/amd64 BuildDate=2024-02-22T15:27:15Z VendorInfo=snap:0.123.2

Built in 3655 ms
Error: error building site: render: failed to render pages: render of "404" failed: "/home/gregorlenz/Development/open-neuromorphic.github.io/themes/hugoplate/layouts/_default/baseof.html:9:7": execute of template failed: template: 404.html:9:7: executing "404.html" – File is nil; wrap it in if or with: {{ with partial "essentials/head.html" .>: error calling partial: "/home/gregorlenz/Development/open-neuromorphic.github.io/themes/hugoplate/layouts/partials/essentials/head.html:6:30": execute of template failed: template: partials/essentials/head.html:6:30: executing "partials/essentials/head.html" at <.File }}{{ .Dir }}{{ end }}

It seems to me that the warning generated with v0.118 now causes the build to break with v0.123. It would be great if the build worked with the latest stable Hugo version, which is v0.123. @neural-loop do you think you could take a look at this please?

neural-loop commented 7 months ago

I will look into this when I have a chance. As I changed this around, I had some other errors and it may be related to https://github.com/gohugoio/hugo/issues/11455 other breaking changes in the version differences. I don't see the issues in the other hugo site I work on so it should be some things that can be tracked down.

neural-loop commented 7 months ago

I think this is resolved now