Launch

Launch Your Site

Follow these steps when the site looks correct on your computer. Production uses Cloudflare Pages with server-side rendering (SSR).

1. Preview before deploy

Run npm run dev for day-to-day editing. Before going live, run a production build and preview it locally:


                npm run build
npm run preview
              
  • Check main pages in EN and TR
  • Test contact links, forms, and mobile layout

2. Deploy to Cloudflare Pages

From the project root, one command builds and uploads to Cloudflare:


                npm run deploy
              
  • Requires Wrangler CLI logged in (npm install -g wrangler && wrangler login)
  • Output folder: dist/ — wrangler.toml must have nodejs_compat enabled
  • Cloudflare Workers Builds (Git): set deploy command to npm run pages:deploy — not npx wrangler deploy

3. Connect a custom domain

In the Cloudflare dashboard → Pages → your project → Custom domains → add your domain (e.g. www.yourcompany.com). Update DNS as Cloudflare instructs.

Then set the live URL in src/config/site.ts (url field) so sitemap, canonical, and Open Graph links are correct.

4. Keystatic CMS in production (optional)

Locally, Keystatic uses files on your machine. In production it uses GitHub. Add these secrets in Cloudflare Pages → Settings → Environment variables:


                KEYSTATIC_GITHUB_CLIENT_ID=
KEYSTATIC_GITHUB_CLIENT_SECRET=
KEYSTATIC_SECRET=   # at least 32 characters
              
  • Update GITHUB_USER and REPO_NAME in keystatic.config.ts for each client project
  • Admin panel: https://your-domain.com/keystatic

5. Add a blog post (optional)

If sector.features.blog is true, open /keystatic → Blog → create a post. Fill title and summary in EN/TR, publish date, and cover image. The post appears under /blog and /tr/blog after deploy.

After launch checklist

  • Open live home page in EN and TR
  • View Page Source — confirm title and meta description
  • Submit sitemap in Google Search Console (sitemap-index.xml)