$npx -y skills add ominou5/funnel-architect-plugin --skill deploy-cloudflareDeploys funnel pages to Cloudflare Pages. Covers Wrangler CLI setup, direct upload, custom domains, and Cloudflare-specific optimizations.
| 1 | # Deploy to Cloudflare Pages |
| 2 | |
| 3 | Best for global CDN performance, Workers integration, and free tier generosity. |
| 4 | |
| 5 | ## Prerequisites |
| 6 | - Node.js installed |
| 7 | - Cloudflare account (free tier includes unlimited sites) |
| 8 | |
| 9 | ## Setup |
| 10 | |
| 11 | ```bash |
| 12 | # Install Wrangler CLI |
| 13 | npm install -g wrangler |
| 14 | |
| 15 | # Login |
| 16 | wrangler login |
| 17 | |
| 18 | # Deploy static site |
| 19 | wrangler pages deploy . --project-name=my-funnel |
| 20 | ``` |
| 21 | |
| 22 | ## Configuration (`wrangler.toml`) — Optional |
| 23 | |
| 24 | ```toml |
| 25 | name = "my-funnel" |
| 26 | compatibility_date = "2025-01-01" |
| 27 | |
| 28 | [site] |
| 29 | bucket = "." |
| 30 | ``` |
| 31 | |
| 32 | ## Custom Domain |
| 33 | 1. **Pages project → Custom domains → Set up a domain** |
| 34 | 2. Add CNAME record: `your-project.pages.dev` |
| 35 | 3. SSL is automatic with Cloudflare Universal SSL |
| 36 | |
| 37 | ## Custom Headers (`_headers` file) |
| 38 | |
| 39 | ``` |
| 40 | /*.html |
| 41 | Cache-Control: public, max-age=300 |
| 42 | |
| 43 | /*.css |
| 44 | Cache-Control: public, max-age=31536000, immutable |
| 45 | |
| 46 | /*.js |
| 47 | Cache-Control: public, max-age=31536000, immutable |
| 48 | |
| 49 | /*.webp |
| 50 | Cache-Control: public, max-age=31536000, immutable |
| 51 | |
| 52 | /* |
| 53 | X-Content-Type-Options: nosniff |
| 54 | X-Frame-Options: DENY |
| 55 | Referrer-Policy: strict-origin-when-cross-origin |
| 56 | ``` |
| 57 | |
| 58 | ## Redirects (`_redirects` file) |
| 59 | |
| 60 | ``` |
| 61 | /old-page /new-page 301 |
| 62 | / /index.html 200 |
| 63 | /* /404.html 404 |
| 64 | ``` |
| 65 | |
| 66 | ## Performance Benefits |
| 67 | - Global CDN (300+ edge locations) |
| 68 | - Automatic Brotli compression |
| 69 | - HTTP/3 support |
| 70 | - Free Web Analytics |