Going live — Balancee Astro
Before the Balancee site goes public, replace the demo’s content and point the forms at you; then build it, upload it to any host and check it again.
Replacing the demo’s content means its name, details, team, testimonials, services, case studies, posts, legal texts, photos and videos; pointing the forms at you means giving them a destination. Once the site is deployed, click through the live address once more.
Before you deploy
Section titled “Before you deploy”| Where | |
|---|---|
Your domain in site.url (until you change it, it is the demo’s address) |
src/content/site.json. Share links, sitemap.xml and robots.txt are built from it. |
| Name, title and description (they describe the template: write yours) | site in src/content/site.json; the home page’s description in meta of src/content/pages/home.json; the share image’s description, shareImage.alt, in src/lib/meta.ts |
Contact details (hello@example.com, the phone number and the Brooklyn address are placeholders) |
contact in src/content/site.json |
| Your team, the timeline and the awards (the demo’s team is invented) | team, journey in src/content/pages/about.json (Editing the content) |
| Your own testimonials, with their authors’ permission | testimonials in src/content/pages/home.json |
| Your client logos (the demo’s are drawn for it) | clients.logos in home.json and src/assets/images/client-logo-*.svg |
| Your numbers and rating (“$86M+”, “320+”, “4.9”) | about.facts, hero.rating in home.json; hero in about.json; each case study’s results |
| Social links (they open the networks’ home pages) | socials in src/content/site.json; the team members’ href and the awards’ href in about.json |
Booking link (https://cal.com/ in the demo) |
consultation.link.href and ctaBand.secondary.href in src/content/pages/shared.json |
| Logo replaced | src/design-system/components/brand/Wordmark.astro (Making it look like your brand) |
| Browser icons replaced | public/icon-light.svg, public/icon-dark.svg, public/apple-icon.png |
| Share image replaced and described | public/opengraph-image.png, its description in src/lib/meta.ts |
Demo photos replaced, each with its alt |
src/assets/images/ and the content |
| The three Pexels videos replaced with your own (or the sections changed) | video.src in src/content/pages/home.json (Editing the content) |
| Your services, case studies and posts (or the demo’s deleted) | src/content/collections/services.json, portfolio.json, posts.json; Home’s caseStudies slugs; the contact form’s choices in shared.json |
Terms of Service and Privacy Policy written for your business (the demo’s are samples with [Your Company Name] and [URL]) |
src/content/collections/legal.json |
| Page titles and descriptions written for your work | The meta of each file in src/content/pages/ |
The forms deliver to you, with your own notification title |
Forms |
| Style guide kept or deleted | src/pages/style-guide.astro |
npm run check and npm run build pass, and npm run preview looks right |
— |
The demo content is there to be replaced. Leaving “Balancee”, the sample team, e-mail and address, the sample numbers and testimonials, the sample legal texts, or the template’s description on a live site is the most common mistake.
Deploy
Section titled “Deploy”npm run build writes a complete static site to dist/: HTML files, one stylesheet, a few small scripts, the font
files and optimised images. Any host that serves files can run it, with no Node.js needed on the server (unless you
chose server-mode forms).
Vercel, Netlify or Cloudflare Pages (free for most sites)
Section titled “Vercel, Netlify or Cloudflare Pages (free for most sites)”- Push the project to GitHub, GitLab or Bitbucket.
- Import the repository. Astro is detected: build command
npm run build, output folderdist. - Add your form variables (
PUBLIC_FORM_ENDPOINT, …) in the host’s environment settings, then deploy. - Add your domain in the host’s Domains settings and follow the DNS instructions.
Pages are built as files (about.html, portfolio/retail-revive.html) and served at clean addresses (/about).
Netlify and Cloudflare Pages do that by default. On Vercel, add a vercel.json next to package.json:
{ "cleanUrls": true }Any other host (shared hosting, S3, a VPS)
Section titled “Any other host (shared hosting, S3, a VPS)”npm run buildUpload the contents of dist/ to the web root. For clean addresses, make the server try <path>.html:
-
Apache (
.htaccess):RewriteEngine OnRewriteCond %{REQUEST_FILENAME}.html -fRewriteRule ^(.+)$ $1.html [L]ErrorDocument 404 /404.html -
nginx:
try_files $uri $uri.html $uri/ =404;anderror_page 404 /404.html;
Server-mode forms
Section titled “Server-mode forms”If you set PUBLIC_FORM_MODE=server, add your host’s adapter first (npx astro add vercel, netlify, cloudflare or
node). Only the form route runs on the server; every page stays static.
After it is live
Section titled “After it is live”- Check the pages. Click through every page on a phone and a laptop:
- the header and the phone menu, the current page’s pill and the “Contact us” button;
- the Home hero’s video, the logo ticker, the case study accordion and the testimonial video;
- a team card’s bio on hover (desktops), the About timeline and awards;
- the Portfolio and the Blog loading more items as you scroll, a case study, a service page, a post with its “Other blogs”, the legal pages;
- both forms.
- Send yourself a message from the contact form and the newsletter box of the live site, and reply to it.
- Verify the share card. Paste the URL of the home page, of a post and of a case study into https://www.opengraph.xyz or a chat window, and confirm the image and title.
- Tell Google. Add the site to Search Console, verify ownership and
submit
https://yourdomain.com/sitemap.xml. Bing has the same thing in Webmaster Tools. - Analytics, if you want it. Add your snippet to the
<head>insrc/layouts/Layout.astro, or use your host’s built-in analytics (Vercel Analytics, Cloudflare Web Analytics, Plausible, Fathom). None of them need a cookie banner. - Keep it current. A new post is one entry in
src/content/collections/posts.json(at the top of the list, to show it first); see Editing the content, and rebuild. Connect a CMS (Using a headless CMS) if someone else will publish.
Performance and SEO
Section titled “Performance and SEO”The template ships with what search engines look for:
- static HTML, with links in it to every page (the later posts of the Blog and the later case studies of the Portfolio included);
- one
<h1>per page, and a title and description for every page; - canonical links,
sitemap.xml,robots.txtand share cards; - resized, lazy-loaded images that keep their space while they load, each with its
alttext.
Keeping the site fast is mostly about images and videos. Astro resizes the photos, but export them at the size they are shown, not the size your camera produced: a 30 MB camera file still slows the build. The placeholders show the size each one was designed for. Keep each video to a few MB; the hero’s video loads with the page, the other two when they are needed.