]> git.maquefel.me Git - brevno-suite/hugo/commit
Fix /static performance regression from Hugo 0.103.0
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Mon, 26 Sep 2022 15:34:20 +0000 (17:34 +0200)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Mon, 26 Sep 2022 17:02:25 +0000 (19:02 +0200)
commit29ccb3606967a4e14ebee383decb38fae6c447dc
tree987dd3c25328fe01dafebd77aebd66f039681a99
parentd8aba18e05895723a6e42ea19be1cfbbed5bf98c
Fix /static performance regression from Hugo 0.103.0

In `v0.103.0` we added support for `resources.PostProcess` for all file types, not just HTML. We had benchmarks that said we were fine in that department, but those did not consider the static file syncing.

This fixes that by:

* Making sure that the /static syncer always gets its own file system without any checks for the post process token.
* For dynamic files (e.g. rendered HTML files) we add an additional check to make sure that we skip binary files (e.g. images)

Fixes #10328
commands/hugo.go
deps/deps.go
hugofs/fs.go
hugofs/hasbytes_fs.go
hugolib/filesystems/basefs.go
hugolib/pages_process.go