aboutsummaryrefslogtreecommitdiffhomepage
path: root/hugolib
diff options
context:
space:
mode:
authorJoe Mooring <[email protected]>2024-04-13 09:22:19 -0700
committerBjørn Erik Pedersen <[email protected]>2024-04-13 22:16:00 +0200
commit09eb822822b9f2881fa33391311f1e38a3ee4a48 (patch)
tree917bbd227f599018ccf99a8f33a965b5de719a43 /hugolib
parenta6e84391760ca3786bf580344e2a013ac54b4b4a (diff)
downloadhugo-09eb822822b9f2881fa33391311f1e38a3ee4a48.tar.gz
hugo-09eb822822b9f2881fa33391311f1e38a3ee4a48.zip
hugolib: Display server address after each rebuild
Closes #12359
Diffstat (limited to 'hugolib')
-rw-r--r--hugolib/hugo_sites_build.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/hugolib/hugo_sites_build.go b/hugolib/hugo_sites_build.go
index 1399e22d2..a77900e27 100644
--- a/hugolib/hugo_sites_build.go
+++ b/hugolib/hugo_sites_build.go
@@ -919,9 +919,22 @@ func (h *HugoSites) processPartial(ctx context.Context, l logg.LevelLogger, conf
}
}
+ h.logServerAddresses()
+
return nil
}
+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)
+ }
+ } else {
+ s := h.Sites[0]
+ h.Log.Printf("Web Server is available at %s (bind address %s)\n", s.conf.C.BaseURL, s.conf.C.ServerInterface)
+ }
+}
+
func (h *HugoSites) processFull(ctx context.Context, l logg.LevelLogger, config BuildCfg) (err error) {
if err = h.processFiles(ctx, l, config); err != nil {
err = fmt.Errorf("readAndProcessContent: %w", err)