Skip to content
Sign inJoin waitlist

Using a headless CMS — Nitip Next.js

Connecting a headless CMS works the same for every Framebrick Next.js template. The approach, rich text, images, keeping pages fresh, and step-by-step guides for Sanity, Payload, Strapi and Directus are in Use a headless CMS with a Next.js template. This page lists what is specific to Nitip.

Pages read them through src/lib/content.ts: getProjects / getProject (and getNextProject, which builds on them), getServices / getService, getPosts / getPost, getCareers / getCareer, getTeam and getTestimonials. Mirror src/content/types.ts in the CMS:

Collection Key fields
Project slug, title, year, image, services[{label, slug}], summary, industry, overview, process, result
Service slug, number, title, images (two), description, tools (label and link), offer and benefits (bold start + text), plans (id, label, price, note, what’s included)
Post slug, title, excerpt, image, category, date, body (blocks)
Career slug, title, summary, responsibilities, requirements, benefits
TeamMember, Testimonial 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 function.

Post bodies are blocks, not HTML:

{ type: "heading", text: "…", bold?: "…" }
{ type: "paragraph", highlight?: "…", text: "…" }
{ type: "list", ordered?: true, items: PostBlock[][] }

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

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.