Hello,
While developing a Hugo website WITHOUT a theme, I’m encountering various issues that I can’t resolve. Generally, the public folder isn’t updating properly.
I’ve uploaded the test site code to GitHub
blog1
-
When I edit the layouts/blogs/single.html or layouts/blogs/list.html files, the changes aren’t always reflected in the rendering of the pages in the public folder.
-
public/ contains elements that had previously been deleted in content/ or layouts/
blog1-PublicDelete
-
The
blog1
folder was copied and namedblog1-PublicDelete
. -
In an attempt to refresh the
public/
folder, it was deleted, and then the site was rebuilt (command:hugo
). -
Most HTML or XML files in the
public/
folder no longer appear ! -
And as a result,
127.0.0.1:1313/blogs
returns: Page Not Found.
The codes were tested on two different devices: Linux and Mac.
Hugo versions: v0.145.0 on both devices.
Linux environment :
hugo v0.145.0-666444f0a52132f9fec9f71cf25b441cc6a4f355+extended linux/amd64 BuildDate=2025-02-26T15:41:25Z VendorInfo=snap:0.145.0
GOOS="linux"
GOARCH="amd64"
GOVERSION="go1.24.0"
github.com/sass/libsass="3.6.6"
github.com/webmproject/libwebp="v1.3.2"
github.com/sass/dart-sass/protocol="3.1.0"
github.com/sass/dart-sass/compiler="1.85.1"
github.com/sass/dart-sass/implementation="1.85.1"
Mac environment
hugo v0.145.0+extended+withdeploy darwin/arm64 BuildDate=2025-02-26T15:41:25Z VendorInfo=brew
GOOS="darwin"
GOARCH="arm64"
GOVERSION="go1.24.0"
github.com/sass/libsass="3.6.6"
github.com/webmproject/libwebp="v1.3.2"
My questions:
-
Why isn’t the site refreshing, given that I’ve always had problems with various sites created with Hugo, with instant refreshes, even when clearing Hugo’s caches (hugo serve –ignoreCache) and those of browsers?
-
Why is it impossible to properly recover it by rebuilding the site after deleting public/?
-
What are my mistakes?
-
What are the solutions?
Thank you in advance for any help you can provide.
Sincerely.