commit cfe1fbd486f0b1aad9ab86dbf38200e2993ff3ef
parent 75decb47a3c22a2e2a5514e6f97c1b170a050434
Author: Oscar Benedito <oscar@oscarbenedito.com>
Date: Tue, 8 Sep 2020 22:03:43 +0200
New feature: live reload server for development
Diffstat:
3 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/.gitignore b/.gitignore
@@ -1,2 +1,3 @@
/_site
/misc/blogroll.ompl
+/assets/live.js
diff --git a/Makefile b/Makefile
@@ -6,6 +6,7 @@ site:
python3 gensite.py
server: site
+ git ls-files | entr make &
python3 -m http.server --bind localhost --directory _site
blogroll:
diff --git a/layouts/base.html b/layouts/base.html
@@ -26,5 +26,6 @@
</div>
</footer>{{ _if extrafooter }}
{{ extrafooter }}{{ _fi }}
- </body>
+ </body>{{ _if _asset_live.js }}
+ <script type="text/javascript" src="/{{ _asset_live.js }}"></script>{{ _fi }}
</html>