commands: Print "Webserver is ..." right before "Total ..."

Also fix it so

* It's not printed when running `hugo -w`
* It'd printed for all kinds of rebuilds

Fixes #12384
This commit is contained in:
Bjørn Erik Pedersen
2024-04-20 15:36:54 +02:00
parent 9dd687027f
commit c8e400b621
3 changed files with 19 additions and 9 deletions

View File

@@ -951,12 +951,10 @@ func (h *HugoSites) processPartial(ctx context.Context, l logg.LevelLogger, conf
}
}
h.logServerAddresses()
return nil
}
func (h *HugoSites) logServerAddresses() {
func (h *HugoSites) LogServerAddresses() {
if h.hugoInfo.IsMultihost() {
for _, s := range h.Sites {
h.Log.Printf("Web Server is available at %s (bind address %s) %s\n", s.conf.C.BaseURL, s.conf.C.ServerInterface, s.Language().Lang)