Live reload
Zorto’s dev server watches your files, rebuilds automatically, and refreshes the browser — no manual reload needed.
Usage #
zorto preview
This starts a local server (default port 1111). Add --open to automatically open your site in the browser.
What gets watched #
The server monitors all files that affect your site:
| Directory | Triggers rebuild on |
|---|---|
content/ | Any .md file change |
templates/ | Any .html file change |
sass/ | Any .scss file change |
static/ | Any file change (copied to output) |
config.toml | Configuration change |
How it works #
SaveEdit a file
→
DetectFilesystem event
→
RebuildSite recompiles (~100ms)
→
PushSSE event sent
→
RefreshBrowser reloads
Uses server-sent events (SSE). No browser extension required.
- You save a file.
- Zorto detects the change via filesystem events.
- The site rebuilds (typically under 100ms).
- The server pushes a reload event over SSE (server-sent events).
- A small injected script in every page listens for the event and triggers a browser refresh.
Options #
zorto preview --port 8080 # custom port zorto preview --open # auto-open browser zorto preview --interface 0.0.0.0 # expose to local network zorto --no-exec preview # skip executable code blocks
Network access #
By default, the server binds to 127.0.0.1 (localhost only). Use --interface 0.0.0.0 to make the preview accessible from other devices on your network — useful for testing on phones or tablets.
Further reading #
- Fast — why build times are under 100ms
- CLI reference — all preview server options
- Troubleshooting — preview server issues and fixes