mirror of
https://github.com/andwati/andwati.com.git
synced 2026-10-18 01:12:53 +00:00
8da5d372d5d8174980556543adbe0df1313352a4
toml-content-loader.ts only read content/ once in load(), so a new entry created through Strapi (or any hand-edit) sat on disk correctly but never appeared on the site until astro dev was restarted. Astro's content layer only auto-refreshes for loaders that wire up the watcher it hands them. Refactored the read into a loadAll() function called both on initial load and on every add/change/unlink event from Astro's dev-mode watcher, scoped to the content directory. Verified live: created a file mid-session, it appeared within ~2s with no restart; deleting it disappeared just as fast. Production builds were never affected (astro build only calls load() once anyway, and always sees the current state of content/).
andwati.com
Languages
TypeScript
92.4%
CSS
5.2%
Dockerfile
2.2%
JavaScript
0.2%