- Create a new site according to the Quick Start Guide.
- Create a new file:
content/index.md
. This is an index page for your website. - Create a leaf bundle page:
content/faq/index.md
. Put some text in it. - Run
hugo server
. Navigate tohttp://localhost:1313/faq/
. You’ll see the FAQ page content. - Stop
hugo server
. Deletepublic
folder in the root dir of your hugo project. - Run
hugo server
. Navigate tohttp://localhost:1313/faq/
. I am getting a 404 error. What I expect to get is still the FAQ page.http://localhost:1313/
, the index page of the website is rendered ok, does not give me a 404. - Change
content/faq/index.md
contents, put a different text there. The browser page is reloaded, I see the new contents of the FAQ page as expected. - If I delete the
public
folder and start the server again, my FAQ page gives me a 404 again until I change its contents.
Same happens if I just execute hugo
to build the website without serving. The FAQ page is missing in public
folder completely. It is not included in sitemap.xml
either.
Why is my page not picked up after the public
folder is deleted? What I witness does not seem like the expected behavior to me especially in case of running plain hugo
command.
My hugo.yml (not yaml or toml extension, but this should not matter I guess) is the following:
baseUR: https://example.org/
languageCode: en-us
title: My New Hugo Site
theme: ananke
My hugo version is hugo v0.125.1-68c5ad638c2072969e47262926b912e80fd71a77+extended windows/amd64 BuildDate=2024-04-18T08:21:19Z VendorInfo=gohugoio
. Running from powershell.