mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-09 19:47:02 +02:00
commands: Avoid full browser refresh on simple CSS changes
This commit is contained in:
@@ -962,7 +962,7 @@ func (c *hugoBuilder) handleEvents(watcher *watcher.Batcher,
|
|||||||
lrl.Logf("no page to navigate to, force refresh")
|
lrl.Logf("no page to navigate to, force refresh")
|
||||||
livereload.ForceRefresh()
|
livereload.ForceRefresh()
|
||||||
}
|
}
|
||||||
} else if len(otherChanges) > 0 {
|
} else if len(otherChanges) > 0 || len(cssChanges) > 0 {
|
||||||
if len(otherChanges) == 1 {
|
if len(otherChanges) == 1 {
|
||||||
// Allow single changes to be refreshed without a full page reload.
|
// Allow single changes to be refreshed without a full page reload.
|
||||||
pathToRefresh := h.PathSpec.RelURL(paths.ToSlashTrimLeading(otherChanges[0]), false)
|
pathToRefresh := h.PathSpec.RelURL(paths.ToSlashTrimLeading(otherChanges[0]), false)
|
||||||
|
Reference in New Issue
Block a user