Going live — Fitbricks Astro
Before the Fitbricks site goes public, replace the demo’s gym with yours, replace the videos and the legal pages and point the forms at you; then build it and put it on any static host, and check it again.
Replacing the demo’s gym means its brand, Waras, its clubs, trainers, programs, photos and contact details; pointing the forms at you means giving the contact, free-trial and booking forms 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. Canonical links, 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; Home’s browser title, meta.title in src/content/pages/home.json; the share image’s description, shareImage.alt, in src/lib/meta.ts |
Your brand instead of “Waras”: the logos, the copy (“WARAS”, “Waras Gym”), the @warasfit.com e-mails, the Instagram handle |
Search src/content/ for “Waras” and “warasfit” (Editing the content) |
Contact details: the main office, the phone numbers, the addresses and hours of every club, the trainers’ e-mails and phones, the footer’s example.com e-mails |
contact.json, clubs.json, trainers.json, footer.emails in site.json |
| Social links and store badges (they open the networks’ and stores’ home pages) | socials, appBadges and footer.gallery.href in src/content/site.json, the trainers’ socials, the gallery link in about.json |
| The program videos replaced (they are other creators’ YouTube videos, kept as examples) | video of every program in src/content/collections/programs.json |
The legal pages written for your business (they are samples for the demo gym, with [Your Country/State]) |
src/content/collections/legal.json (Editing the content) |
| Your programs, plans and prices, categories, cities, clubs, facilities, trainers and posts | src/content/collections/ |
| The demo’s numbers and testimonials (“30+ Clubs in 10 Cities”, “95%”, the members’ quotes) | home.json, about.json, clubs.json, city.json in src/content/pages/ |
| Logos replaced | src/assets/images/logo-light.svg, logo-dark.svg, logo-black.svg (Making it look like your brand) |
| Browser icons replaced | public/icon.svg, public/apple-icon.png |
| Share image replaced and described | public/opengraph-image.png, its description in src/lib/meta.ts |
| Demo photos replaced, and the app mock-ups if you show your own app | src/assets/images/ |
| Page titles and descriptions written for your site | The meta of each file in src/content/pages/ |
| The forms deliver to you | 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 “Waras”, the sample e-mails and phones, the demo’s clubs and trainers, the example videos or the sample legal texts 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
file 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, club/<slug>.html) and served at clean addresses (/about). Netlify and
Cloudflare Pages do that by default; on Vercel, the included vercel.json sets "cleanUrls": true (it also turns off
Vercel’s automatic deployments from Git: remove "git": { "deploymentEnabled": false } if you want them).
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;
One demo program has parentheses in its address, /program/ride-(cycling), as in the original design. Common hosts
serve it as it is; check that page after uploading, or give the program a plain slug.
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 menu on desktop, the tablet and phone menus, and the header over Home’s photo as you scroll;
- the member quotes in Home’s hero and the testimonials;
- Programs, Clubs, a city and Trainers loading more items as you scroll, and the category and city filters;
- a program with its video and plans, a club with its booking form, a trainer, a post;
- the footer’s links and the legal pages.
- Write to yourself on the live site — a contact message, a free-trial request and a booking — and reply to one.
- Verify the share card. Paste the URL of the home page and of a program 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 class, club or trainer is one entry in
src/content/collections/, a new post one entry at the top ofposts.json; see Editing the content. Connect a CMS (Using a headless CMS) if staff who don’t use a code editor will publish.
Performance and SEO
Section titled “Performance and SEO”The template ships with what search engines look for:
- pre-rendered HTML, with links in it to every page — every card of the lists that load on scroll too;
- one
<h1>per page, and a title and description for every page; - canonical links,
sitemap.xml,robots.txtand share cards (programs, clubs, trainers and posts with their own photo; posts as articles, with their date); - sized, lazy-loaded images that keep their space while they load;
- YouTube players that load only when the visitor clicks play.
Keeping the site fast is mostly about images. Export photos at the size they are shown, not the size your camera produced; the placeholders show the size each one was designed for.