Installation
Install the plugin with your preferred package manager.
npm
Package Managers
npm
npm install sanity-plugin-seofieldsyarn
yarn add sanity-plugin-seofieldspnpm
pnpm add sanity-plugin-seofieldsRequirements
Sanity Studiov3 or v4
Reactv18 or v19
Register the Plugin
Add the plugin to your sanity.config.ts (or .js) file:
sanity.config.ts
import { defineConfig } from 'sanity'
import seofields from 'sanity-plugin-seofields'
export default defineConfig({
name: 'your-project',
title: 'Your Project',
projectId: 'your-project-id',
dataset: 'production',
plugins: [
seofields(), // Add the SEO fields plugin
// ... other plugins
],
schema: {
types: [
// ... your schema types
],
},
})Note: The plugin works with zero configuration. The SEO Health Dashboard and live preview are enabled by default.