I’m having major caching issues with hugo server, and the CSS not being rebuilt.
I’m currently using this command, which, when run again correctly displays the latest CSS. But only after explictily being run:
hugo server --disableFastRender --environment=dev --bind "0.0.0.0"
And I get this output:
| EN
+------------------+------+
Pages | 1038
Paginator pages | 17
Non-page files | 943
Static files | 44
Processed images | 0
Aliases | 69
Sitemaps | 1
Cleaned | 0
Total in 643 ms
Watching for changes in /myPATH/{archetypes,assets,content,data,i18n,layouts,static}
Watching for config changes in /myPATH/config.toml
Environment: "dev"
Serving pages from memory
Web Server is available at //localhost:1313/ (bind address 0.0.0.0)
Press Ctrl+C to stop
Hard refreshes don’t help, I check the public folder and the CSS is not being written with the latest Sass.
I’ve had sporadic problems with LiveReload in Hugo 56.0 and above. Until a few days ago, I thought I had solved the problem by launching hugo server like this:
hugo -v server --path-warnings --ignoreCache --disableFastRender --renderToDisk --cleanDestinationDir
I thought "Aha, the trick (for my setup) is --renderToDisk" but alas, LiveReload quit working again and I’ve reverted to Hugo 55.6. I want to use the latest Hugo because I write about Hugo[*] and want to make sure what I write is correct.
This is definitely not fixed for me, currently using v0.65.1/extended darwin/amd64.
I have to Ctrl/Cmd+C to stop the server and restart it every time I make a CSS change for it to show up in the browser. HTML markup changes do appear right away.
AutoReload also does not work with just hugo server.
One question: do you have dev tools open in your browser? (can I assume Chrome?). Chrome has an option to ignore the browser cache when dev tools are open.
I have the same issue, it was fine for a long time, then it sometimes it doesnt refresh, but then it worked sometimes as well, then suddenly stopped working altogether. Version 0.125. hugo server command.
On Windows, Firefox Developer Edition.
I think it’s a cache issue because if I leave it long enough and then do something to the CSS (I’m using PostCSS / TailwindCSS), it’ll reload the browser with the new style automatically, but then if I keep making changes, the CSS doesn’t get processed, no output. Console does show changes detected on the CSS file I changed, the public/css file doesnt change. The fingerprint doesn’t change either.
No issues with hugo or if I delete the public folder and rerun hugo server newest changes will be in, but any futher change I make to the CSS won’t be writtten to public.
These does nothing for this situation: hugo server --ignoreCache
! set cacheDir in hugo.toml to a directory in my project to see what’s happening with the cache. Directory remains empty.
Edit: HTML doesn’t work either, changes are detected, but nothing is generated. No error reported.