cms content⏱10 minutes
Get Started with Sanity
UnverifiedQuick 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 steps1
1
Bootstrap
Scaffold a new project and Studio.
bash
npm create sanity@latest2
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
3
Deploy the Studio
Host the editing Studio.
bash
sanity deploy4
4
Query
Fetch content with GROQ via the Sanity client.
typescript
const posts = await client.fetch('*[_type == "post"]')