Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Comprehensive Cloudflare platform skill covering Workers, D1, R2, KV, AI, Durable Objects, and security.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
references/pages/README.md
1# Cloudflare Pages23JAMstack platform for full-stack apps on Cloudflare's global network.45## Key Features67- **Git-based deploys**: Auto-deploy from GitHub/GitLab8- **Preview deployments**: Unique URL per branch/PR9- **Pages Functions**: File-based serverless routing (Workers runtime)10- **Static + dynamic**: Smart asset caching + edge compute11- **Smart Placement**: Automatic function optimization based on traffic patterns12- **Framework optimized**: SvelteKit, Astro, Nuxt, Qwik, Solid Start1314## Deployment Methods1516### 1. Git Integration (Production)17Dashboard → Workers & Pages → Create → Connect to Git → Configure build1819### 2. Direct Upload20```bash21npx wrangler pages deploy ./dist --project-name=my-project22npx wrangler pages deploy ./dist --project-name=my-project --branch=staging23```2425### 3. C3 CLI26```bash27npm create cloudflare@latest my-app28# Select framework → auto-setup + deploy29```3031## vs Workers3233- **Pages**: Static sites, JAMstack, frameworks, git workflow, file-based routing34- **Workers**: Pure APIs, complex routing, WebSockets, scheduled tasks, email handlers35- **Combine**: Pages Functions use Workers runtime, can bind to Workers3637## Quick Start3839```bash40# Create41npm create cloudflare@latest4243# Local dev44npx wrangler pages dev ./dist4546# Deploy47npx wrangler pages deploy ./dist --project-name=my-project4849# Types50npx wrangler types --path='./functions/types.d.ts'5152# Secrets53echo "value" | npx wrangler pages secret put KEY --project-name=my-project5455# Logs56npx wrangler pages deployment tail --project-name=my-project57```5859## Resources6061- [Pages Docs](https://developers.cloudflare.com/pages/)62- [Functions API](https://developers.cloudflare.com/pages/functions/api-reference/)63- [Framework Guides](https://developers.cloudflare.com/pages/framework-guides/)64- [Discord #functions](https://discord.com/channels/595317990191398933/910978223968518144)6566## Reading Order6768**New to Pages?** Start here:691. README.md (you are here) - Overview & quick start702. [configuration.md](./configuration.md) - Project setup, wrangler.jsonc, bindings713. [api.md](./api.md) - Functions API, routing, context724. [patterns.md](./patterns.md) - Common implementations735. [gotchas.md](./gotchas.md) - Troubleshooting & pitfalls7475**Quick reference?** Jump to relevant file above.7677## In This Reference7879- [configuration.md](./configuration.md) - wrangler.jsonc, build, env vars, Smart Placement80- [api.md](./api.md) - Functions API, bindings, context, advanced mode81- [patterns.md](./patterns.md) - Full-stack patterns, framework integration82- [gotchas.md](./gotchas.md) - Build issues, limits, debugging, framework warnings8384## See Also8586- [pages-functions](../pages-functions/) - File-based routing, middleware87- [d1](../d1/) - SQL database for Pages Functions88- [kv](../kv/) - Key-value storage for caching/state89