Hugo 0.152.1 no longer renders index.html

Hello,

I experience a very strange behaviour with hugo v0.152.1. I build a website on a dev branch and everything is fine. Then after a while I realize that the body tag does not contain the css class “home” anymore. After trying several things it totally broke in terms that index.html is not rendered at all.

I cleaned all with rm -rf ~/.cache/hugo_cache/ .hugo_build.lock public/, I tested previous commits and I even switched my dev branch to main, which contains an obviously running live site.
But, guess what, on my local machine the issue remains. index.html is not rendered.

I’m lost. Any suggestions what to try next?

This is the site: https://www.finanz54.club and if you scroll to the bottom, you can see the hash of the commit this site was created with. If I fetch that commit locally, index.html is not generated.
Isn’t that totally weird?

Even the build output on the build server and on my local machines differ.

Build Server output:

  hugo \
    --enableGitInfo \
    --gc \
    --minify
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
  env:
    HUGO_VERSION: 0.151.2
    HUGO_CACHEDIR: /home/runner/work/_temp/hugo_cache
    HUGO_ENVIRONMENT: production
Start building sites … 
hugo v0.151.2-a3574f6f70c9b272e3de53cf976018ee3ff16fd1+extended linux/amd64 BuildDate=2025-10-16T16:52:34Z VendorInfo=gohugoio


                  │ DE  
──────────────────┼─────
 Pages            │ 111 
 Paginator pages  │   0 
 Non-page files   │  29 
 Static files     │ 318 
 Processed images │   0 
 Aliases          │   0 
 Cleaned          │   0 

Total in 726 ms

Local output:

 hugo  --enableGitInfo --gc --minify
Start building sites … 
hugo v0.152.1+extended linux/amd64 BuildDate=unknown


                  │ DE 
──────────────────┼────
 Pages            │ 68 
 Paginator pages  │  0 
 Non-page files   │ 29 
 Static files     │ 25 
 Processed images │  0 
 Aliases          │  0 
 Cleaned          │  0 

Total in 55 ms

Found the issue with missing index.html: I added the theme I used via git submodule. And somehow that folder got damaged. There were no files anymore in the theme directory. After restoring the submodule everything works well again.

In the theme submodule I updated /layouts/_default/baseof.html:
all .Scratch. appearances I replaced by .Store. as the former one is marked deprecated.
in <body class="{{ .Store.Get `class` }} … was a hugo.Store which is wrong and caused the issue.

better copy the file from the themes layouts folder to the sam path in your project layouts.

then change it there. when updating the submodule from remote you still have your own version and can adapt it to upstream changes

Thanks for the hint. Actually I do that. But since the original theme is not active I think to move all my changes back to the submodule as it is my own fork of the original theme anyway.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.