Hugo server does not serve file created post-build

I am not sure if this is the intended behavior.

# build site
# create a file post-build
echo "something" > public/foo.txt 
# test the site locally prior to deployment
hugo server

When running hugo server in the last step, the foo.txt file is not served.

It works with hugo server --renderToDisk, but I am wondering if this behavior is intended. It took me a few minutes to figure out why I wasn’t getting the expected results when testing prior to deployment.

EDIT: This is not new behavior. It worked the same way in v0.76.0, and probably earlier.

Well Joe, it’s probably because hugo server has no knowledge of the public directory unless you render to disk.

You are right, but if I hadn’t wronged the semver gods with my --renderStaticToDisk, you could have used that flag and your construct would work.