From: Bjørn Erik Pedersen Date: Sun, 27 Jul 2025 09:58:49 +0000 (+0200) Subject: commands: Avoid full browser refresh on simple CSS changes X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=d240a705d6e3d3787ee1f60cbb609bb8ad3c466a;p=brevno-suite%2Fhugo commands: Avoid full browser refresh on simple CSS changes --- diff --git a/commands/hugobuilder.go b/commands/hugobuilder.go index 3b57ac5e9..d3044bdd6 100644 --- a/commands/hugobuilder.go +++ b/commands/hugobuilder.go @@ -962,7 +962,7 @@ func (c *hugoBuilder) handleEvents(watcher *watcher.Batcher, lrl.Logf("no page to navigate to, force refresh") livereload.ForceRefresh() } - } else if len(otherChanges) > 0 { + } else if len(otherChanges) > 0 || len(cssChanges) > 0 { if len(otherChanges) == 1 { // Allow single changes to be refreshed without a full page reload. pathToRefresh := h.PathSpec.RelURL(paths.ToSlashTrimLeading(otherChanges[0]), false)