Rules and patterns for deploying this site to Netlify
This site is deployed to Netlify from the main branch. Every push to main triggers an auto-build.
| Key | Value |
|---|---|
| Site name | hs-clinic-dental-tourism-v2 |
| Domain | drhaithamsharshar.com |
| App URL | https://app.netlify.com/projects/hs-clinic-dental-tourism-v2 |
| GitHub repo | drsharshar89/HS-CLINIC |
| Branch | main (auto-deploy) |
The build command in netlify.toml:
[build]
command = "npm install --legacy-peer-deps && npx playwright install chromium && npm run build"
publish = "dist"
[build.environment]
NODE_VERSION = "22"
npm run build)vite build → produces dist/ with JS bundlesnode scripts/generate-sitemap.mjs → queries Sanity, writes dist/sitemap.xmlnode scripts/prerender.mjs → Playwright snapshots all routes into static HTMLThe prerender step requires Playwright Chromium. This is not pre-installed on Netlify.
Rules:
npx playwright install chromium — installs only Chromium (fast, works)npx playwright install --with-deps chromium — requires sudo which Netlify sandbox forbidsnpx playwright install — installs ALL browsers (too slow, unnecessary)These must be set in Netlify's dashboard (Site Settings → Environment Variables):
| Variable | Value | Scope |
|---|---|---|
VITE_SANITY_PROJECT_ID | nk38o90y | All deploy contexts |
VITE_SANITY_DATASET | production | All deploy contexts |
https://app.netlify.com/projects/hs-clinic-dental-tourism-v2/deploys/<deploy-id>npx playwright install chromiumnetlify.toml)--legacy-peer-deps flag/* → /index.html (200) for client-side routingwww.drhaithamsharshar.com → drhaithamsharshar.com (301)netlify.toml