render-static-sites

Deploys and configures static sites on Render's global CDN with routing and headers.

Updated Jul 15, 2026
One-click install
npx skills add https://github.com/greenmartialarts/EventCore --skill render-static-sites-greenmartialarts
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: render-static-sites
Source: https://github.com/greenmartialarts/EventCore/tree/main/.junie/skills/render-static-sites
Command: npx skills add https://github.com/greenmartialarts/EventCore --skill render-static-sites-greenmartialarts

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Deploying a static frontend involves many small decisions—build commands, publish paths, SPA fallback routing, redirect rules, and cache headers—and getting any of them wrong leads to 404s on refresh, stale content, or misconfigured caching. This Skill provides the exact configuration patterns for hosting static sites on Render's CDN. ## Core Features & Use Cases - Framework build presets: Ready-made build commands and publish paths for React, Vite, Next.js static export, Hugo, Gatsby, Docusaurus, Jekyll, Astro, Angular, and more. - SPA routing and redirects: Catch-all rewrite rules so client-side routes serve index.html, plus ordered redirect rules for legacy URLs. - Custom headers and PR previews: Security headers, immutable cache policies for hashed assets, and automatic per-pull-request preview URLs. - Use Case: You have a Vite React app and need it live on a CDN with SPA routing. The Skill gives you the Blueprint with buildCommand: npm ci && npm run build, staticPublishPath: dist, and the catch-all rewrite to /index.html. ## Quick Start Deploy my Vite React app as a Render static site with SPA fallback routing and security headers.

Frequently Asked Questions about render-static-sites

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I deploy a React or Vite app to Render as a static site?

Create a Render static site with buildCommand `npm ci && npm run build` and staticPublishPath `dist` for Vite or `build` for Create React App. Add a rewrite rule from `/*` to `/index.html` so client-side routes work on refresh.

Should I use a Render static site or a web service for my frontend?

Use a static site for pure HTML/CSS/JS, SPAs, and static exports from frameworks like Next.js or Nuxt. Use a web service when the app needs a running server, such as Next.js SSR with `next start`, since static sites cannot run server code.

Why does my SPA return 404 when refreshing a route on Render?

The CDN returns 404 because no file exists at that path. Add a catch-all rewrite rule with source `/*` and destination `/index.html`, placed after any specific redirect rules, so the client-side router handles the path.

Can a Render static site call my API over the private network?

No. Static sites are served from the CDN and are not on Render's private network, so they cannot reach other services via internal hostnames. Your frontend must call the API over its public URL, with CORS headers configured if needed.

How do I set cache headers for static assets on Render?

Add a headers rule for `/assets/*` with `Cache-Control: public, max-age=31536000, immutable`, since bundlers like Vite content-hash filenames. Set `/index.html` to `no-cache` so the entry point is always revalidated after deploys.

Does Render support PR previews for static sites?

Yes. Enable PR previews in Dashboard Settings or set `previews.generation` to `automatic` in a Blueprint. Each pull request gets a unique URL following the pattern `<service>-<pr-id>.onrender.com`.