
Security News
US Government Forces Anthropic to Pull Claude Fable Days After Launch
Anthropic says the directive cited national security concerns over a narrow jailbreak, but offered no specific technical details.
sanity-plugin-seofields
Advanced tools
The only Sanity Studio SEO plugin with a built-in audit dashboard. Manage meta tags, Open Graph, Twitter Cards, robots directives, JSON-LD structured data, and 38 Schema.org types.

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()npm install sanity-plugin-seofields
Peer dependencies:
sanity ^3 || ^4 || ^5
react ^18 || ^19
// sanity.config.ts
import {defineConfig} from 'sanity'
import seofields from 'sanity-plugin-seofields'
export default defineConfig({
// ...
plugins: [seofields()],
})
// schemas/page.ts
import {defineField, defineType} from 'sanity'
export default defineType({
name: 'page',
title: 'Page',
type: 'document',
fields: [
defineField({
name: 'title',
type: 'string',
}),
defineField({
name: 'seo',
title: 'SEO',
type: 'seoFields',
}),
],
})
The
seoFieldstype is registered automatically by the plugin.
// app/[slug]/page.tsx
import type {Metadata} from 'next'
import {buildSeoMeta} from 'sanity-plugin-seofields/next'
export async function generateMetadata(): Promise<Metadata> {
const page = await getPage()
return buildSeoMeta({
seo: page.seo,
baseUrl: 'https://example.com',
path: `/pages/${page.slug}`,
defaults: {
title: page.title,
description: 'Default site description',
},
})
}
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 |
import seofields from 'sanity-plugin-seofields'
seofields({
seoPreview: true,
fieldOverrides: {
title: {
title: 'Meta Title',
description: 'Recommended length: 50-60 characters.',
},
},
defaultHiddenFields: ['twitterSite'],
fieldVisibility: {
post: {
hiddenFields: ['openGraphSiteName'],
},
},
dashboard: {
enabled: true,
licenseKey: process.env.SANITY_STUDIO_SEO_LICENSE_KEY,
},
})
| 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.
// sanity.config.ts
import {defineConfig} from 'sanity'
import seofields from 'sanity-plugin-seofields'
export default defineConfig({
plugins: [
seofields({
dashboard: {
enabled: true,
licenseKey: process.env.SANITY_STUDIO_SEO_LICENSE_KEY,
query: {
types: ['page', 'post', 'product'],
},
export: {
enabled: true,
formats: ['csv', 'json'],
},
},
}),
],
})
Dashboard capabilities:
Get a dashboard license: Get license
Dashboard docs: SEO Health Dashboard
// sanity.config.ts
import {defineConfig} from 'sanity'
import seofields from 'sanity-plugin-seofields'
import {schemaOrg} from 'sanity-plugin-seofields/schema'
export default defineConfig({
plugins: [seofields(), schemaOrg()],
})
import {
schemaOrgArticlePlugin,
schemaOrgFAQPagePlugin,
schemaOrgProductPlugin,
} from 'sanity-plugin-seofields/schema'
export default defineConfig({
plugins: [schemaOrgArticlePlugin(), schemaOrgFAQPagePlugin(), schemaOrgProductPlugin()],
})
import {defineField, defineType} from 'sanity'
export default defineType({
name: 'article',
type: 'document',
fields: [
defineField({
name: 'schemaOrg',
title: 'Structured Data',
type: 'schemaOrg',
}),
],
})
import {SchemaOrgScripts} from 'sanity-plugin-seofields/schema/next'
export function Page({page}: {page: PageData}) {
return <SchemaOrgScripts items={page.schemaOrg} />
}
Render individual types:
import {ArticleSchema, FAQPageSchema, ProductSchema} from 'sanity-plugin-seofields/schema/next'
export function Page({page}: {page: PageData}) {
return (
<>
<ArticleSchema data={page.articleSchema} />
<FAQPageSchema data={page.faqSchema} />
<ProductSchema data={page.productSchema} />
</>
)
}
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
import {
buildSeoMeta,
SeoMetaTags,
sanitizeOGType,
sanitizeTwitterCard,
} from 'sanity-plugin-seofields/next'
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:
npx seofields
Useful commands:
npx seofields init # Guided setup
npx seofields doctor # Diagnostics
npx seofields report # SEO data report
npx seofields export --format json --output seo-report.json # JSON export
npx seofields export --format csv --output seo-report.csv # CSV export
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.
FAQs
The only Sanity Studio SEO plugin with a built-in audit dashboard. Manage meta tags, Open Graph, Twitter Cards, robots directives, JSON-LD structured data, and 38 Schema.org types.
The npm package sanity-plugin-seofields receives a total of 601 weekly downloads. As such, sanity-plugin-seofields popularity was classified as not popular.
We found that sanity-plugin-seofields demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Anthropic says the directive cited national security concerns over a narrow jailbreak, but offered no specific technical details.

Security News
A network of 152 Chrome live wallpaper extensions hid ad tracking and made extension-driven traffic look like Google search clicks.

Company News
Socket’s first CISO brings deep experience securing high-growth SaaS companies as open source supply chain threats accelerate.