diff options
Diffstat (limited to 'internal/server')
-rw-r--r-- | internal/server/server.go | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/internal/server/server.go b/internal/server/server.go index 02202ae..54c4569 100644 --- a/internal/server/server.go +++ b/internal/server/server.go @@ -151,11 +151,18 @@ func New(runtimeConfig *Config) (*Server, error) { return nil, errors.WithMessage(err, "could not add directory to file watcher") } go fw.Start(func(filename string) { - rebuild(builderConfig, config) + log.Info("rebuilding site", "changed_file", filename) + err := rebuild(builderConfig, config) + if err != nil { + log.Error("error rebuilding site", "error", err) + } }) } - rebuild(builderConfig, config) + err = rebuild(builderConfig, config) + if err != nil { + return nil, err + } loggingMux := http.NewServeMux() mux, err := website.NewMux(config, runtimeConfig.Root) |