Index page sometimes blank

Hi there,

I am in the process of re-creating my professional blog / website using Hugo, and I stumbled upon something that feels like a data race. The problem is that the index page is sometimes blank, like below:

When I run hugo server, 9 out of 10 times it properly renders the contents, but sometimes it doesn’t. There are two things that surprise me about this:

  1. Two runs might return different output, even though there are no changes to the files
  2. Hugo does not show any error in its logs

I have no idea how to debug this, since Hugo doesn’t report any errors, and as far as I can see the contents of the home.md file are nothing extraordinary. Here is the pull request switching from plain HTML to Hugo, in case you want to take a look at the code. You will notice that there is already a merged pull request switching to Hugo with the exact same commit, but I had to revert it, because when it was deployed by Netlify it had the blank index page.

Can you spot anything abnormal?

Thanks in advance!

hugo --printPathWarnings 
mv content/home.md content/_index.md
hugo --printPathWarnings 

See this related discussion:
https://discourse.gohugo.io/t/odd-build-issues-theme-layout-not-looking-up-correct-template/41827/4

And read about the difference between index.md and _index.md:
https://gohugo.io/content-management/page-bundles/

1 Like

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