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 MastodonIf 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 ValuesLess is more - We're breaking down some of the core helpers we use when building our websites
Go to GROQ Readability Helper 🤓Search documents that are tagged with at least one of these tag slugs
Go to Filter Content by Multiple TagsGet all content that references the current document
Go to Backlinks QueryThis is a simple starting off point to allow users to organize a page
Go to Page Builder StarterSometimes you need to change only one key-value-pair in your data, this is how you can do it in 2 lines
Go to Create a copy of an object and change a key-value pairOkay, well it might be at least in the top 3. Using getDimensions and optimising the hell out of your images, check out this snippet
Go to The best Next.js & Sanity <Image/> ComponentIf you want to pass a parameter to a query that might not always be defined
Go to Handle Certain Values To Be TrueThis bash script can be used to delete documents using sanity cli.
Go to Delete documents using sanity cliHow to validate nested fields from the document or object level
Go to Validation of children in objectsGet parents parent in reference filter
Go to Get parents parent in reference filterA little 'hack' when you work on custom Document actions
Go to 'Hacking' custom Document Actions 😇A custom validation to check if your Microcopy documents have unique keys and values for a specific namespace.
Go to Is your Microcopy unique?Setting up a live preview and want to fetch a document's draft, with a fallback for the published document when there are no drafts? Check this out.
Go to Select draft OR published documentThis validation can be used if you have two fields and you require one or the other to be filled
Go to One or the other validationThis snippet can be used to fetch current, previous and next articles based on publication date and related tags.
Go to Get current, previous and next post, filtered by tagsValidation of url input to allow certain URI schemes (mailto, tel and more included)
Go to Validation of url input to allow certain URI schemes