neoforged / websites

Official website for NeoForged
https://neoforged.net
Creative Commons Attribution 4.0 International
4 stars 16 forks source link

Fails to build with Hugo 0.125.3 #33

Closed sciwhiz12 closed 1 month ago

sciwhiz12 commented 2 months ago

The website fails to build with Hugo v0.125.3 with the following output:

Start building sites …
hugo v0.125.3-474c4c02212cf97712c6fbf4159c68822ea6e078+extended windows/amd64 BuildDate=2024-04-22T17:18:35Z VendorInfo=gohugoio

ERROR render of "term" failed: execute of template failed: html/template:_default/list.html:44:14: no such template "_internal/google_analytics_async.html"
ERROR render of "page" failed: execute of template failed: html/template:_default/single.html:44:14: no such template "_internal/google_analytics_async.html"
Total in 108 ms
Error: error building site: render: failed to render pages: render of "home" failed: execute of template failed: html/template:index.html:44:14: no such template "_internal/google_analytics_async.html"

The build works on Cloudflare Pages as it uses the specific Hugo version of 0.118.2 as of writing (see their documentation, under the v2 build system), although the Hugo version can be changed with the HUGO_VERSION page environment variable.

Given that local development of the website are likely to use the latest version of Hugo, we should look into fixing whatever is causing that issue. If possible, we should fix it in a way that is compatible with both Hugo 118.2 (used by Cloudflare) and the latest version.