mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-10-28 23:57:17 +09:00
## Problem The current-date system resource works in the Webstudio builder but fails in published sites with "dateTime attribute is not set" errors. ## Root Cause The CLI templates' `customFetch` functions handle the `sitemap.xml` local resource but don't handle the `current-date` resource, causing fetch requests to fail when sites are published. ## Solution Added `current-date` handler to all CLI template `customFetch` functions, following the same pattern as the existing `sitemap.xml` handler. ## Changes - Add current-date handler to Remix HTML/XML templates - Add current-date handler to React Router HTML/XML templates - Add customFetch with current-date handler to SSG template - Normalize dates to midnight UTC to prevent hydration mismatches ## Testing The fix ensures that when the Time component uses `system.currentDate`, it will work correctly in published sites, not just in the builder.