hugo-wasm/commands
Bjørn Erik Pedersen cd7dc7a372 Fix some server rebuild issues for non-HTML custom output formats
The failing test case here is

* A custom search output format defined on the home page, marked as `noAlternative` and not `permalinkable`
* In fast render mode, when making a change to a data source for that search output format, the JSON file was not refreshed.

There are variants of the above, but the gist of it is:

* The change set was correctly determined, but since the search JSON file was not in the recently visited browser stack, we skipped rendering it.

Running with `hugo server --disableFastRender` would be a workaround for the above.

This commit fixes this by:

* Adding a check for the HTTP request header `Sec-Fetch-Mode = navigation` to the condition for if we should track server request as a user navigation (and not e.g. a HTTP request for a linked CSS stylesheet).
* Making sure that we compare against the real relative URL for non-permalinkable output formats.

Fixes #13014
2025-01-24 17:27:02 +01:00
..
commandeer.go commands: Fix spelling in comment 2025-01-15 22:31:52 +01:00
commands.go commands: Add "hugo build" as an alias for "hugo" 2024-09-30 10:36:29 +02:00
config.go commands: Add --printZero to the config command 2025-01-15 22:48:14 +02:00
convert.go commands: Use consistent style when describing subcommands 2024-10-15 08:51:53 +02:00
deploy.go commands: Print the "deploy not available" error message even if flags provided 2024-11-05 11:40:42 +01:00
deploy_flags.go commands: Print the "deploy not available" error message even if flags provided 2024-11-05 11:40:42 +01:00
deploy_off.go commands: Print the "deploy not available" error message even if flags provided 2024-11-05 11:40:42 +01:00
env.go commands: Use consistent style when describing subcommands 2024-10-15 08:51:53 +02:00
gen.go Print cli usage of hugo gen chromastyles alongside css 2024-12-30 15:06:35 +01:00
helpers.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
hugo_windows.go all: Rework page store, add a dynacache, improve partial rebuilds, and some general spring cleaning 2024-01-27 16:28:14 +01:00
hugobuilder.go Fix some server rebuild issues for non-HTML custom output formats 2025-01-24 17:27:02 +01:00
import.go commands: Use consistent style when describing subcommands 2024-10-15 08:51:53 +02:00
list.go Write all logging (INFO, WARN, ERROR) to stderr 2024-12-13 09:23:09 +01:00
mod.go commands: Use consistent style when describing subcommands 2024-10-15 08:51:53 +02:00
new.go commands: Use consistent style when describing subcommands 2024-10-15 08:51:53 +02:00
release.go completion: Improve existing argument completions, add many more 2024-04-11 15:34:26 +02:00
server.go Fix some server rebuild issues for non-HTML custom output formats 2025-01-24 17:27:02 +01:00