diff options
Diffstat (limited to 'internal/server/server.go')
-rw-r--r-- | internal/server/server.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/internal/server/server.go b/internal/server/server.go index 1b0407d..a658235 100644 --- a/internal/server/server.go +++ b/internal/server/server.go @@ -100,7 +100,7 @@ func New(runtimeConfig *Config) (*Server, error) { if err != nil { return nil, errors.WithMessage(err, "could not create file watcher") } - for _, dir := range []string{"content", "static", "templates"} { + for _, dir := range []string{"content", "static", "templates", "internal/builder"} { err := fw.AddRecursive(dir) if err != nil { return nil, errors.WithMessagef( @@ -110,8 +110,11 @@ func New(runtimeConfig *Config) (*Server, error) { ) } } + err = fw.Add(".") + if err != nil { + return nil, errors.WithMessage(err, "could not add directory to file watcher") + } go fw.Start(func(filename string) { - log.Debug("file updated", "filename", filename) r, err := builder.BuildSite(builderConfig) if err != nil { log.Error("could not build site", "error", err) |