mirror of
https://github.com/andwati/andwati.com.git
synced 2026-10-23 11:32:16 +00:00
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/).