diff --git a/main.go b/main.go index d88fdba..61f395b 100644 --- a/main.go +++ b/main.go @@ -130,10 +130,14 @@ func RePrefixPath(path string, new_prefix string) string { return filepath.Join(prefixed_path...) } +func SamePath(a string, b string) bool { + return filepath.ToSlash(a) == filepath.ToSlash(b) +} + func ProcessDirEntry(path string, d fs.DirEntry, err error) error { settings := config.Settings - if !d.IsDir() { + if !d.IsDir() && !SamePath(path, config.Settings.Layout) { if err != nil { return Fail(err, "path: %s", path); } source_name, ext, found := SplitPathExt(path) @@ -289,6 +293,8 @@ func main() { switch command { case "watch": config.Load(config_file) + SyncStaticDir(); + RenderPages(); WatchDir() case "init": InitConfig(config_file)