cms contentโฑ10 minutes

Get Started with Sanity

Unverified

Quick Summary

โ€œHeadless CMS with a real-time, customizable content studio and structured content.โ€

Best for: Custom content workflows
Time to first integration: 10 minutes

๐Ÿ“‹Prerequisites

  • โœ“Node.js 18+ installed
  • โœ“A Sanity account โ€” sign up here
  • โœ“An existing project (Next.js, React, or Node.js recommended)

Setup Steps

4 steps
1

Bootstrap

Scaffold a new project and Studio.

bash
npm create sanity@latest
2

Model content

Define schema types for your documents.

typescript
// schemas/post.ts export default { name: 'post', type: 'document', fields: [{ name: 'title', type: 'string' }], }
3

Deploy the Studio

Host the editing Studio.

bash
sanity deploy
4

Query

Fetch content with GROQ via the Sanity client.

typescript
const posts = await client.fetch('*[_type == "post"]')

Links

Sanity Guide | AI Navigator