From d240a705d6e3d3787ee1f60cbb609bb8ad3c466a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Sun, 27 Jul 2025 11:58:49 +0200 Subject: [PATCH] commands: Avoid full browser refresh on simple CSS changes --- commands/hugobuilder.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)