惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

G
Google Developers Blog
博客园 - 三生石上(FineUI控件)
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
MongoDB | Blog
MongoDB | Blog
小众软件
小众软件
Y
Y Combinator Blog
博客园 - 聂微东
Google DeepMind News
Google DeepMind News
D
Docker
罗磊的独立博客
Microsoft Security Blog
Microsoft Security Blog
D
DataBreaches.Net
B
Blog
Vercel News
Vercel News
Recent Announcements
Recent Announcements
GbyAI
GbyAI
阮一峰的网络日志
阮一峰的网络日志
T
The Blog of Author Tim Ferriss
H
Hackread – Cybersecurity News, Data Breaches, AI and More
P
Proofpoint News Feed
酷 壳 – CoolShell
酷 壳 – CoolShell
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Microsoft Azure Blog
Microsoft Azure Blog
宝玉的分享
宝玉的分享

Sanity.io

A Board Game agent built using Sanity Context and Vercel's AI SDK | Sanity Build a prototype with Claude Code that your whole team can edit | Sanity What’s New - May 2026 | Sanity I built a London pub guide with v0 and the Sanity MCP in six hours. Here's what I learned. | Sanity Build a conference concierge with Agent Context and Anthropic | Sanity Build a content-aware Telegram agent with Vercel AI SDK and Chat SDK | Sanity How I used Agent API to generate photos for my family’s recipes | Sanity What’s New April - 2026 | Sanity Better context, better matches: An AI love story (for dogs) | Sanity How to write for an agent | Sanity Content Agent, meet Slack: AI content operations in your workflow | Sanity Structure powers intelligence | Sanity Your agent needs better content. Here's how to give it. | Sanity How to serve content to agents (a field guide) | Sanity Sanity TypeGen GA: Automatic TypeScript types for content and GROQ | Sanity Sanity is now available on the Vercel Marketplace | Sanity The logo soup problem (and how to solve it) | Sanity Content Releases: From scattered updates to coordinated publishing | Sanity What's New - February 2026 | Sanity How we solved the agent memory problem | Sanity v0 Builder Challenge: The winners | Sanity Introducing: Sanity Agent Skills | Sanity Content Agent: Days of work in one conversation | Sanity Our Sanity Values | Sanity Open Source Pledge 2025: Stepping up when it matters | Sanity v0 builder challenge: $3000 in prizes | Sanity Why AI Breaks Without Structured Content Operations | Sanity What’s New January - 2026 | Sanity BFCM 2025: What teams built when infrastructure stopped being the problem | Sanity How AI shaped holiday shopping and what it means for content in 2026 | Sanity
The Content Operating System for the AI era | Sanity.io
Desai Hardik · 2025-09-23 · via Sanity.io

sanity-plugin-seofields — the complete SEO toolkit for Sanity Studio

sanity-plugin-seofields

The complete SEO toolkit for Sanity Studio.

Manage SEO fields, social previews, robots directives, canonical URLs, Schema.org JSON-LD, and studio-wide SEO health checks — directly inside Sanity Studio v3, v4, or v5.

npm version npm downloads license GitHub stars Sanity TypeScript

Documentation  •  Quick Start  •  Configuration  •  Schema.org  •  CLI


Why This Plugin

Most Sanity SEO plugins stop at title and description fields. sanity-plugin-seofields gives editors and developers a full SEO workflow — from per-document fields all the way to studio-wide audits.

FeatureWhat you get
Structured SEO fieldsComplete field group for every document
Live SERP previewSee the Google result while editing
Open Graph + X/TwitterFull social card controls
Robots + canonicalIndexing directives and canonical URLs
Custom meta tagsReusable metaTag / metaAttribute types
Schema.org JSON-LD39 types for structured data
Next.js helpersMetadata and script rendering
SEO Health DashboardAudit documents across the whole studio
CLISetup, reports, and exports

Use it as a simple field plugin, a structured data system, or a complete SEO operations layer for your Sanity projects.


Table of Contents

  • Features
  • Installation
  • Quick Start
  • Registered Schema Types
  • Configuration
  • SEO Health Dashboard
  • Schema.org Structured Data
  • Next.js & React Exports
  • CLI
  • Package Exports
  • Compatibility
  • Contributing
  • License

Features

Studio SEO Fields
  • seoFields object type for a complete SEO field group
  • Meta title, meta description, keywords, canonical URL, and meta image fields
  • Open Graph title, description, image, URL, type, and site name
  • X/Twitter Card title, description, image, site, creator, and card type
  • Robots controls for noindex, nofollow, noarchive, nosnippet, and related directives
  • Custom meta tags through reusable metaTag and metaAttribute types
  • Configurable field labels, descriptions, groups, visibility, and per-document behavior
  • Optional live SEO preview inside the Studio field UI
SEO Health Dashboard
  • Studio tool for scanning SEO coverage across documents
  • 0–100 scoring per document
  • Missing title, description, image, canonical, robots, and social metadata checks
  • Document-type filters
  • Query customization
  • Optional custom scoring logic
  • CSV and JSON export
  • Direct links back to documents that need work
  • Demo mode for docs, previews, and onboarding
Schema.org / JSON-LD
  • 39 Schema.org types as Sanity object schemas
  • Combined Schema.org array field for flexible content modeling
  • Individual schema plugins when you only need specific types
  • Type picker UI for editors
  • React components that render <script type="application/ld+json">
  • buildXJsonLd() helpers for server-side rendering and custom frameworks
  • Shared primitives for people, organizations, images, ratings, offers, and language fields
Frontend Helpers
  • buildSeoMeta() for Next.js App Router generateMetadata()
  • <SeoMetaTags /> for framework-agnostic React rendering
  • Schema.org React components for Next.js and other React frameworks
  • Image URL resolver hooks for Sanity asset pipelines
  • Sanitizers for Open Graph type and Twitter Card values
CLI
  • Guided setup command
  • Project checks and doctor-style diagnostics
  • SEO data reports
  • JSON and CSV export for audits, backups, and client review
  • Config support via defineSeoCli()

Installation

Peer dependencies:


Quick Start

1. Register the Plugin

2. Add SEO Fields to a Document

The seoFields type is registered automatically by the plugin.

Full guide: Frontend integration


Registered Schema Types

TypePurpose
seoFieldsComplete SEO field bundle for document schemas
openGraphOpen Graph metadata for Facebook, LinkedIn, Slack, and other social surfaces
twitterX/Twitter Card metadata
robotsIndexing and crawling directives
metaTagCustom meta tag container
metaAttributeSingle custom meta attribute

Configuration

OptionDescription
seoPreviewEnable or disable the live preview shown inside SEO fields
fieldOverridesCustomize field titles, descriptions, validation, and field metadata
defaultHiddenFieldsHide specific SEO fields globally
fieldVisibilityHide specific SEO fields for specific document types
fieldGroupsCustomize how fields are grouped in the seoFields object
apiVersionSanity API version used by plugin clients
dashboardEnable and configure the SEO Health Dashboard tool

Full reference: Configuration docs


SEO Health Dashboard

The dashboard is a Studio tool that helps teams find SEO gaps before they ship content.

Dashboard capabilities:

  • Audit all configured document types
  • View SEO score, status, and missing fields
  • Filter documents by score and document type
  • Export reports as CSV or JSON
  • Open the exact document that needs updates
  • Customize document title, subtitle, and preview display

Get a dashboard license: Get license

Dashboard docs: SEO Health Dashboard


Schema.org Structured Data

Register all Schema.org types
Register only the types you need
Add Schema.org fields to a document
Render JSON-LD on the frontend

Render individual types:

Available Schema.org types (39)

AggregateRating · Article · BlogPosting · Book · Brand · BreadcrumbList · ContactPoint · Country · Course · Event · FAQPage · HowTo · ImageObject · ItemList · JobPosting · LegalService · LocalBusiness · Movie · MusicAlbum · MusicRecording · NewsArticle · Offer · OpinionNewsArticle · Organization · Person · Place · PostalAddress · Product · ProfilePage · Recipe · Restaurant · Review · Service · SocialMediaPosting · SoftwareApplication · VideoObject · WebApplication · WebPage · Website

Schema.org docs: Structured data guide


Next.js & React Exports

Common usage:

  • Use buildSeoMeta() in Next.js App Router generateMetadata()
  • Use <SeoMetaTags /> in React layouts or frameworks where you control the <head>
  • Use SchemaOrgScripts or individual schema components for JSON-LD
  • Pass an imageUrlResolver when your Sanity image data needs URL building

Docs: Frontend integration


CLI

Run the CLI:

Useful commands:

CLI docs: CLI guide


Package Exports

Import pathUse
sanity-plugin-seofieldsStudio plugin, base schema types, dashboard pane factory, shared types
sanity-plugin-seofields/nextSEO metadata helpers and Schema.org React components
sanity-plugin-seofields/schemaSchema.org Sanity schema plugins and type exports
sanity-plugin-seofields/schema/nextSchema.org React JSON-LD components
sanity-plugin-seofields/define-cliCLI configuration helper

Compatibility

RuntimeSupported
Node.js>=18
Sanity Studio^3, ^4, ^5
React^18, ^19
Module formatESM and CommonJS builds
TypeScriptType definitions included

Contributing

Issues and pull requests are welcome.

If the plugin helps your project, consider leaving a star on the GitHub repo, a review on the docs site, or a rating in the Sanity Plugin Directory.


License

MIT © Hardik Desai