$npx -y skills add ominou5/funnel-architect-plugin --skill deploy-netlifyDeploys funnel pages to Netlify. Covers CLI setup, deploy commands, environment variables, custom domains, and redirect configuration.
| 1 | # Deploy to Netlify |
| 2 | |
| 3 | ## Prerequisites |
| 4 | - Node.js installed |
| 5 | - Netlify account (free tier works for funnels) |
| 6 | |
| 7 | ## Setup |
| 8 | |
| 9 | ```bash |
| 10 | # Install Netlify CLI |
| 11 | npm install -g netlify-cli |
| 12 | |
| 13 | # Login to Netlify |
| 14 | netlify login |
| 15 | |
| 16 | # Initialize project (first time only) |
| 17 | netlify init |
| 18 | ``` |
| 19 | |
| 20 | ## Deploy Commands |
| 21 | |
| 22 | ```bash |
| 23 | # Deploy a preview (draft URL) |
| 24 | netlify deploy --dir=. |
| 25 | |
| 26 | # Deploy to production |
| 27 | netlify deploy --dir=. --prod |
| 28 | ``` |
| 29 | |
| 30 | ## Netlify Configuration (`netlify.toml`) |
| 31 | |
| 32 | ```toml |
| 33 | [build] |
| 34 | publish = "." |
| 35 | |
| 36 | # Redirect www to non-www |
| 37 | [[redirects]] |
| 38 | from = "https://www.example.com/*" |
| 39 | to = "https://example.com/:splat" |
| 40 | status = 301 |
| 41 | |
| 42 | # Custom 404 page |
| 43 | [[redirects]] |
| 44 | from = "/*" |
| 45 | to = "/404.html" |
| 46 | status = 404 |
| 47 | |
| 48 | # Headers for performance |
| 49 | [[headers]] |
| 50 | for = "/*.html" |
| 51 | [headers.values] |
| 52 | Cache-Control = "public, max-age=300" |
| 53 | |
| 54 | [[headers]] |
| 55 | for = "/*.css" |
| 56 | [headers.values] |
| 57 | Cache-Control = "public, max-age=31536000, immutable" |
| 58 | |
| 59 | [[headers]] |
| 60 | for = "/*.js" |
| 61 | [headers.values] |
| 62 | Cache-Control = "public, max-age=31536000, immutable" |
| 63 | |
| 64 | [[headers]] |
| 65 | for = "/*.webp" |
| 66 | [headers.values] |
| 67 | Cache-Control = "public, max-age=31536000, immutable" |
| 68 | ``` |
| 69 | |
| 70 | ## Custom Domain |
| 71 | 1. Go to **Site settings → Domain management → Add custom domain** |
| 72 | 2. Add a CNAME record pointing to `[site-name].netlify.app` |
| 73 | 3. Enable HTTPS (automatic with Let's Encrypt) |
| 74 | |
| 75 | ## Environment Variables |
| 76 | Set via Netlify dashboard: **Site settings → Environment variables** |
| 77 | Or via CLI: `netlify env:set KEY value` |
| 78 | |
| 79 | ## Form Handling |
| 80 | Netlify has built-in form handling — add `netlify` attribute: |
| 81 | ```html |
| 82 | <form name="lead-capture" method="POST" data-netlify="true"> |
| 83 | <input type="email" name="email" required> |
| 84 | <button type="submit">Subscribe</button> |
| 85 | </form> |
| 86 | ``` |