summaryrefslogtreecommitdiff
path: root/public/templates/live_preview.py
diff options
context:
space:
mode:
Diffstat (limited to 'public/templates/live_preview.py')
-rw-r--r--public/templates/live_preview.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/public/templates/live_preview.py b/public/templates/live_preview.py
new file mode 100644
index 0000000..e753fc6
--- /dev/null
+++ b/public/templates/live_preview.py
@@ -0,0 +1,14 @@
+from livereload import Server
+
+server = Server()
+# Watch HTML file
+server.watch('index.html')
+# Watch CSS files
+server.watch('static/styles.css')
+# Watch JavaScript files
+server.watch('static/main.mjs')
+# Watch other files if needed
+server.watch('page/*') # Watch everything in the page folder
+
+# Serve the current directory
+server.serve(root='.')