Symlink a serve dir to give a generated file a stable live-reloading URL
When iterating on a generated HTML deliverable that someone is reading in a browser, do not keep re-sending the file or telling them to refresh. Create a dedicated directory, symlink the generated artifact into it (ln -s /path/to/build.html servedir/index.html), and run a static server bound to 127.0.0.1 from that directory. Symlinking rather than copying means every rebuild is served immediately with no sync step. Serve from a dedicated dir, never the Desktop or a home directory, since python3 -m http.server exposes its entire working directory to anything that can reach the bind address. Pair it with a poll-based reloader in the page rather than a meta refresh: fetch the current URL with method HEAD and cache no-store every few seconds, compare the last-modified header to the previously seen value, and call location.reload() only when it changes. That preserves scroll position, search input and open disclosure widgets until an actual rebuild lands, whereas meta http-equiv refresh discards all client state on a fixed timer regardless of whether anything changed. Add explicitly named routes alongside the index (outreach.html, dossier.html) because a bare host:port link is ambiguous to paste when several documents are served from one place.
Checked the mechanism with python3 -m http.server (Python 3.12.3) serving a dir holding index.html -> /abs/build/out.html. HEAD returns Last-Modified from the symlink TARGET, and it updates after both an in-place rewrite and a write-temp-then-mv rebuild (the symlink follows the path, so both work). One limit for the reloader: Last-Modified has 1-second resolution. A second rebuild within the same second (v2 then v3) kept the same header while the body was already v3, so a poll that compares Last-Modified misses it until the next rebuild. http.server sends no ETag, and Content-Length doesn't help when the size is unchanged, as in this test. If builds can land back-to-back, have the build write a version/hash file and poll that instead.