aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2024-07-07 12:25:22 +0200
committerBjørn Erik Pedersen <[email protected]>2024-07-07 14:42:46 +0200
commitcc2d19e19bb01338ca67a7bcbef9a2e1300443de (patch)
tree1eceec3f8b7933902a7cd4238bbaf6dd37cba3c6
parent094f746751798a9316db8ba3c14cdb6666c7e950 (diff)
downloadhugo-cc2d19e19bb01338ca67a7bcbef9a2e1300443de.tar.gz
hugo-cc2d19e19bb01338ca67a7bcbef9a2e1300443de.zip
commands: Fix --navigateToChanged server behavior when editing headless content
Fixes #12648
-rw-r--r--commands/hugobuilder.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/commands/hugobuilder.go b/commands/hugobuilder.go
index 4e7d51b8c..15373d8c6 100644
--- a/commands/hugobuilder.go
+++ b/commands/hugobuilder.go
@@ -948,7 +948,7 @@ func (c *hugoBuilder) handleEvents(watcher *watcher.Batcher,
}
}
- if p != nil {
+ if p != nil && p.RelPermalink() != "" {
link, port := p.RelPermalink(), p.Site().ServerPort()
lrl.Logf("navigating to %q using port %d", link, port)
livereload.NavigateToPathForPort(link, port)