Help with my "index.html"?

When I run my Hugo Quickstart website locally, it works fine. However, if I deploy it via Netlify, the home page (i.e., index.html) is not showing properly. See the photo below.

Then, I reached out to Netlify support team. Their CTO told me that “When Hugo runs on Netlify’s build pipeline, the public directory gets overriden with that empty index.html file.”.

It seems that the culprit is the empty/missing index.html which forces Netlify’s pipeline to override this empty file. Does anyone know how I can generate this explicitly on Hugo? I’ve been reading something about, but I do not know how to keep the Ananke theme layout while generating this index.html.

Make sure you have the file in content directory as you have mentioned. I don’t know if a layouts/index.html is needed when you are using a theme, I assume not?

To help you diagnose what’s wrong I would try to replicate the Netlify process as close as possible. Delete your public folder, git commit that and then add the public folder to the .gitignore file so that you aren’t committing what Netlify should be building. Then locally, with a clean public folder run hugo and in theory if it’s the same version of hugo that Netlify build is using then you should have the same output. Then you can check your built public/index.html file.

I found the culprit: "Drafts do not get deployed; once you finish a post, update the header of the post to say draft: false "

After setting the post to say draft: false , the content is displayed now!