Using a headless CMS — Nitip Astro
Connecting a headless CMS works the same for every Framebrick Astro template. Loaders and schemas, rich text, images, rebuilding on publish, and step-by-step guides for Sanity, Payload, Strapi and Directus are in Use a headless CMS with an Astro template. This page lists what is specific to Nitip.
Collections
Section titled “Collections”src/content.config.ts defines them, src/content/schemas.ts checks every entry when the site builds, and pages read
them through src/lib/content.ts. Mirror the schemas in the CMS:
| Collection | Key fields |
|---|---|
projects |
slug, title, year, image, services[{label, slug}], summary, industry, overview, process, result |
services |
slug, number, title, images (two), description, tools (label and link), offer and benefits (bold start + text), plans (id, label, price, note, what’s included) |
posts |
slug, title, excerpt, image, category, date, body (blocks) |
careers |
slug, title, summary, responsibilities, requirements, benefits |
team, testimonials |
name, role, email, photo / quote, name, company, service, photo, logo |
- A project refers to its services by their
slug— model them as references and return label and slug in your mapping.
Rich text
Section titled “Rich text”Post bodies are blocks, not HTML:
{ type: "heading", text: "…", bold?: "…" }{ type: "paragraph", highlight?: "…", text: "…" }{ type: "list", ordered?: true, items: Block[][] }Convert your CMS’s rich text to these blocks in your mapping (how).
Images
Section titled “Images”Upload images at least as large as the layout uses: 2000 px for heroes and project images. Using a CMS’s images in the site: Images.