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