Rework the build.writeStats struct

Mostly to make it easier to toggle on/off this feature from the env.

See #11191
This commit is contained in:
Bjørn Erik Pedersen
2023-07-02 11:02:47 +02:00
parent c1eac616d5
commit 5afc89f2bf
6 changed files with 40 additions and 59 deletions

View File

@@ -475,7 +475,7 @@ func (h *HugoSites) writeBuildStats() error {
if h.ResourceSpec == nil {
panic("h.ResourceSpec is nil")
}
if !h.ResourceSpec.BuildConfig().WriteStats.Enabled() {
if !h.ResourceSpec.BuildConfig().BuildStats.Enabled() {
return nil
}