Performance Tips for Static Sites
Optimize your VitePress site for speed and Core Web Vitals.
Static sites are already fast. Here are ways to keep them that way.
Image Optimization
Use appropriate image sizes. Lazy loads are built in. Consider WebP or AVIF for modern browsers.
Code Splitting
VitePress handles this automatically. Each page loads only what it needs. Heavy components are lazy-loaded.
CDN and Caching
Cloudflare Pages serves from the edge. Set cache headers for static assets. HTML can be cached briefly.