Editing the content — Compose Digi Astro
All the words of this Astro template live in src/content/ and its photos in src/assets/images/: plain JSON files you edit while npm run dev shows them.
No CMS is needed: text goes between quotes and entries are separated by commas. If you would rather manage content in Sanity, Payload, Strapi or Directus, see Using a headless CMS.
src/content/ site.json name, title, description, domain, menu, "Contact Us", contact details, cursor labels, footer pages/home.json the copy of the home page pages/about.json …and of every other page pages/service.json the words around every service page (the plan card's labels, "Other Services") pages/project.json the words around every project page ("Overview", "Process", "Outcome", "More Projects") pages/post.json the words around every post ("Posted on", Prev / Next, "More Blog") collections/*.json the services, the projects, the posts and the job openings routes.ts the URL of every page schemas.ts the fields each kind of item has, and which are requiredNot sure which file holds a piece of text? The page maps label every section of every page with its file.
Your details first
Section titled “Your details first”src/content/site.json holds what appears on every page:
| Field | Shown where |
|---|---|
site.name |
The browser title suffix (“About | Compose”), share cards and the logo’s name for screen readers. It is the template’s name in the demo: put your own. |
site.title |
The browser title of the home page |
site.description |
Search results and share cards of the home page and of any page without its own description (the 404 page). 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. |
navigation |
The menu in the header and the phone menu: Home, Services, Projects, About, Blog |
contactLink |
The “Contact Us” button in the header and the phone menu, and the footer’s round arrow button (/contact in the demo) |
menuLabels |
The names screen readers hear for the phone menu button: “Menu” while closed, “Close” while open |
cursorLabels, serviceCursorLabel |
The words of the custom cursor: “View Project” over a project card, “Read” over a post card, “More Details” over a service card |
contact |
E-mail, phone and address: the footer’s bottom line |
footer |
The footer: the big line of its call to action (title, “Tell Us Your New Ideas”), the line under the logo (lead), the three link columns (columns: Links, Support, Social Media), the copyright line (note, after “© tickerLabel) |
The demo’s e-mail (hello@example.com), phone number and address are placeholders: replace them. The phone’s link is
built from the number (001 265 847 483 calls tel:001265847483), so write it the way people should read it. The social
links open the networks’ home pages: point them to your own profiles.
site.json also holds bookCallLink, pageSocials and socials. The pages don’t read them (the style guide shows the
first two): the links you see are in the places below.
Some details are written in more than one file, so change each copy:
| Detail | Where |
|---|---|
| Your e-mail | contact.email in site.json; the job openings’ “How to Apply” texts (careers@example.com, in apply of every item in collections/careers.json) |
Your booking link (“Book a call”, https://cal.com/ in the demo) |
hero.links in home.json; the footer’s Support column (footer.columns in site.json) |
| Your social links | footer.columns in site.json (the footer’s Social Media column, text links); hero.socials in about.json, services.json, service.json, projects.json and blog.json (the round buttons of the page headers); socials of each team member in about.json |
| Your agency’s name (“Compose”) | site.name and site.title in site.json, and the page copy: the leads, the quote and its credit in home.json, the call to action of services.json, the testimonials of the projects, the job openings. Search for it. |
| The numbers (“4.9”, “500+”, “260+”, “5x”…) | hero.rating in home.json (the stars and “Trusted by 500+ Brands Globally”), facts.items in about.json |
| The two “Who are we?” photos | about.images in home.json and intro.images in about.json (the same two files in the demo) |
| The invitation under the project lists (“If you are ready for a change…”) | projects.more in home.json and more in project.json |
Links that start with https:// open in a new tab; mailto: and tel: links open the visitor’s mail app or phone.
Search src/content/ for “example.com”, “cal.com” and “Compose” to find them all.
Page copy
Section titled “Page copy”There is one file per page in src/content/pages/. Most page files hold the sections of that page and a meta entry:
{ "meta": { "title": "About", "description": "Compose blends creativity, data and strategy to elevate brands in the digital world: meet our team, see our numbers and explore open positions." }, "hero": { "eyebrow": "About Us", "title": "Crafting Digital Connections That Drive Growth", "lead": "At Compose, we blend creativity, data, and strategy to elevate brands in the digital world. …", "socials": [{ "label": "Behance", "href": "https://behance.com", "network": "behance" }], "scroll": { "label": "Scroll to Explore", "href": "#start" } }}title becomes the browser tab (“About | Compose”), and description the text in search results and share cards
(80–160 characters). Change the text between the quotes, keeping the field names: the sections read them by name.
Apostrophes are safe inside the double quotes, and the demo uses the typographic ’ and “ ” in places. A straight double
quote inside the text needs a backslash before it (\"). JSON has no comments and no comma after the last entry of a list;
if the site stops building after an edit, that is usually why.
| File | Page or block |
|---|---|
home.json |
Home: the hero (hero: the title, the rating with its four avatars and caption, the lead, the two links “Book a call” and “Our Services”, and tickerLabel, the name screen readers hear for the project ticker), “Who are we?” (about: the title, the lead, two photos, two paragraphs, two buttons), the founder’s quote over a photo (quote), “Our services” (services: the title, the lead, two lines, count, the number of services shown, the rows’ link label and “More Services”), “Our Projects” (projects: the title, tickerCount, the projects of the hero’s ticker, listOffset and listCount, which projects the list shows, and the invitation box more) and “Latest Blog” (blog: the title and count). Home has no meta.title: its browser title is site.title. |
about.json |
About: its meta, the page header (hero), “WHO WE ARE?” (intro: the title, the lead, two photos, the statement, two paragraphs, two buttons), the video card (video, below), the figures and client logos (facts), “Our Team” (team: the title, the lead and the six members) and “Open Positions” (positions: the title, count, the openings shown, and “See all positions”) |
services.json |
Services: its meta, the page header, “Tailored Digital Strategies…” (list: the title, the lead and the cards’ link label), “How we work?” (process, below), the call to action over a photo (cta) and “Testimonials” (testimonials: the title, count, the projects whose testimonial the slider shows, interval, the seconds between two testimonials, and the name screen readers hear for the client chips) |
service.json |
Every service page: the page header’s social buttons and “Scroll to Explore” (the title and lead are the service’s), “What We Offer”, “Key Benefits”, the plan card’s words (plans, below), and “Other Services” (others: the title, count, the link label, “All Services”) |
projects.json |
Projects: its meta, the page header and the list (list: pageSizes, the projects shown at first and added by each press of “Load More” on phones, tablets and desktops, and the button’s label) |
project.json |
Every project page: the headings “Overview”, “Process” and “Outcome”, and “More Projects” (more: the title, count, the invitation text and its two buttons) |
careers.json |
Careers (careers: its meta, “Join Our Team”, the lead, the link label, pageSizes and “Load More”) and every job opening (job: the four headings and “Back to Career page”) |
blog.json |
Blog: its meta, the page header and the list (list: pageSizes and “Load More”) |
post.json |
Every post: the labels “Posted on” and “Posted in” (meta), the Prev / Next labels (nav) and “More Blog” (more: the title and count) |
contact.json |
Contact: its meta, the title (two lines), the lead and the form (form, see Forms) |
not-found.json |
The 404 page: its browser title (meta.title), “404”, the title, the two lines of text and the two buttons |
The page header’s link “Scroll to Explore” (hero.scroll.href, #start) leads to the section whose id is start on the
same page (intro.id, list.id, imageId): keep the two the same.
Every service has two plans, weekly and monthly, each a price written as it should read (“$1,200”) and its lines
(features, as many as you like). The card shows the Weekly plan first and the switch swaps the price and the lines. The
words around them are in service.json → plans: the card’s title is the service’s name followed by titleSuffix
(“Branding and Strategy Package”), weekly and monthly hold the switch’s labels and the units under the price (“per
week”, “per month”), then switchLabel (the name screen readers hear for the switch), includedTitle (“What’s
Included:”) and the button (action, “Book an intro call” to /contact).
The process chart
Section titled “The process chart”“How we work?” on Services draws process.phases in services.json as a two-row chart: each phase has a name, the share
of the project where it starts and ends (from, to, from 0 to 100) and its row (0 or 1). axis lists the percentages
of the dashed lines (0, 25, 50, 75, 100; phones show every other one), and label is what screen readers hear before the
phases, read as a list. Keep the phases in order, each starting where the previous one ends.
Figures, team and client logos
Section titled “Figures, team and client logos”On About, facts.items are the four figures: a value (“260”), a suffix set smaller beside it (“+”, “x”, or "") and a
label. They are text: nothing counts up. facts.logos are the client logos running under them, each a src, an alt
and a width (the space kept for it while it loads: logos are drawn 30 px tall, at their own proportions); logosLabel names the row for screen readers. The demo’s logos are
samples, not real clients: replace them with your clients’ (SVG or PNG, in src/assets/images/) or delete the entries.
team.members are the six cards of “Our Team”: a name, a role, a photo and the socials buttons (label, href
and network, one of behance, dribbble, instagram, twitter or x, which picks the icon). The demo’s names are
fictional.
Collections
Section titled “Collections”src/content/collections/ holds the lists the site builds pages and sections from:
| File | What it feeds |
|---|---|
services.json |
One page per service (/services/<slug>), the cards of Services, the rows of Home’s “Our services” (the first six: services.count in home.json), “Other Services” under a service (the first four others), the footer’s services ticker (the first eight) and the checkboxes of the contact form (one per service, by name) |
projects.json |
One page per project (/projects/<slug>), the cards of Projects, the Home hero’s ticker (the first four: projects.tickerCount), Home’s list (the fourth to the eighth: projects.listOffset 3 and listCount 5), “More Projects” under a project (the first three others) and the testimonial slider of Services (the testimonials of the first three: testimonials.count in services.json) |
posts.json |
One page per post (/blog/<slug>), the cards of Blog, Home’s “Latest Blog” (the first three: blog.count), “More Blog” under a post (the first three others) and its Prev / Next |
careers.json |
One page per job opening (/careers/<slug>), the list of Careers and “Open Positions” on About (the first three: positions.count in about.json) |
The order of the items in the file is the order on the site. The Blog doesn’t sort posts by date: the demo lists them newest first, so put a new post first to show it first, on Home too. Prev and Next under a post follow the same order: Prev is the next item in the file (older), Next the one before it (newer). Every item is in the HTML of its list from the start (“Load More” only shows the hidden ones), so search engines find them all.
Adding a post
Section titled “Adding a post”Copy an existing entry, paste it where it should appear (mind the comma between entries), and change the values:
{ "slug": "measuring-what-matters-in-content-marketing", "title": "Measuring What Matters in Content Marketing", "excerpt": "The few numbers that tell you whether your content brings customers, and how to read them each month.", "image": { "src": "/images/post-measuring-what-matters.jpg", "alt": "A laptop showing a traffic chart on a wooden desk" }, "category": "Web Design", "date": "2026-10-20", "body": [ { "type": "paragraph", "text": "First paragraph.\nA second line in the same paragraph." }, { "type": "heading", "level": 3, "text": "Start with one goal" }, { "type": "paragraph", "text": "A paragraph with a **bold** phrase and a [link](https://example.com)." } ]}Here’s what each field does:
slugis the URL:/blog/measuring-what-matters-in-content-marketing. Use lower-case letters, digits and hyphens.titleis the card’s title and the post’s title.excerptis shown under the title on the cards (Home, Blog, More Blog).imageis the card’s photo, the cover of the post and the thumbnail of Prev / Next;altdescribes it.categoryis shown under “Posted in” on the post page. The demo uses Product Design, UX/UI and Web Design. It decides nothing else.date("2026-10-20") is shown as “Oct 20, 2026” on the cards and the post.bodyis the article (rich text). Its first paragraph is the post’s search description.
Adding a service
Section titled “Adding a service”{ "slug": "influencer-marketing", "name": "Influencer Marketing", "summary": "We match your brand with creators your customers already follow, and run campaigns that turn reach into sales.", "image": { "src": "/images/service-influencer-marketing.jpg", "alt": "A woman filming a product review with her phone" }, "offer": [{ "type": "list", "ordered": false, "items": [[{ "type": "paragraph", "text": "**Creator Search**: …" }]] }], "benefits": [{ "type": "list", "ordered": false, "items": [[{ "type": "paragraph", "text": "**Trusted Reach**: …" }]] }], "weekly": { "price": "$900", "features": ["One creator campaign a week", "Weekly performance report"] }, "monthly": { "price": "$3,200", "features": ["Everything in the Weekly Package", "A monthly creator roster review"] }}slugis the URL (/services/influencer-marketing) and the name projects use to list the service.nameis the title of the service’s page, card and row, the start of its plan card’s title, its name in the footer’s ticker and the label of its checkbox in the contact form (submissions carry it).summaryis the lead of the service’s page, the text of its card and of its row on Home.imageis the photo across the service’s page and the photo of its card.offerandbenefitsare the rich texts under “What We Offer” and “Key Benefits” (lists with a bold lead-in in the demo).weeklyandmonthlyare the two plans (Plans).
Adding a project
Section titled “Adding a project”A project is a case study with its own page:
slug(the URL),title,companyandyear(shown on the cards and above the Overview: “2023,” “EcoSolutions”),summary(the lead of the page and its search description),thumbnail(the photo of the cards, the ticker and the page’s first big image).services: theslugs of the services the project used, shown as links at the top of the page; the first one is the label of the Home hero’s ticker card. A slug that matches no service is left out.testimonial: the client’s words on the project —name,role,photo(a round portrait, shown as decoration since the name is beside it: itsaltcan stay"") andquote. It is shown on the project page and on the cards of Home’s list, and the first three projects’ testimonials make the slider of Services.overview,processandoutcome: the three rich texts of the page, under their headings.mainImage(after the Overview),images(exactly two: the photo that slides in after the Process and the one that grows into place) andfinalImage(after the Outcome).
The demo keeps the accent of “décor” in one slug (digital-strategy-for-a-leading-home-décor-brand): it works, but a
plain slug is easier to type and share.
Adding a job opening
Section titled “Adding a job opening”Each opening in careers.json has a slug (the URL, /careers/senior-software-developer), a title, a type (Remote,
Full Time, Part Time or Freelance in the demo: plain text), a summary (shown on the list and as the page’s search
description) and four rich texts: responsibilities, requirements, benefits and apply, shown under the four
headings of job.headings in careers.json. The demo’s “How to Apply” asks for an e-mail to careers@example.com, and
some requirements hold placeholders in square brackets (“[relevant programming languages and technologies]”): write your
own.
Removing an item
Section titled “Removing an item”Delete the entry (and the comma before it, if it was the last one). Its page and its sitemap entry disappear on the next
build; a removed service also leaves the contact form and the footer’s ticker. Places that link an item as text stay as
they are: check the services of the projects (a removed service’s slug is skipped) and the buttons of the page copy.
Keep at least as many items as the counts in the page copy ask for, or the sections show fewer: four services after the
one on the page for “Other Services”, eight projects for Home’s ticker and list.
What each field means
Section titled “What each field means”src/content/schemas.ts is the reference: it lists every field, which are optional (.optional()), and a comment for
the ones that are not obvious. npm run check and npm run build report a missing field (a misspelled name counts as
missing) with the collection, the item and the field.
Rich text
Section titled “Rich text”A service’s offer and benefits, a project’s overview, process and outcome, a post’s body and a job opening’s
four texts are lists of blocks:
"body": [ { "type": "paragraph", "text": "A paragraph with a **bold** phrase, an *italic* one and a [link](/contact).\nA new line inside it." }, { "type": "heading", "level": 3, "text": "A heading" }, { "type": "list", "ordered": false, "items": [ [{ "type": "paragraph", "text": "**First point:** its text." }], [{ "type": "paragraph", "text": "Second point." }] ] }]- Paragraphs: words between double asterisks (
**…**) are set in bold, words between single ones (*…*) in italics,labelis a link (another site opens in a new tab) and\nstarts a new line. - Headings take the text style of their
level(Heading 3 when it is left out; the posts use 3). Levels 1 to 3 are<h2>elements under the page’s title, 4 is an<h3>, and so on. - Lists:
"ordered": truenumbers the items (1., 2., …), otherwise each gets a bullet. Each item is itself a list of blocks, so an item can hold several paragraphs or a list of its own.
Images
Section titled “Images”- Put the file in
src/assets/images/. - Refer to it in the content as
/images/<file>, with analt.
Astro resizes, compresses and converts the photos (to WebP) when the site builds, so each device gets a size that fits. SVG files are served as they are. The download’s placeholders show the size each photo was designed for; use photos at least as large:
| Photos | Demo size | How it is shown |
|---|---|---|
A project’s thumbnail (project-*-cover.jpg) |
2000 × 1333 (some 2000 × 1121 or 2400 × 1600) | The cards at 535 : 373; the Home hero’s ticker card, 330 px tall (290 on phones); the project page’s first image, a 1120 × 635 window where it settles from 120 % to full size as you scroll |
A project’s mainImage and finalImage (*-main.jpg, *-image-3.jpg) |
2000 × 1121 to 2000 × 1367 | The full width at 3 : 2, moving slower than the page |
A project’s two images (*-image-1.jpg, *-image-2.jpg) |
1200 × 673 to 1200 × 800 | 2 : 1: the first slides in from the right (75 % of the width), the second grows into place from the left (60 %); the full width on phones |
A testimonial’s photo (testimonial-*.png) |
150 × 150 (some 135 × 135) | A 72 px circle on the project page, a 36 px circle in the slider’s chips on Services |
A service’s image |
2200 × 1460 (from 2200 × 1238 to 2000 × 2500) | The service page’s photo across the width at 1200 : 680, growing to full size as you scroll; its card at 353 : 420 |
A post’s image |
2000 × 1333, 2000 × 2500 or 2000 × 3000 | The card at 353 : 420; the post’s cover at 3 : 2; a 72 px thumbnail under another post (Prev / Next) |
“Who are we?” (about-1.jpg, about-2.jpg) |
1100 × 619 and 1100 × 1375 | Home: 545 : 450 and a frame filling the rest of the row; About: 353 : 292 and a column 500 px tall (400 on tablets, 200 on phones) |
The quote band of Home (home-quotes.jpg) |
2400 × 1594 | Behind the quote, the full width, under a dark veil |
The call to action of Services (services-cta.jpg) |
2400 × 3600 | Behind the band, the full width, under a dark veil, moving with the scroll |
The About video card (about-video.jpg) |
2240 × 1654 | The full width behind the Play button and the caption, under a dark veil |
A team member’s photo (about-team-*.jpg) |
720 × 785 | 7 : 9 |
The four avatars of the Home hero’s rating (home-hero-avatar-*.svg) |
42 × 42 | 42 px circles |
The client logos (client-logo-*.svg) |
130–204 × 41 | 30 px tall, at their own proportions, running in a row |
The share image (public/opengraph-image.png) |
2400 × 1260 | Shared links (below) |
Photos in a fixed frame are cropped to fill it, from the centre, 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, so keep the subject away from the edges. A content path that points to a missing file stops the build with its name.
Every photo has an alt: a short description for screen readers and search engines. Write one for each photo you change
(an empty "alt": "" marks a photo as decoration, as the testimonial portraits).
src/assets/images/logo.svg is a copy of the logo for use elsewhere (an e-mail signature, a social profile); the site
draws its logo from Logo.astro (Making it look like your brand).
The video
Section titled “The video”The About page’s video card shows a photo (video.image) with a Play button and a caption (video.caption). Pressing Play
opens the video in a window over the page, played by YouTube; a click outside it or Escape closes it and stops the video.
In the demo it plays the original Framer template’s promotional film: replace it before you publish.
- Upload your video to YouTube (it can be unlisted).
- Copy its id: the part after
youtu.be/orwatch?v=in its address (8AHPXm9Y6mIinhttps://youtu.be/8AHPXm9Y6mI). - Put it in
video.youtubeIdinsrc/content/pages/about.json.
The player starts muted and shows no related videos from other channels; its address is built in src/pages/about.astro
(youtubeEmbed). playLabel, playerTitle and closeLabel are the names screen readers hear for the button, the player
and the close button, and cursor the word of the custom cursor over Play. To remove the card, delete the <VideoCard {...video} /> line from
src/components/sections/AboutVideoSection.astro (Pages and sections).
Files browsers ask for
Section titled “Files browsers ask for”Files that browsers and social networks ask for by name live in public/:
| File | What it is |
|---|---|
public/icon.svg |
The icon in the browser tab: the round Compose mark |
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) |
The share image’s description for screen readers is shareImage.alt in src/lib/meta.ts, next to its size: change
width and height there if your image has another size, and write a description of your own (the demo’s calls the
site a template). Every page uses this image when shared. The demo’s image is the original template’s preview and shows a
sample e-mail address: replace it.
Text that is not in content/
Section titled “Text that is not in content/”Almost every word is content, including the form’s messages (contact.json) and the names screen readers hear. The few
interface words that never change per site live in the code:
- “Main” (the menu’s name for screen readers) in
src/components/site/Header.astro; - the date format of the cards and posts (“Jun 25, 2024”) in
src/lib/format.ts; - the share image’s description in
src/lib/meta.ts; - the YouTube player’s settings in
src/pages/about.astro; - the page’s language,
lang="en", andog:localeinsrc/layouts/Layout.astro.
Search for the word and you will find it.
After editing
Section titled “After editing”npm run checknpm run buildnpm run check compares the collections with their schemas and the page copy with the sections that read it, and names
the file and the field that is missing. A successful build means every page still renders and every image it shows
exists. Neither checks 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.