This release brings a rewrite of the logic around browser refreshes when running `hugo server`. We have seen some situations where asset changes (e.g. image/CSS/JS) has not been refreshed reliably in all browsers, even with the developer console open and the cache disabled. We suspect this comes from a recent browser bug (typically: Works fine in Safari, does not refresh in Chrome). The strategy we've been using when a change triggers multiple changes (e.g. both HTML and CSS) is to do one "browser force refresh", which in [LiveReload](https://github.com/livereload/livereload-js) ends up as a `window.location.reload()`. With this release we:
1. Are more specific about what we refresh, but fall back to "force refresh" for bigger change sets.
2. INFO log exactly what we do in these situations with the prefix `livereload`.
Start the server with:
hugo server --logLevel info
And you should see how Hugo handles browser updates when you change content/templates etc.
A related tip; start the server with
hugo server --logLevel info -N
Hugo will navigate to the content file you're changing and log it in the console.
Also new in this release a new [xxHash](https://gohugo.io/functions/hash/xxhash/) hashing function that is [much faster](https://github.com/gohugoio/hugo/commit/644d55475d631f60177eb792e9a010a39160df85) than any of the other hashing functions in Hugo, especially for larger inputs.
Note
We have upgraded the integration with Git used to load [GitInfo](https://gohugo.io/methods/page/gitinfo/) to be part of Hugo's [Security Policy](https://gohugo.io/about/security/#security-policy). We have added `git` to the default whitelist, but if you have a custom security policy, you may have to update that.
Bug fixes
* commands: Fix --navigateToChanged server behavior when editing headless content cc2d19e19 bep 12648
* commands: Fix hugo mod get -u ./... 251a23ef7 bep 12625
Improvements
* tpl: Use xxHash instead of MD5 to hash the deferred templates 4d8bfa7f1 bep
* Throw error if resources.PostProcess is used in a deferred template f0ed91cab bep 12655
* commands: Simplify the browser live reload logic 094f74675 bep 12643
* Use xxHash for the change detector fb8909d5b bep 12643
* source: Expose GitInfo Body 0ee2610d7 PeskyPotato 10905
* Add hash.XxHash 644d55475 bep 12635
Dependency Updates
* deps: Upgrade github.com/bep/gitmap v1.4.0 => v1.6.0 (note) 7be037750 bep 8627
* deps: Go mod tidy 439f07eac bep
* deps: Upgraded github.com/tdewolff/minify/v2 v2.20.20 => v2.20.36 ce5a2ce00 bep
* deps: Upgrade to golang.org/x/image v0.18.0 0f42d975e bep