Skip to content
Sign inJoin waitlist

Using a headless CMS — Findit 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 Findit.

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
properties slug, title, propertyId, for (sell or rent), featured, category, agent, location (slugs), address, price, duration, image, gallery (four photos), video, description, features, details (size, bedrooms, bathrooms, floor, …), utility (heating, air condition, …)
agents slug, name, image, address, bio, phone, mobile, whatsapp, email
locations, categories slug, name, and for locations an image
posts slug, title, category, date, author, image, excerpt, body
legal slug, title, description, updated, body
testimonials, team name, photo, rating, title, quote / name, role, bio, photo
  • A property refers to its agent, location and category by their slug — model them as references and return the slug in your mapping. A property whose agent, location or category is missing stops the build and names it.
  • Keep the collection’s order in the CMS (a sort field) and return entries in that order — position preserves it (the home page’s Featured section shows the first five properties that are featured).

Descriptions, features, posts and legal texts are blocks, not HTML:

{ type: "heading", text: "…" }
{ type: "paragraph", text: "…" } // **bold** and [links](/path) inside the text
{ type: "list", ordered?: true, items: ["…", "…"] }

Convert your CMS’s rich text to these blocks in your mapping (how).

Upload images at least as large as the layout uses: 1400 px or more for property and post photos. Using a CMS’s images in the site: Images.