Publish Once, Post Everywhere
Write once in Studio. Post everywhere. No copy-paste, no platform hopping.
Go to Publish Once, Post EverywhereAutomate 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.
Go to Publish Once, Post EverywhereAutomatically format code blocks using Prettier to enforce consistency across all documents.
Go to Format code blocks with PrettierAI-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.
Go to Automatically tag blog postsAutomatically track when content was first published with a timestamp that sets once and never overwrites, providing reliable publication history for analytics and editorial workflows.
Go to First Published Timestamp FunctionAutomatically update your Algolia index
Go to Algolia Sync FunctionCreate, preview, and send Klaviyo campaigns without ever leaving Sanity Studio"
Go to Klaviyo campaigns without leaving your StudioA Sanity function that tracks slug changes and creates redirects automatically.
Go to Auto-generating Redirects on Slugs ChangeStop manually linking products. Let this function map relationships for you
Go to Automatic product relationship mappingSurface product age to help editors choose the freshest inventory
Go to Keep Authors Aware of Product FreshnessAutomatically analyze and categorize the emotional tone of user comments
Go to Sentiment AnalysisOn document publish, send a Slack notification so your team is informed
Go to Notify your team via Slack on publishAI-Powered Content Summary from Long Form Content
Go to Auto Summary FunctionGet instant Telegram notifications when new comments are posted, with direct links to your Sanity Studio.
Go to Telegram alerts for new commentsAI-Powered Tone Analysis for Consistent Brand Voice
Go to Capture Tone of Voice FunctionGenerate content changes for a piece of content
Go to Brand Voice Validator FunctionInform your the Bluesky crowd when you publish a post
Go to Post to BlueskySpread the word on Mastodon when publishing a blog post
Go to Post to MastodonContent estimated reading time component in TypeScript.
Go to Estimated reading timethis blog for beginner how to make blog in sanity with next js
Go to Next.JS blog use sanityGROQ 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.
Go to Matching the end of a string in GROQSimplify your Studio experience by hiding deprecated fields when you create new documents.
Go to Hide a deprecated field in new documents🚫 MyFile / ✅ MyFile.pdf
Go to Add extensions to asset original filenamesThis 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.
Go to Unlimited nestingLearn how to build a custom image gallery preview component that can be added to Portable Text.
Go to Custom Image Gallery Preview Component - Portable TextIf 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.
Go to groqd implementation with portable text custom marksIf you install plugins or other packages with conflicting (peer) dependencies, you can use this useful workaround to unblock yourself.
Go to What to do when Studio crashes due to conflicts in dependency versions?Variant Generator for Products with Options
Go to Variant Generator Custom Input Component for Products with OptionsInsert related components next to a native one
Go to Helper function to add custom components above or below a native one.A code snippet to create a custom '+ Add item' button to add items to the top of an array.
Go to Add items to top of array with custom '+ Add item' buttonWanna use Sanity to build a PageBuilder? Show previews of your blocks/sections!
Go to Custom PageBuilder Input Component - Preview Blocks & SectionsOn the fly form generation with Sanity & Formspark
Go to Sanity & Formspark Form GeneratorIf 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 ContentCode examples using document.newDocumentOptions to hide the Create new document button at the structure level and/or disable it in the global create menu.
Go to Disable new document creation button at structure and global level with document.newDocumentOptionsA dynamic group filled with fields that don't have any defined group.
Go to Create a dynamic 'Unmapped fields' group in your document definitionOnly return a value when a condition is fulfilled
Go to Conditional values in GROQ queries