Schemas and snippets
Browse ready-made Sanity.io schemas to structure your content quickly. Find useful code snippets for workflows, input components, migration scripts, and studio configurations.
Create a dynamic 'Unmapped fields' group in your document definition
A dynamic group filled with fields that don't have any defined group.
Go to Create a dynamic 'Unmapped fields' group in your document definitionConditional values in GROQ queries
Only return a value when a condition is fulfilled
Go to Conditional values in GROQ queriesCreate a new reference document with parameterised initial Values
If you want to make it possible to use parameterised initialValue templates in reference fields, this is how!
Go to Create a new reference document with parameterised initial ValuesPage Builder Starter
This is a simple starting off point to allow users to organize a page
Go to Page Builder StarterGet parents parent in reference filter
Get parents parent in reference filter
Go to Get parents parent in reference filter'Hacking' custom Document Actions 😇
A little 'hack' when you work on custom Document actions
Go to 'Hacking' custom Document Actions 😇Is your Microcopy unique?
A custom validation to check if your Microcopy documents have unique keys and values for a specific namespace.
Go to Is your Microcopy unique?Custom validation on array length
Simple custom validation that force array length according to another field.
Go to Custom validation on array lengthRename a field across documents
Migration script for renaming a field based on a GROQ query
Go to Rename a field across documentsMigration script for document types
This migration scripts lets you migrate documents to a new type.
Go to Migration script for document types