commands: Fix --navigateToChanged server behavior when editing headless content

Fixes #12648
This commit is contained in:
Bjørn Erik Pedersen 2024-07-07 12:25:22 +02:00
parent 094f746751
commit cc2d19e19b

View file

@ -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)