npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

sanity-plugin-seofields

v1.11.0

Published

The complete Sanity Studio SEO plugin with an audit dashboard, AI generation, Schema.org JSON-LD, and frontend helpers for Next.js, Astro, Nuxt, Vue, SvelteKit, and Remix.

Readme

sanity-plugin-seofields — SEO fields for Sanity Studio

sanity-plugin-seofields

SEO fields, social metadata, Schema.org JSON-LD, AI generation, and SEO health checks for Sanity Studio.

Documentation · Quick start · Configuration · AI · Schema.org · CLI


Features

  • Complete seoFields object type for title, description, canonical URL, keywords, meta image, robots, Open Graph, X/Twitter, hreflang, and custom meta tags
  • Live SEO preview inside Sanity Studio
  • Optional SEO Health Dashboard for document audits and CSV/JSON exports
  • AI-assisted SEO copy generation with server-side proxy helpers
  • Schema.org JSON-LD schema types and React/Next.js render helpers
  • Framework-neutral head helpers for Next.js, Astro, Nuxt, Vue, SvelteKit, Remix, and custom renderers
  • CLI for setup, diagnostics, reports, and exports

Installation

npm install sanity-plugin-seofields

Peer dependencies:

sanity          ^3 || ^4 || ^5 || ^6
@sanity/icons   >=3
react           ^18 || ^19

Sanity Studio 3, 4, 5 and 6 are all supported. Icons are rendered through the root <Icon symbol="…" /> API from @sanity/icons, the one entry point shared by icons v3, v4 and v5 — so the plugin works on Studio 6 (which ships @sanity/icons@5, where the named icon exports such as ApiIcon were removed) without dropping older Studios.

Quick Start

Register the plugin in sanity.config.ts:

import {defineConfig} from 'sanity'
import seofields from 'sanity-plugin-seofields'

export default defineConfig({
  // ...
  plugins: [seofields()],
})

Add SEO fields to a document schema:

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',
    }),
  ],
})

Render SEO metadata in Next.js:

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: `/${page.slug}`,
    defaults: {
      title: page.title,
      description: 'Default site description',
    },
  })
}

For Astro, Nuxt, Vue, SvelteKit, Remix, or custom renderers, use buildSeoHead() from sanity-plugin-seofields/head.

Full guide: Frontend integration

Common Links

| Topic | Link | | :------------------------- | :----------------------------------------------------------------------------- | | Quick start | Docs | | Plugin configuration | Docs | | Frontend integration | Docs | | AI content generation | Docs | | SEO Health Dashboard | Docs | | Schema.org structured data | Docs | | CLI | Docs | | License key | Get license |

Package Exports

| Import path | Use | | :------------------------------------ | :----------------------------------------------------------- | | sanity-plugin-seofields | Studio plugin, schema types, dashboard helpers, shared types | | sanity-plugin-seofields/head | Framework-neutral SEO helpers | | sanity-plugin-seofields/server | Server-side AI proxy adapters | | sanity-plugin-seofields/next | Next.js metadata helpers and React meta tags | | sanity-plugin-seofields/schema | Schema.org Sanity schema plugins | | sanity-plugin-seofields/schema/next | Schema.org React JSON-LD components | | sanity-plugin-seofields/define-cli | CLI configuration helper |

CLI

npx seofields

Docs: CLI guide

Compatibility

| Runtime | Supported | | :------------ | :--------------------- | | Node.js | >=18 | | Sanity Studio | ^3, ^4, ^5, ^6 | | @sanity/icons | >=3 (v3, v4, v5) | | React | ^18, ^19 | | Module format | ESM and CommonJS | | TypeScript | Included |

Contributing

License

MIT © Hardik Desai