Code a custom site with AI: from zero to live with Cursor
Advanced · 12 min
Goal: You will build and publish a real coded website with an AI editor — and understand the code it writes.
Route 3 is where AI stops being a shortcut and becomes a skill multiplier: the AI writes code, you direct it, review it and ship it. This episode builds a complete small site with Cursor-style AI editing and deploys it free — no prior coding career required, but honesty included: you must learn to read code, not just paste it.
Steps
- Set up the workshop: Install Cursor (free tier), create an empty project folder, and ask the AI chat inside it to explain the three files it is about to create: index.html (structure), style.css (look), script.js (behaviour). Understanding those three roles is 80% of reading a website.
- Generate the skeleton from your plan: Paste your Episode 2 sitemap and Episode 4 style rules. Ask for the homepage only, semantic HTML, mobile-first CSS, no frameworks. Preview it with a local server or the editor's preview before generating anything else.
- Read every change before accepting: Make the AI explain each block in plain words ('This centres the header'). Reject anything you cannot explain back. This habit is the difference between learning to build and renting a black box.
- Iterate section by section: Header, hero, services, reviews, contact form, footer — one prompt, one check, one save. Use v0-style generation for polished individual components (a pricing table, a gallery) and drop them into your project.
- Deploy free and connect the domain: Push the project to GitHub and deploy on a free static host (GitHub Pages, Netlify or Vercel free tiers). Connect your custom domain when ready, and confirm the HTTPS padlock and the contact form's behaviour (static forms need a form service — free tiers exist).
Tricks and tips
- Commit/save a version after every working section — when an AI edit breaks the page, you return to the last good version instead of debugging blind.
- Ask 'what could break?' after each big generation; AI is good at listing its own risks when prompted.
- Keep the site framework-free until you outgrow it — plain HTML/CSS/JS loads fast and never needs a build step.
Practice task
Ship one complete coded page live on a free host, then make three small changes (colour, a new section, a working mobile menu) using AI prompts you fully understand.
Pro level
- Pros brief the AI with constraints, not vibes: file structure, naming rules, 'no inline styles', accessibility requirements — constraints are what separate directed code from generated soup.
- A personal component library (your tested header, cards, forms) makes every new site faster and more consistent than starting from generation.
Free and cheap ways to do this
- Cursor and Windsurf have free tiers sized for learning and small sites; GitHub Copilot has a free tier for individuals — check current terms on their official pages.
- GitHub Pages, Netlify and Vercel all host static sites free, including HTTPS certificates.
- Every debugging question in this episode can be answered by free chat assistants — paste the exact error message, not a description of it.
Only legitimate free routes are listed here — official free tiers and trials, open-source tools, and student discounts. Cracking, piracy and payment workarounds are not recommended.