Recipes
Schema and code snippets to help you model content and build features in your Sanity Studio.
Sanity Functions Recipes
Publish Once, Post Everywhere
Write once in Studio. Post everywhere. No copy-paste, no platform hopping.
Format code blocks with Prettier
Automatically format code blocks using Prettier to enforce consistency across all documents.
Auto-generate alt text for Media Library assets
Automatically generate accessible, multilingual alt text for images in your Sanity Media Library using Agent Actions and Sanity Functions
Automatically tag blog posts
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.
First Published Timestamp Function
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.
Algolia Sync Function
Automatically update your Algolia index
Klaviyo campaigns without leaving your Studio
Create, preview, and send Klaviyo campaigns without ever leaving Sanity Studio"
Auto-generating Redirects on Slugs Change
A Sanity function that tracks slug changes and creates redirects automatically.
Automatic product relationship mapping
Stop manually linking products. Let this function map relationships for you
Keep Authors Aware of Product Freshness
Surface product age to help editors choose the freshest inventory
Sentiment Analysis
Automatically analyze and categorize the emotional tone of user comments
Notify your team via Slack on publish
On document publish, send a Slack notification so your team is informed
Auto Summary Function
AI-Powered Content Summary from Long Form Content
Telegram alerts for new comments
Get instant Telegram notifications when new comments are posted, with direct links to your Sanity Studio.
Capture Tone of Voice Function
AI-Powered Tone Analysis for Consistent Brand Voice
Brand Voice Validator Function
Generate content changes for a piece of content
Post to Bluesky
Inform your the Bluesky crowd when you publish a post
Post to Mastodon
Spread the word on Mastodon when publishing a blog post