Date: 2026-08-13 08:05 Summary: All HTML from R2 is feasible; only homes still prefer Assets; static/API stay on Worker/Assets.
[question] 如果坚持所有页面来自R2呢,是否能够实现
[try to solve]
Yes. If “all pages” means all HTML: tools/about/taxonomy already use Cache→R2; only homes still prefer Assets with R2 fallback. Changing serveHomeHtml to R2-only (same as servePrerenderedHtml) makes all site HTML come from R2. The Worker still owns routing, Accept-Language, APIs, and verification files. Keep css/js/vendor/sitemap/robots on Assets; they need not go into R2. Ship with build:site + upload:r2 (optional PAGES_CACHE_VERSION); home HTML no longer depends on git push. Cost: home cold path similar to tool pages (miss hundreds of ms); hot HIT is close to Assets. Putting all static assets in R2 is technically possible but poor ROI — not recommended.
[actions]
- Read-only feasibility note