Filtering results for reference selectors in arrays
Simplify finding the right document to select when you have multiple types
Simplify finding the right document to select when you have multiple types
Recent studio styling has borders around icons in the desk structure. Here's a snippet to remove those.
One query to fetch the draft it it exists, and fall back to the published version of a document.
Script to batch remove a field from all documents that match a GROQ query
Sanity provides various custom functions inside the schema. But getting a reference field value is difficult. Here's the how I do it using fetch.
How to automatically generate linked headings with a custom serializer
List all schemas in development
Migration script to convert plain text to block content across your content lake
A simple states dropdown list for your Studio
Suggest relevant content based on category tags.
Simple content type for a question and answer pattern
Schemas for adding richer quotes within Portable Text
JS/Node example of using the /mutate API
Document specific content previews
This snippet will return only matched item in a sub array inside a document
It will expand the reference (projection) which is deeply linked in an array and optional using select funtion.
Allows the user to tweet a summary into twitter.
Preview images of your documents
Automate your content workflows with functions that trigger on document events. From AI-powered automatic tagging and content enrichment to translation and optimization, these pre-built functions save time and improve content quality across your Sanity projects.
Write once in Studio. Post everywhere. No copy-paste, no platform hopping.
Automatically format code blocks using Prettier to enforce consistency across all documents.
Automatically generate accessible, multilingual alt text for images in your Sanity Media Library using Agent Actions and Sanity Functions
AI-powered automatic tagging for Sanity blog posts that analyzes content to generate 3 relevant tags, maintaining consistency by reusing existing tags from your content library.
Automatically track when content was first published with a timestamp that sets once and never overwrites, providing reliable publication history for analytics and editorial workflows.
Automatically update your Algolia index
Create, preview, and send Klaviyo campaigns without ever leaving Sanity Studio"
A Sanity function that tracks slug changes and creates redirects automatically.
Stop manually linking products. Let this function map relationships for you
Surface product age to help editors choose the freshest inventory
Automatically analyze and categorize the emotional tone of user comments
On document publish, send a Slack notification so your team is informed
AI-Powered Content Summary from Long Form Content
Get instant Telegram notifications when new comments are posted, with direct links to your Sanity Studio.
AI-Powered Tone Analysis for Consistent Brand Voice
Generate content changes for a piece of content
Inform your the Bluesky crowd when you publish a post
Spread the word on Mastodon when publishing a blog post