Editing the content — Lookis 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 the result.
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, owner, contact details, booking link, socials, footer pages/home.json the copy of the home page pages/about.json …and of every other page pages/shared.json the testimonials and the "See what I do" band, shown on several pages collections/*.json the portfolio and the services 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 | Lookis”), share cards and the logo’s name for screen readers. It is the template’s name in the demo: put your own (your name, or your studio’s). |
site.title |
The browser title of the home page |
site.description |
Search results and share cards 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): Portfolio, About, Services, Contact |
owner |
place (“Asheville, (NC)”) and timeZone (an IANA time zone, America/New_York): the place and the live clock at the left of the header on desktop and in the open phone menu. name is only used by the style guide. |
bookingHref |
The “Schedule a call” button of every service page |
contact |
E-mail and phone with their labels (“Email :”, “Phone :”): the footer’s Contact column |
socials |
The social links: under the Home photo, on About and Contact, and the footer’s Social column |
footer |
The footer: its background photo (image), the title and line of the call (title, text) and its button (action), the column titles (quickLinksLabel, contactLabel, socialLabel), the Quick Links (quickLinks), the contact page link (contactAction) and the copyright line (note, where {year} becomes the current year) |
The demo’s e-mail (hello@example.com) and phone number are placeholders: replace both. The phone’s link is built from
the number ((555) 123-4567 calls tel:5551234567), so write it the way people should read it. The social links open
the networks’ home pages: point them to your own profiles.
The booking link appears three times, as https://cal.com/ in the demo: bookingHref (service pages),
footer.action.href (“Schedule a call” in the footer) and hero.primary.href in src/content/pages/home.json (“Book a
session”). Put your booking page in all three, or /contact.
Links that start with https:// (the booking links, the social links, the awards, the Instagram button) open in a new
tab; mailto: and tel: links open the visitor’s mail app or phone.
The demo’s photographer, Daniel Mercer, and his town, Asheville, appear in many places: the copy of every page, the
testimonials, the projects, the footer’s copyright line, site.json’s owner and the logo, which draws his name
(Making it look like your brand). Search src/content/ for “Daniel” and “Asheville” to find them all.
Page copy
Section titled “Page copy”There is one file per page in src/content/pages/. Most hold the sections of that page and a meta entry:
{ "meta": { "title": "About", "description": "Daniel Mercer is a photographer based in Asheville, North Carolina: his story, his numbers and…" }, "intro": { "label": "About me", "title": "Hello, I’m Daniel Mercer, a photographer based in Asheville, North Carolina." }}title becomes the browser tab (“About | Lookis”), 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 ’. A double quote inside the text needs
a backslash before it (\"), as in the testimonials’ quotes. 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 |
|---|---|
home.json |
Home: its meta, the hero (name, the photographer’s name running across the top; the photo; the introduction; “Book a session” and “See my portfolio”), “About me” (about: the title, three paragraphs, the closing line, two buttons and four photos), “Selected Projects” (projects: the heading, the button and count, the number of projects shown), “My numbers” (facts: the heading, four numbers with a line each, the photo) and the heading of “My Services”. When meta.title is the same as site.title, the page’s browser title is site.title alone. |
about.json |
About: its meta, the page photo (image), the top (intro: the label, the portrait, the page title), “My little story” (story: the title, two photos, three paragraphs and “See my service”), the four numbers (facts) and “Awards & Recognitions” (awards: the title, the awards, the photo and imageAfter, the award the photo follows) |
portfolio.json |
Portfolio (portfolioPage: its meta, the heading, the “All” tab and the tabs’ name for screen readers, the text screen readers hear while more projects load) and the words of every project page (projectPage: “Date”, “Service”, “Overview”, “Project Gallery”, “Related Projects”) |
services.json |
Services (servicesPage: its meta, the heading with two paragraphs and the photo, the questions) and the words of every service page (servicePage: “Price :”, “Schedule a call”, “Perfect for”, “What’s Included”, “Other Services”) |
contact.json |
Contact: the page (contact: its meta, the page photo, the top with the portrait, three paragraphs and the title of the form card) and the form (contactForm) (Forms) |
shared.json |
The testimonials band (testimonials) on Home, Services and every service page, and the “See what I do” band (showcase: the heading, “Contact me”, the Instagram button and five photos) above the footer on Home, About, Portfolio, Services, every service page and Contact |
not-found.json |
The 404 page: its browser title (meta.title), the photo, “404”, the title and the two buttons |
Awards
Section titled “Awards”Each award in awards.items (about.json) is a card link: year, title, by (who gave it) and href (the page it
opens, in a new tab). The demo’s links point at a placeholder site: link the real page of each award, or a page about it
on your site. The photo of the block comes after the award numbered imageAfter (3 in the demo); a number larger than
the list leaves the photo out.
Questions
Section titled “Questions”The questions of the Services page are servicesPage.questions.items in services.json, each a question and an
answer (plain text). They are numbered 01, 02, … in their order and all start closed.
Testimonials
Section titled “Testimonials”The testimonials are not a collection: they are testimonials.items in src/content/pages/shared.json, shown as a
slideshow on Home, Services and every service page. Each has a quote (the demo writes it with its quotation marks,
\"…\"), a name (shown as written: the demo’s start with “— “), a role (the line under the name; the demo names the
service) and a photo (src, alt). Add or remove entries freely: the slideshow loops through however many there are.
previousLabel and nextLabel are the arrows’ names for screen readers.
Collections
Section titled “Collections”src/content/collections/ holds the lists the site builds pages and sections from:
| File | What it feeds |
|---|---|
portfolio.json |
Portfolio (every project, four at a time as the visitor scrolls, filtered by service), one page per project, Home’s “Selected Projects” (the first six: projects.count in home.json) and “Related Projects” at the end of a project page (up to three other projects of its service) |
services.json |
The service rows of Home, the service cards of the Services page, one page per service, “Other Services” at the end of a service page (the first three others), Portfolio’s filter tabs (one per service, after “All”) and the service named on each project page |
The order of the items in the file is the order on the site. Portfolio doesn’t sort projects by date: the demo lists them newest first, so put a new project first to show it first, on Home too. Every project is in Portfolio’s HTML from the start, so search engines find them all.
Adding a project
Section titled “Adding a project”Copy an existing entry, paste it where it should appear (mind the comma between entries), and change the values:
{ "slug": "harbour-mornings", "title": "Harbour Mornings", "summary": "Fishermen and early light on the coast of Maine.", "date": "2026-05-20", "service": "travel-documentary", "details": [ { "type": "paragraph", "text": "First paragraph.\nA second line in the same paragraph." }, { "type": "paragraph", "text": "Shot in *digital* and 35mm film." } ], "image": { "src": "/images/portfolio-harbour-mornings.jpg", "alt": "Boats moored in a calm harbour at dawn" }, "gallery": [ { "src": "/images/portfolio-harbour-mornings-1.jpg", "alt": "…" }, { "src": "/images/portfolio-harbour-mornings-2.jpg", "alt": "…" } ]}Here’s what each field does:
slugis the URL:/portfolio/harbour-mornings.titleis the card’s title and the page’s title.summaryis shown under the title on the card and the page, and is the page’s search description (followed by the start of the details when it is under 80 characters).date("2026-05-20") is shown as “May 20, 2026” on the project page.serviceis theslugof a service inservices.json: the filter tab the project appears under, the “Service” shown on its page and the projects listed under “Related Projects”. A slug that matches no service leaves “Service” out and the project only under “All”.detailsis the text under “Overview” (rich text).imageis the card’s photo and the tall photo beside the project page.galleryholds the photos under “Project Gallery”, one under the other, as many as you like (five in the demo).
Adding a service
Section titled “Adding a service”{ "slug": "family-sessions", "name": "Family Sessions", "summary": "Relaxed, playful portraits of the people you love.", "price": "$400 – $700", "image": { "src": "/images/service-family-sessions.jpg", "alt": "…" }, "content": [ { "type": "paragraph", "text": "*A short lead in italics.*" }, { "type": "paragraph", "text": "What the session is like." } ], "perfectFor": ["Young families", "Grandparents' visits", "Milestones", "Weekend afternoons"], "included": ["A planning call", "A 1-hour session", "30–50 edited images", "An online gallery", "Prints on request"]}slugis the URL:/services/family-sessions, and the value projects use in theirservicefield.nameis the label above the service page’s title, the title of the rows and cards, and the Portfolio tab.summaryis the service page’s title (its<h1>), the text of the rows and cards, and the page’s search description (followed by the start of the second paragraph ofcontentwhen it is under 80 characters).priceis plain text (“$350 – $600”), shown in a pill on the rows and cards and beside “Price :” on the page.imageis the tall photo beside the service page and the photo of Home’s row.contentis the text under the price (rich text); the demo starts it with a short lead in italics.perfectFor(up to four) andincluded(up to five) are the two numbered lists of the page. An empty entry ("") leaves its row out without renumbering the others, as in the original design.
A new service gets its page, a row on Home, a card on Services, a tab on Portfolio and an entry in sitemap.xml on the
next build. The tabs follow the order of services.json; a service with no project shows an empty list under its tab.
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. Before you delete a service, move its projects to another service: a project whose service matches nothing loses
its “Service” line. Places that link an item as text stay as they are: check the buttons and links of the page copy.
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 project’s details and a service’s content are lists of paragraphs:
"details": [ { "type": "paragraph", "text": "A plain paragraph with an *italic* word." }, { "type": "paragraph", "text": "Shot in digital + 35mm film.\nEdited with warmth and restraint." }]Text is plain apart from three marks: words between double asterisks (**…**) are set in bold, words between single
asterisks in italics, and \n starts a new line inside a paragraph. There are no links inside the text. Inter is loaded upright only, so an italic word is
the browser’s slanted version of the regular text (Making it look like your brand).
The component that draws rich text (RichText) can also draw headings and lists (the style guide shows them), but the
collections’ schema accepts paragraphs only. To use them, widen richTextSchema in src/content/schemas.ts to the
shape of RichTextBlock in src/design-system/types.ts.
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. 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 |
|---|---|---|
The Home hero photo (hero.jpg), the testimonials band (testimonials.jpg) |
2400 × 1600 | The full width of the page; the hero is as tall as the window under the name, the band 750 / 600 / 650 px tall on desktop / tablet / phone |
The footer’s photo (footer.image, the hero photo in the demo) |
2400 × 1600 | Behind the footer card, the full width |
| The 404 photo | 1920 × 1280 | The whole window, cropped |
| The tall photo beside About, Services, Contact, a project and a service | 1200 × 1500 or larger, portrait (the demo’s Contact photo and service photos are 1200 × 800) | Half the width and 85 % of the window’s height on desktop (it stays in place while the text scrolls), 4 : 5 on tablets, 370 : 463 on phones |
A project’s image |
1440 × 1440 | The card at 565 : 600, and the tall photo of its page |
A project’s gallery |
1440 px wide, portrait (1440 × 1920 to 1440 × 2160 in the demo) | One under the other at 0.74 : 1 (a little taller than 3 : 4), cropped |
A service’s image |
1200 × 800 | The tall photo of its page; Home’s row: 200 × 145 on desktop, 770 : 359 on tablets, square on phones |
| “About me” photos (Home) | 1200 × 1500 (two), 1440 × 952 and 1000 × 667 | A 4 : 5 photo, one that fills the right column, then two side by side at 1.51 : 1 and about 0.85 : 1 |
“My numbers” photo (Home), the Services page photo (facts.jpg) |
1200 × 2133 | 502 px wide and as tall as the numbers on desktop; 400 / 350 px tall, full width, on tablets and phones |
| The two photos of “My little story” (About) | 1440 × 952 and 1000 × 667 | Side by side at 1.51 : 1 each from tablets up; one under the other on phones, the second at about 0.94 : 1 |
| The awards photo (About) | 1200 × 1600 | 3 : 4 |
| The portrait at the top of About and Contact | 400 × 400 | 200 × 200, square |
| Testimonial portraits | 200 × 200 | 80 px square with small rounded corners (40 px on phones) |
| The five photos of “See what I do” | 600 px wide | Squares, five in a row on desktop; the first four on tablets and phones |
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 footer’s). The photos of “See what I do” are links to your
Instagram, so their alt is also the link’s name.
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-light.png, public/icon-dark.png |
The icon in the browser tab (180 × 180): the first for a light browser theme, the second (white) for a dark one |
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.
Text that is not in content/
Section titled “Text that is not in content/”Almost every word is content, including the form’s messages (contactForm) 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) and “Menu” (the phone menu button’s label) in
src/components/site/Header.astro; - the “//” between the place and the clock in
src/components/site/TimeRow.astro, and the clock’s format (“8:53 PM”) insrc/components/site/clock.ts; - the date format of the project pages (“May 20, 2026”) in
src/lib/format.ts; - the page’s language,
lang="en", insrc/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.