On this page
The customer stories are at /customers/, with a Customers item in the header’s menu and the phone menu and a link in the footer’s Product group. projects: false in src/config/theme.config.mjs removes them.
A story is a file in src/content/projects/<language>/ (the collection keeps the name projects, as in Astro Rocket). The file name is the address: src/content/projects/en/my-shop.md is /customers/my-shop/. The text under the fields is the story: the demo’s have three parts, Before, What changed and The result, with the customer’s quote in the last.
The fields
The fields are described in src/config/collections.ts:
| Field | What it is |
|---|---|
title |
The customer’s name |
description |
One sentence for the card, the page and search engines |
category |
agency, shop or software: Agency, Online shop or Software on the card and the page |
year |
The year they became a customer, “Customer since” in the facts |
tone |
Where the lime glow sits on the drawn cover: violet (the default) at the foot, magenta at the top right, emerald at the bottom left. The names are Astro Rocket’s; the colours are the same for all three. |
icon |
The icon above the name on the drawn cover: a Lucide name, or a brand mark such as brand-astro. Without it the category’s icon is used: a briefcase for an agency, a shopping bag for a shop, a window for software |
tags |
Topics; each has its own page, /customers/tag/<tag>/ |
cover, coverAlt |
A picture for the card, in src/assets/, and what it shows |
hero |
A picture for the story’s own page when it has no gallery |
gallery |
Pictures and videos to swipe through above the story’s title (see below) |
client |
The customer, in the facts |
services |
What they use, “Uses” in the facts |
url, repo |
Optional: the customer’s site and code, the two buttons under the title |
urlLabel |
The words on the first button, such as View the demo; without it, the button says “Visit the site” in the site’s language. The second says “View the code”. |
featured, order |
Featured stories come first, then by order, lower first |
draft |
true keeps it off the site |
The drawn cover
Without a cover picture, a story’s card shows the cover the theme draws (src/components/fx/ProjectCover.astro): a near-black ground with a soft lime glow, a fine grid and four corner marks, the icon in lime and the customer’s name, the same in light and dark mode. A story’s page without a gallery or picture shows it too.
The gallery
A story’s page is built like a blog post, on the page’s own background, without a hero: under the breadcrumbs comes the gallery, where a post has its cover, then the category and year, the title, the description, the facts and the buttons, then the text. Each slide is a picture in src/assets/ or a video in public/:
gallery:
- src: ../../../assets/projects/my-shop-home.jpg
alt: The shop's homepage
- video: /videos/my-shop.mp4
poster: ../../../assets/projects/my-shop-video.jpg
alt: Ordering a product, from the basket to the payment
- The paths of pictures and posters are relative to the story’s file; a video’s path starts at
public/. - A visitor swipes, uses the arrows or the dots, or the arrow keys.
- The first picture loads at once and the others when they’re needed. A video loads nothing until it’s played, shows its poster until then, and stops when the visitor swipes away.
- One picture is shown whole at its own shape; several pictures and a video are shown at 16:9.
- Without a
gallery, the page shows theheroorcoverpicture, and without a picture, the drawn cover.
Where stories show
/customers/shows them all, three to a row and twelve to a page, with the tags in the hero.- A story’s page shows its gallery or cover, its facts and links, its text with a table of contents, a button back to all stories, up to three more stories and the closing band.
The demo’s six stories in src/content/projects/en/ are examples: the companies, people, quotes and figures are made up. Replace them with your own customers’ stories, with their permission.