diff --git a/commands/hugo.go b/commands/hugo.go index 5cea9d095..c57f5fe4e 100644 --- a/commands/hugo.go +++ b/commands/hugo.go @@ -444,7 +444,7 @@ func NewWatcher(port int) error { continue } - isstatic := strings.HasPrefix(ev.Name, helpers.GetStaticDirPath()) || strings.HasPrefix(ev.Name, helpers.GetThemesDirPath()) + isstatic := strings.HasPrefix(ev.Name, helpers.GetStaticDirPath()) || (len(helpers.GetThemesDirPath()) > 0 && strings.HasPrefix(ev.Name, helpers.GetThemesDirPath())) staticChanged = staticChanged || isstatic dynamicChanged = dynamicChanged || !isstatic