odd behavior happens to my HUGO setup.
Running the server with hugo server --disableFastRender -D does not serve some pages, until they are saved. Although the HTML pages are there. But it seems the “save” event from my editor triggers in the HUGO observer something like “now the file exists”.
Another point is, that most if not all of my HTML content pages aren’t exported on build and I don’t know why.
I tested with draft set to true, than false. Than different front matter.
I’ve used different commands, but ultimately: hugo -D -E -F --gc --minify
Maybe its because I’m just using a custom theme and content pages. Nothing else.
A simplified example of my setup: GitHub - yi0n/hugo-test (Link to the source code repository)
hugo v0.116.1-3e1ea030a5897addaf9d113d0826709fe07f77c0 windows/amd64 BuildDate=2023-08-01T07:24:54Z VendorInfo=gohugoio
For setting up a HUGO project, I tried to find good default example structures (even on Github, except some outdated ones and it was already hard to find out on how to lay out a theme’s layout/_default and partials) that might clarify things.
Changing from index.html to _index.html helped in building the public structure! Thank you very much.
Good to point out that in subdirectories of content/ having also _index.html won’t build their respectively index.html. Seems only allowed in content root.
Oddly, the startpage will show Error 404 by this change, when running the hugo server for inspection of the page.
Include a link to the source code repository of your project, because we really need the context of seeing your templates and partials to be able to help you. It is trivial to do a quick git clone on your repo, then run hugo server in your project, to help you out. On the other hand, recreating your code from screenshots, or sort of guessing at it, is not.
If you can’t share your repository for whatever reason, consider creating a dummy repo that you can share, which reproduces the problem you’re experiencing.