Skip to content
Astro Flightdeck
Start free

Docs · Content

Customer stories

The customer stories at /customers/: adding a story, its fields and its page.

All docs pages
On this page
  1. The fields
  2. The gallery
  3. Where stories show

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
year The year they became a customer, “Customer since” in the facts
tone The colour of the drawn cover when there’s no picture: violet (despite its name, the site’s colour, whichever it is), magenta or emerald
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 beside 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
featured, order Featured stories come first, then by order, lower first
draft true keeps it off the site

A story’s page is built like a blog post, on the page’s own background: under the breadcrumbs comes the gallery, where a post has its cover, then the title, 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 the hero or cover picture, 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 above.
  • A story’s page shows its facts, its links, its gallery or cover, its text with a table of contents, and up to three more stories, three in a row.

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.