diff --git a/commands/commands.go b/commands/commands.go index aba9802..161a872 100644 --- a/commands/commands.go +++ b/commands/commands.go @@ -10,6 +10,7 @@ import ( const SRC_DIR = "src" const TARGET_DIR = "target" const LAYOUTS_DIR = "layouts" +const INCLUDES_DIR = "includes" const DATA_DIR = "data" func Init() error { diff --git a/commands/serve.go b/commands/serve.go index e36993f..fb43edf 100644 --- a/commands/serve.go +++ b/commands/serve.go @@ -113,6 +113,8 @@ func setupWatcher() (*fsnotify.Watcher, error) { // Add the layouts and all source directories to the given watcher func addAll(watcher *fsnotify.Watcher) error { err := watcher.Add(LAYOUTS_DIR) + err = watcher.Add(DATA_DIR) + err = watcher.Add(INCLUDES_DIR) // fsnotify watches all files within a dir, but non recursively // this walks through the src dir and adds watches for each found directory filepath.WalkDir(SRC_DIR, func(path string, entry fs.DirEntry, err error) error {