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 MastodonSimplify finding the right document to select when you have multiple types
Go to Filtering results for reference selectors in arraysRecent studio styling has borders around icons in the desk structure. Here's a snippet to remove those.
Go to Remove studio desk icon bordersOne query to fetch the draft it it exists, and fall back to the published version of a document.
Go to Fetch the draft or published version of a documentScript to batch remove a field from all documents that match a GROQ query
Go to Batch remove a fieldSanity provides various custom functions inside the schema. But getting a reference field value is difficult. Here's the how I do it using fetch.
Go to Get Sanity Reference Field Values inside Custom Schema FunctionsHow to automatically generate linked headings with a custom serializer
Go to Anchored Headings for Portable TextList all schemas in development
Go to Dev ModeMigration script to convert plain text to block content across your content lake
Go to Migrate plain text field to Portable TextA simple states dropdown list for your Studio
Go to United States Dropdown ListSuggest relevant content based on category tags.
Go to Related ContentSimple content type for a question and answer pattern
Go to Frequently asked questionsSchemas for adding richer quotes within Portable Text
Go to Rich quotations in Portable TextJS/Node example of using the /mutate API
Go to Mutate, set or change values deep within documentsDocument specific content previews
Go to Document specific content previewsThis snippet will return only matched item in a sub array inside a document
Go to Sanity groq Filter by item in an arrayIt will expand the reference (projection) which is deeply linked in an array and optional using select funtion.
Go to Projection of a reference item in a deeplinked optional array.Allows the user to tweet a summary into twitter.
Go to TweetSummaryPreview images of your documents
Go to Image Preview Field