misc: livereload setup (#70112)

test-gitea-mirroring
Agate Berriot 8 months ago
parent 6746c330f4
commit 3e2a8d432a

@ -0,0 +1,7 @@
#!/bin/bash
# add a trap to ensure our livereload
# is stopped properly on ctrl-c
trap 'kill %1' SIGINT
./livereload-server & iwatch -r -t '.scss' -e modify -c "make css" .

@ -0,0 +1,9 @@
#!/usr/bin/python3
from livereload import Server, shell
server = Server()
server.watch('static/**/*.css', 'echo "reloading"')
server.serve(liveport=35729)

@ -63,6 +63,9 @@
{% if not no_extra_js %}
<script src="{{site_base}}{% static "" %}{{css_variant}}/extra.js?{% start_timestamp %}" async></script>
{% endif %}
{% if livereload_enabled %}
<script src="{{site_base}}/livereload/livereload.js?host={{ request.get_host }}&port=443" async></script>
{% endif %}
{% skeleton_extra_placeholder extra-head %}
{% end_skeleton_extra_placeholder %}
{% endblock %}

Loading…
Cancel
Save