From 1f922aa70a655d6f26616e4cdd33abba3b3bc582 Mon Sep 17 00:00:00 2001 From: "Arjun G. Menon" Date: Sun, 4 Aug 2024 23:05:09 -0400 Subject: [PATCH] Minor --- README.md | 1 + alteza/engine.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d3180bf..29c2fdf 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,7 @@ must run Alteza with trusted code, or in an isolated container. For example, in * Therefore, directories with no public files do not exist in the generated site. * Files _reachable_ from marked-as-public files will also be publicly accessible. * Here, reachability is discovered when a provided `link` function is used to link to other files. + * All files starting with a `.` are ignored. 3. All file and directory names, except for index page files, _at all depth levels_ must be unique. This is to simplify use of the `link(name)` function. With unique file and directory names, one can simply link to a file or directory with just its name, without needing to disambiguate a non-unique name with its path. Note: Directories can only be linked to if the directory contains an index page. diff --git a/alteza/engine.py b/alteza/engine.py index e5535bb..20e4389 100644 --- a/alteza/engine.py +++ b/alteza/engine.py @@ -477,7 +477,7 @@ def on_any_event(self, event: FileSystemEvent) -> None: return if "__pycache__" in event.src_path or "__pycache__" in event.dest_path: return - if os.path.basename(os.path.normpath(event.src_path)).startswith("."): + if Fs.isHidden(os.path.basename(os.path.normpath(event.src_path))): return if ( isinstance(event, DirModifiedEvent)