Skip to content
Sign inJoin waitlist

Editing the content — Fitbricks Astro

All the words and images of this Astro template live in src/content/, in plain JSON files you edit while npm run dev shows the result.

No CMS is needed: text goes between double quotes and items are separated by commas (none after the last one). If you would rather manage content in Sanity, Payload, Strapi or Directus, see Using a headless CMS.

src/content/
site.json name, description, domain, logo, menu, the header's button, the CTA band, the trainers
band, the store badges, socials, the footer
pages/home.json the copy of the home page and how many items its lists show
pages/about.json …and of every other page
collections/*.json programs, program categories, cities, clubs, facilities, trainers, posts, legal pages
routes.ts the URL of every page
schemas.ts the fields each kind of item has

Not sure which file holds a piece of text? The page maps label every section of every page with its file.

src/content/site.json holds what appears on every page:

Entry Shown where
site.name The browser title suffix (“Programs | Fitbricks”), share cards, the share image’s description
site.title The browser title of a page that gives none (Home has its own: meta.title in pages/home.json)
site.description Search results and share cards of Home, and of any page without its own description. It describes the template: write yours.
site.url Set this to your domain before publishing. Canonical links, share links, sitemap.xml and robots.txt are built from it.
logo The light and dark logo files, the logo’s name for screen readers and where it links (Making it look like your brand)
navigation The menu in the header: Home, About, Programs, Trainers, Club, Blog
headerAction The header’s button, “Claim free trial”
ctaBand The band above the footer (“Take the first step toward a stronger you”): title, text, the “Contact us” button, the main office and the background photo
trainersBand The trainers band on About, Clubs and the city pages: eyebrow, title, text, how many trainers (count, 3), the card’s action and “All Trainers”
appBadges The Google Play and App Store badges (Home’s app section, the footer): where they link and their light and dark images
socials Instagram, Facebook, X and YouTube: the footer’s Social column
footer The tagline, the contact e-mails, the four columns (Programs, Pages, Resources, Social), the Instagram grid (four photos, the handle and its link) and the copyright ({year} becomes the current year)
controls The names screen readers hear for the menu, the quote dots and the carousel arrows

The pages that show the CTA band and the trainers band say so in their own copy ("ctaBand": true, "trainersBand": true in src/content/pages/*.json): set one to false to drop the band from that page. The entries named rule and pages in the JSON files are notes that describe what the code does; changing them changes nothing.

The footer’s columns are read by position: the first lists the first five programs (programs.count), the third adds every legal page after its links, the fourth lists socials. The social links and the store badges open the networks’ and stores’ home pages: point them at your own profiles and your app, or remove them.

There is one file per page in src/content/pages/. Each holds the parts of that page and, for the pages with one address, a meta entry:

{
"meta": {
"title": "About",
"description": "At WARAS, fitness isn’t a finish line — it’s a lifestyle…"
},
"eyebrow": "About Us",
"title": "Building Stronger, Healthier Lives — Together."
}

meta.title is the browser tab and the share card (“About | Fitbricks”), meta.description the search results and share cards (80–160 characters). JSON has no comments, and a missing or extra comma breaks the file: npm run dev names the file and the line.

Change the text between the quotes, keeping the field names: the sections read them by name. Apostrophes are safe inside the quotes, and the demo uses the typographic ’. A double quote inside a text needs a backslash before it (\"). Words in braces are filled in by the page: {name} with the item’s name, {city}, {category}, {description}, {date}.

File Page
home.json Home: its browser title (meta.title), the hero (badge, title, lead, two buttons, photo, the members’ quotes), the three facts, “Why Choose Us” (membership), the clubs, the coaching cards, the Pilates Reformer promotion (promo), the programs, the testimonials, the app features, the blog, and how many clubs, programs and posts each block shows (below)
about.json About: the title, the lead, the photo with the statement and two facts, “Why Choose WARAS?”, vision and mission, the gallery
programs.json Programs (/program): the title, the category filter’s labels, how many programs load at a time (list.pageSize, 6)
program.json Every program page: the labels of the facts and the levels, “Key Benefits”, “Program Details”, the plans’ currency and period, the sidebar’s titles, “Other Programs”
program-category.json Every category page: “{name} Class”, the filter, list.pageSize
clubs.json Clubs (/club): the title, the city filter’s “All”, list.pageSize (6)
club.json Every club page: “About {name}”, the hours and information labels, “Facilities”, “Popular Classes”, the booking form (Forms), “More in {city}”, “Other Club Location”
city.json Every city page: its browser title and description, the title (the city’s name), list.pageSize
trainers.json Trainers (/trainer): the title, how many trainers load at a time (list.pageSize 6 on desktops, pageSizeSmall 4 below)
trainer.json Every trainer page: the title and description patterns, “Let’s Create Something Amazing”, “Follow me”, the programs block, “Other Trainers”, the social icons
free-trial.json Free trial: the photo, the title, the text, “What’s Included” and the form (Forms)
contact.json Contact: the title, the main office, the service hours, the form, “Find Your Nearest Club” and the nine FAQ answers
blog.json Blog: the title, how many posts load at a time (list.pageSize, 5)
post.json Every post page: the “Blog” crumb, “Recent posts” and “Related Articles” with their counts
legal.json “Last Updated: “ on the legal pages
not-found.json The 404 page: its browser title, “404”, the title, the text, the button and the photo

src/content/collections/ holds the lists the site builds pages and sections from:

File What it feeds
programs.json One page per program; Programs; a category page; Home’s programs; a club’s “Popular Classes”; a trainer’s programs; the footer’s Programs column; the free-trial form’s Preferred Class
program-categories.json One page per category; the category filter; the class type and symbol on every program card
cities.json One page per city; the city filter on Clubs; the city on every club card; the free-trial form’s Preferred Location
clubs.json One page per club; Clubs; a city page; Home’s and Contact’s clubs
facilities.json The “Facilities” list of a club page (no page of their own)
trainers.json One page per trainer; Trainers; the trainers band
posts.json One page per post; Blog; Home’s blog; a post’s “Recent posts” and “Related Articles”
legal.json One page per legal text: /legal/privacy-policy, /legal/terms-conditions; the footer’s Resources column

Every collection shows in the order of its file, except posts: they are sorted by date, newest first (posts of the same day keep their order in the file). Items name each other by slug: a program its category, a club its city, its facilities and its programs, a trainer their programs.

Copy an existing entry, paste it, and change the values (the comments here explain the fields; JSON itself takes none):

{
"slug": "boxing-basics", // the URL: /program/boxing-basics
"name": "Boxing Basics", // the card, the page title, the browser title
"category": "cardio", // a slug of program-categories.json
"level": "medium", // "easy", "medium" or "hard"
"duration": 45, // minutes: "45 min"
"instructor": "Certified Boxing Coach", // plain text on the page's facts (not a link to a trainer)
"subtitle": "Learn to punch with power…", // the heading over "About the Class"
"image": { "src": "/images/program-boxing-basics.jpg", "alt": "…" }, // the card, the cover and the share image
"video": "https://www.youtube.com/watch?v=…", // the YouTube video on the page
"about": [ …rich text… ], // "About the Class"; its first paragraph is the search description
"benefits": [ …rich text… ], // "Key Benefits"
"details": [ …rich text… ], // "Program Details"
"plans": [ // "Choose Your Perfect Plan": the demo has two per program
{ "name": "Standard Plan", "description": "…", "price": 55, "includes": ["8 Classes per Month", "…"] }
]
}

A new program gets its page, its card on Programs and on its category’s page, and its sitemap entry on the next build. To show it on a club or a trainer page, add its slug to that club’s or trainer’s programs.

Add Fields
Category (program-categories.json) slug, name, color (the symbol’s fill on cards and in the filter, a hex value), icon ({ src, alt }, a white line icon in SVG) and description (the category page’s text and search description)
City slug and name. Clubs join it through their city.
Club slug, name, city (a city slug), location (the neighbourhood on cards), image, gallery (four photos), about (paragraphs; the first is the search description), facilities and programs (slugs, in the order shown), address, mapUrl (“Show on map”), phone and phoneHref, email and emailHref, hours (weekdays, weekends)
Facility slug, name, description, image
Trainer slug, name, title (the role), summary, image, about (paragraphs), programs (slugs), email / emailHref, phone / phoneHref, socials (a list of { name: "facebook" | "instagram" | "x", label, href }; href: null shows the icon without a link)
Post slug, title, category (a name such as “Fitness Tips”, shown on the card; posts of the same category are “Related Articles”), date ("2025-08-18", shown as “Aug 18, 2025”), excerpt, image, body (rich text)

Clubs and trainers show the paragraphs of their about; headings or lists there are left out.

The Default category (/program-category/default) is the original design’s catch-all: it has a page, which is empty, and it is left out of the filters, where its colour marks “All Class” (src/components/sections/programs/category-filter.ts). Keep it as it is, or delete its entry from program-categories.json (no program uses it): its page and its sitemap entry go, and “All Class” falls back to the orange.

Delete the entry. Its page and its sitemap entry disappear on the next build. Remove its slug from the items that name it (a club’s facilities and programs, a trainer’s programs): a slug with no item is skipped. Move the programs of a category, or the clubs of a city, before you remove it: a program whose category is missing stops the build (its card has no icon to show), and a club whose city is missing shows the slug as its city and links to a page that no longer exists.

src/content/schemas.ts is the reference: it lists every field with a comment for the ones that are not obvious. npm run check reads every collection against it and names the item and the field that is wrong.

No list has items of its own: each takes the first items of a collection, in the order of the file, or the items an entry names.

Block Shows Change it with
Home: clubs The first six clubs clubs.count in home.json, or the order of clubs.json
Home: programs The first six programs programs.count in home.json
Home: blog The first six posts (four on phones) blog.count, blog.countPhone in home.json
Trainers band (About, Clubs, a city) The first three trainers trainersBand.count in site.json
Footer: Programs The first five programs footer.columns[0].programs.count in site.json
Contact: “Find Your Nearest Club” The first six clubs clubs.count in contact.json
A club: “Popular Classes”, “Facilities” The club’s programs and facilities, in that order the club’s entry
A club: “More in {city}” Every club of its city, this one included —
A club: “Other Club Location” The first six clubs of the other cities other.count in club.json
A program: the sidebar The other programs of its category (at most six), then every category but Default sidebar.count in program.json
A program: “Other Programs” The first six programs of the other categories other.count in program.json
A trainer: “My Fitness Programs” The trainer’s programs the trainer’s entry
A trainer: “Other Trainers” The other trainers (six; four on tablets and phones) other.count, other.countSmall in trainer.json
A post: “Recent posts” The first six other posts recent.count in post.json
A post: “Related Articles” The other posts of its category (six; four on phones) related.count, related.countPhone in post.json
Free trial: Preferred Class The first ten programs count of the Class field in free-trial.json

Programs, a category page, Clubs, a city page, Trainers and Blog show a first page of items and load the next as the end of the list comes into view (list.pageSize in their page copy). Every item is in the page’s HTML, so search engines find them all, and visitors without JavaScript see them all at once.

The demo is a complete gym website for a made-up brand. Before you publish, replace:

  1. The photos. Every photo in src/assets/images/ and the share image are grey placeholders showing the size each was designed for (below). The four app mock-ups (app-*.png, feature-app.png) are the template’s own art and ship as they are: replace them with screens of your app, or remove the app sections.
  2. The program videos. Each of the 20 programs embeds a YouTube video (its video field) made by other creators, kept as examples of the layout. Put your own videos there before launch, or remove the video from src/components/sections/program/ProgramMainSection.astro.
  3. The gym brand, Waras. Its logo, its name in the copy (“WARAS”, “Waras Gym”), the @warasfit.com e-mails, the phone numbers and the addresses of the clubs, the trainers and the main office are all made up. Search src/content/ for “Waras” and “warasfit”. The footer’s e-mails use example.com, the Instagram handle is @waras.
  4. The legal pages. The Privacy Policy and the Terms & Conditions in src/content/collections/legal.json are sample texts written for the demo gym, with a placeholder [Your Country/State]. They are not ready to publish: have them written for your business, what your site really does (the forms and the services that receive them, any analytics, the YouTube embeds) and the law where you operate. updated is the date shown as “Last Updated: May 6, 2025”; description is the page’s lead and metaDescription its search description.
  5. The store badges. The App Store and Google Play badges (Home’s app section, the footer) link to the stores’ home pages: point appBadges in site.json at your app, or remove them.

The numbers in the copy (“30+ Clubs in 10 Cities”, “95%”, “1,5K+ Membership”, the prices) and the members’ testimonials are the demo’s too: write your own, or leave them out.

A post body, a legal text and a program’s about, benefits and details are a list of blocks:

"body": [
{ "type": "heading", "level": 3, "text": "1. Start Small" },
{ "type": "paragraph", "text": "Plain text with a **bold** run and a [link](/free-trial)." },
{ "type": "list", "ordered": false, "items": ["First item", "Second item"] }
]
  • Headings: the posts and legal pages use levels 3 and 4, drawn as Heading 3 and Heading 4 and written as h2 and h3 so they follow the page’s h1. The programs’ texts have no headings: the page writes “Key Benefits” and “Program Details” itself.
  • Inline marks: **bold**, text links (an address starting with / stays on the site; others open in a new tab) and \n for a line break. There is no italic.
  • Lists: ordered: true for numbers, false for bullets; each item is a line of text with the same marks.
  1. Put the file in src/assets/images/.
  2. Refer to it in the content as /images/<file>: the site finds it in src/assets/images/ (a missing file stops the build with Image /images/<file> not found).

Sizes and formats are handled for you: Astro resizes every photo when the site builds and serves a scaled, modern format per device. The download’s placeholders show the size each photo was designed for; use photos at least as large:

Photos Demo size
A program’s image (the card, the cover, the share image) 1920 × 1280
A club’s image (the card, the first photo of its page, the share image) 1200 × 800
A club’s gallery (four photos) 800 × 533
A facility’s image 400 × 267
A trainer’s image (the card, the portrait, the share image) 800 × 1200
A post’s image 1200 × 800
Home’s hero, Free trial, the CTA band, the 404 page 1920 × 1280
About: the photo beside the facts, the gallery’s portraits 1200 × 1800
“Why Choose”, the coaching cards 600 × 900
The testimonials 800 × 1200
The members in Home’s hero 160 × 160
The footer’s Instagram grid 400 × 400

The category icons, the logos, the store badges and the social icons are SVG files, served as they are.

Photos in a fixed frame are cropped to fill it, so a photo of other proportions works, but you lose the edges the frame cuts. Frames that follow the screen change shape between phone, tablet and desktop (a program photo is a card and a tall cover), so keep the subject away from the edges.

Every photo written as { src, alt } has an alt: a short description for screen readers and search engines. Write one for each photo you change.

Three things sit outside the content because browsers and social networks ask for them by name:

File What it is
public/icon.svg The icon in the browser tab: the Waras mark, as a vector
public/apple-icon.png The icon on a phone’s home screen (180 × 180)
public/opengraph-image.png The picture shown when someone shares a link (2400 × 1260; 1200 × 630 or larger works)

Replace each file under the same name. The share image’s description for screen readers is shareImage.alt in src/lib/meta.ts (“Fitbricks — gym and fitness website template”, built from site.name), next to its size: change them if your image has another size, and write a description of your own. Every page uses this image when shared, except the program, club, trainer and post pages, which share their own photo.

Almost every word is content, including the forms’ messages. The few interface words that never change per site live in the code:

  • the date format of posts and legal pages (“Aug 18, 2025”) in src/lib/format.ts;
  • the page’s language, lang="en", and og:locale in src/layouts/Layout.astro;
  • the forms’ fallback labels in the design system, used only when the copy gives none.

Search for the word and you will find it.

Terminal window
npm run check
npm run build

A successful check and build mean every content file has the fields it needs and every page still renders. It doesn’t check that the slugs an item names exist or that links written as text ("/contact") lead somewhere: click through the site once with npm run preview after big changes. See Going live for the rest of the checklist.