Misc remote HTTP/content adapter enhancements

* Recover from server errors
* Improve go adapter rebuilds when adding new content

See #12502
Fixes #12570
This commit is contained in:
Bjørn Erik Pedersen
2024-06-05 09:21:45 +02:00
parent bc05d854b2
commit 2b05a50f8f
4 changed files with 33 additions and 2 deletions

View File

@@ -244,9 +244,13 @@ func (h *HugoSites) process(ctx context.Context, l logg.LevelLogger, config *Bui
}
if len(events) > 0 {
// This is a rebuild
// This is a rebuild triggered from file events.
return h.processPartialFileEvents(ctx, l, config, init, events)
} else if len(config.WhatChanged.Changes()) > 0 {
// Rebuild triggered from remote events.
if err := init(config); err != nil {
return err
}
return h.processPartialRebuildChanges(ctx, l, config)
}
return h.processFull(ctx, l, config)