Blog

Using Projections in GROQ Queries
A projection in GROQ is the part of a query inside curly braces that decides what each result looks like. Instead of returning whole documents, `
Dive Deeper
Debugging GROQ Queries With the Vision Plugin
The Vision plugin is Sanity's built-in GROQ playground. It adds a Vision tab to Sanity Studio where you can run any query against your datasets,
Dive Deeper
GROQ vs GraphQL: Which Should You Use With Sanity?
For most Sanity projects, GROQ vs GraphQL has a clear answer: use GROQ. It works out of the box with no deployment step, can filter, join, reshap
Dive Deeper
How to Convert HTML to Portable Text
To convert HTML to Portable Text, use htmlToBlocks() from @portabletext/block-tools. You compile a schema that describes your Portable Text f
Dive Deeper
Migrating From Contentful to Sanity
To migrate from Contentful to Sanity, run Sanity's open-source contentful-to-sanity CLI with your Contentful space ID, a Content Management API
Dive Deeper
How to Migrate Content Between Sanity Datasets
To migrate content between Sanity datasets, export the source dataset with npx sanity datasets export production production.tar.gz and import t
Dive Deeper