Hot reload
Save a file, the browser updates. The watcher sees every .rat, .css, .js, .py, image, font, and JSON file under the project; a 50ms debounce coalesces a burst into one event; the SSE stream at /__rat__/events tells subscribers to reload.
What gets watched
Every project directory the loader reads
The watcher tracks every directory the site loader walks plus the root configuration files. Editing any of these triggers a bump; editing files outside the tracked set (build artifacts, temp files, the .venv directory) is silently ignored.
pages/ pups/ api/ data/
styles/ public/ lang/
main.rat settings.rat settings.json Python edits restart the Tail worker
Saving a .py file respawns the subprocess
A lang/python/*.py change is treated specially — the Tail worker for Python is closed and the registry entry cleared, so the next page render lazily respawns with the new imports. No rat start bounce needed.
# before edit
# lang/python/ml.py
def predict(x): return x * 2
# save with a change:
def predict(x): return x * 3
# next request to a page that calls ml.predict()
# gets the new behaviour automatically Opt out per build
settings.rat hot_reload flag
Hot reload is on by default in dev. To turn it off explicitly (production builds, or a dev session you want to keep quiet), set hot_reload: false. Pair with the [] mode flag to keep the dev path noisy.
# settings.rat
> [@dev] server
hot_reload: true
> [@prod] server
hot_reload: false That wraps the docs. Browse the sidebar to revisit any section, or hop to the About page for context on how this site is built.