CSS on a deployed Hugo site will not update

CSS on a deployed Hugo site will not update.

The CSS in the GitHub repo has updated and works fine locally.

However I don’t see any reason why the CSS is not updating on the pages served by Netlify.

I have tried deploying with the various different cahce options. I see no errors on the log pointing to an issue with the CSS. I have the new css in a custom.css file but have also tried modifying the theme CSS file.

Everything else with the site works ok and I can edit the content itself. The source code for the page all looks ok and is loading the correct stylesheets - it is just that these are old versions which I cannot get to update on Netlify. Any ideas? Is there are harder reset option so I can redeploy the repo fresh without having to set up the custom domain, repo links again etc?


Hello @ddes, are you setting a custom cache-control header for your CSS? Also, would you be able to provide specific examples of the issue?

Hi Dennis

My mistake - I’m not sure how I believed that the CSS on the repo had updated, because I have since realised that the theme is in a submodule to which my local changes as visible in VSCode will not be applied.

I’ve found the correct way to use custom.css with this theme and all is now working:

Thanks for your reply.