]> git.maquefel.me Git - brevno-suite/hugo/commit
Fix server rebuilds when adding sub sections especially on Windows
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Fri, 15 Mar 2024 09:57:51 +0000 (10:57 +0100)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Fri, 15 Mar 2024 14:42:56 +0000 (15:42 +0100)
commit07b2e535be469f0a95619edb2b0bd5ea569bca3e
tree20b82be66be26398b9a67fec4d3ce5ee867482b3
parentf038a51b3e448286287b56bed6dd76e9b00138d5
Fix server rebuilds when adding sub sections especially on Windows

This commit also optimizes for the case where change events for both file (e.g. `_index.md`) and the container directory comes in the same event batch.

While testing this on Windows 11 (ARM64), I notice that Windows behaves a little oddly when dumping a folder of files into the content tree; it works (at least after this commit), but it seems like the event batching behaves differently compared to other OSes (even older Win versions).

A related tip would be to try starting the server with polling, to see if that improves the situation, e.g.:

```
hugo server --poll 700ms
```

Fixes #12230
hugolib/hugo_sites_build.go
hugolib/pages_capture.go
hugolib/site.go