Happening this week! Hear how Amplitude built a self-serve marketing engine to drive growth 🚀

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.

Matching the end of a string in GROQ

GROQ doesn't yet include a function to match the end of a string, but we can simulate it by splitting our string on our term.

Geoff Ball
Go to Matching the end of a string in GROQ

Unlimited nesting

This snippet is useful if you want a desk structure that allows columns with a parent page and children pages underneath it. As deep as you would like.

René Hasert
Go to Unlimited nesting

groqd implementation with portable text custom marks

If you're working on integrating portable text with custom markDefs using groqd, the following code snippet could be very useful. It might save you a considerable amount of research time.

Oybek Khalikovic
Go to groqd implementation with portable text custom marks

Portable Text Mock Content

If you're looking to mockup portable text in Storybook without a Sanity backend, this is the schema you're looking for

Go to Portable Text Mock Content