Pi66

git.pi66.xyz
A web interface for the pi66.xyz Git server
git clone https://git.pi66.xyz/git.pi66.xyz

← back to log

refactor: remove redundant static sync hooks from main.py

author: pi66
date: 2026-07-23 11:40
hash: f18063d8a1b44cc62c5892e6e81af899bb159572

Diffstat:

M

src/plugins/main.py
10 ------------------------------
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/src/plugins/main.py b/src/plugins/main.py
index 5bc92b5..adab8eb 100644
--- a/src/plugins/main.py
+++ b/src/plugins/main.py
@@ -51,16 +51,6 @@ def inject_repos(md_file, md_content):
         flags=re.DOTALL,
     )

-@hook("on_file_changed")
-def on_file_changed_hook(changed_path, config):
-    if changed_path.startswith(config.tree.static) and api.mode == "release":
-        subprocess.run(["rsync", "-a", api.config.tree.static, os.path.join(os.path.dirname(api.config.tree.release_dest),"static") ])
-
-@hook("on_end")
-def sync_static():
-    if api.mode == "release":
-        subprocess.run(["rsync", "-a", api.config.tree.static, os.path.join(os.path.dirname(api.config.tree.release_dest),"static") ])
-
 @hook("on_build_end")
 def build_pages(_):
     global repos