
























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.
Documentation • Quick Start • Configuration • Schema.org • CLI
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.
| Feature | What you get |
|---|---|
| Structured SEO fields | Complete field group for every document |
| Live SERP preview | See the Google result while editing |
| Open Graph + X/Twitter | Full social card controls |
| Robots + canonical | Indexing directives and canonical URLs |
| Custom meta tags | Reusable metaTag / metaAttribute types |
| Schema.org JSON-LD | 39 types for structured data |
| Next.js helpers | Metadata and script rendering |
| SEO Health Dashboard | Audit documents across the whole studio |
| CLI | Setup, reports, and exports |
Use it as a simple field plugin, a structured data system, or a complete SEO operations layer for your Sanity projects.
seoFields object type for a complete SEO field groupnoindex, nofollow, noarchive, nosnippet, and related directivesmetaTag and metaAttribute types<script type="application/ld+json">buildXJsonLd() helpers for server-side rendering and custom frameworksbuildSeoMeta() for Next.js App Router generateMetadata()<SeoMetaTags /> for framework-agnostic React renderingdefineSeoCli()Peer dependencies:
The
seoFieldstype is registered automatically by the plugin.
Full guide: Frontend integration
| Type | Purpose |
|---|---|
seoFields | Complete SEO field bundle for document schemas |
openGraph | Open Graph metadata for Facebook, LinkedIn, Slack, and other social surfaces |
twitter | X/Twitter Card metadata |
robots | Indexing and crawling directives |
metaTag | Custom meta tag container |
metaAttribute | Single custom meta attribute |
| Option | Description |
|---|---|
seoPreview | Enable or disable the live preview shown inside SEO fields |
fieldOverrides | Customize field titles, descriptions, validation, and field metadata |
defaultHiddenFields | Hide specific SEO fields globally |
fieldVisibility | Hide specific SEO fields for specific document types |
fieldGroups | Customize how fields are grouped in the seoFields object |
apiVersion | Sanity API version used by plugin clients |
dashboard | Enable and configure the SEO Health Dashboard tool |
Full reference: Configuration docs
The dashboard is a Studio tool that helps teams find SEO gaps before they ship content.
Dashboard capabilities:
Get a dashboard license: Get license
Dashboard docs: SEO Health Dashboard
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
Common usage:
buildSeoMeta() in Next.js App Router generateMetadata()<SeoMetaTags /> in React layouts or frameworks where you control the <head>SchemaOrgScripts or individual schema components for JSON-LDimageUrlResolver when your Sanity image data needs URL buildingDocs: Frontend integration
Run the CLI:
Useful commands:
CLI docs: CLI guide
| Import path | Use |
|---|---|
sanity-plugin-seofields | Studio plugin, base schema types, dashboard pane factory, shared types |
sanity-plugin-seofields/next | SEO metadata helpers and Schema.org React components |
sanity-plugin-seofields/schema | Schema.org Sanity schema plugins and type exports |
sanity-plugin-seofields/schema/next | Schema.org React JSON-LD components |
sanity-plugin-seofields/define-cli | CLI configuration helper |
| Runtime | Supported |
|---|---|
| Node.js | >=18 |
| Sanity Studio | ^3, ^4, ^5 |
| React | ^18, ^19 |
| Module format | ESM and CommonJS builds |
| TypeScript | Type definitions included |
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.
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。