Repro
tinkerdown serve content/ against a multi-page docs site
- Edit
content/index.md (the home page mapped via site.home)
- Watch the server log:
[Watch] File changed: index.md fires (twice, even)
- Hard-refresh
http://localhost:PORT/ in the browser
- Observed: still serving the pre-edit render
- Expected: re-rendered HTML reflecting the edit
Other pages (e.g., /getting-started/your-first-app) hot-reload correctly when their .md is edited. The issue is specific to the / → home-page mapping.
Workaround
Restart tinkerdown serve. After restart, the new content is served immediately.
Hypothesis
The watcher invalidates a per-path cache, but the home-page mapping (site.home: index.md → /) may use a separate code path that doesn't invalidate when index.md is touched. Likely candidates:
internal/server/watcher.go isIncludedFile or the handler that dispatches /
- A pre-built static index served separately from the per-page render path
Discovered
While doing the literate rehaul of livetemplate/docs for v0.2.0 (your-first-app + landing page). Edited content/index.md to replace a cross-origin iframe with an embed-lvt block. Watcher logged File changed: index.md twice, but curl http://localhost:8084/ continued returning the pre-rehaul iframe HTML. Restarting tinkerdown produced the new content immediately.
Severity
Annoying for authors iterating on the home page. Not a correctness bug for non-home pages. The restart workaround is fast.
Repro
tinkerdown serve content/against a multi-page docs sitecontent/index.md(the home page mapped viasite.home)[Watch] File changed: index.mdfires (twice, even)http://localhost:PORT/in the browserOther pages (e.g.,
/getting-started/your-first-app) hot-reload correctly when their.mdis edited. The issue is specific to the/→ home-page mapping.Workaround
Restart
tinkerdown serve. After restart, the new content is served immediately.Hypothesis
The watcher invalidates a per-path cache, but the home-page mapping (
site.home: index.md→/) may use a separate code path that doesn't invalidate whenindex.mdis touched. Likely candidates:internal/server/watcher.goisIncludedFileor the handler that dispatches/Discovered
While doing the literate rehaul of
livetemplate/docsfor v0.2.0 (your-first-app + landing page). Editedcontent/index.mdto replace a cross-origin iframe with anembed-lvtblock. Watcher loggedFile changed: index.mdtwice, butcurl http://localhost:8084/continued returning the pre-rehaul iframe HTML. Restarting tinkerdown produced the new content immediately.Severity
Annoying for authors iterating on the home page. Not a correctness bug for non-home pages. The restart workaround is fast.