UNPKG

sanity-plugin-seo-tools

Version:

> Upgrading from V2 to V3 is a breaking change. The `seo-tools` input has been replaced by a SEO pane which needs to be set-up using a custom desk structure as per the installation guide. Secondly, the previously automatically provided fields (focus keywo

24 lines (23 loc) 898 B
import { ReactNode } from 'react'; import type { SanityDocument } from '@sanity/types'; export type SeoFields = { focus_keyword: string; seo_title: string; meta_description: string; focus_synonyms: string[]; }; export type PreparedData = { title: string; description: string; locale: string; content: string; }; export type SeoToolsContextValue<Document extends SanityDocument = SanityDocument> = { fetch: boolean; contentSelector?: string; select: (doc: Document) => Partial<SeoFields> | Promise<Partial<SeoFields>>; resolveProductionUrl: (doc: Document) => URL | Promise<URL>; render: (seo: Partial<SeoFields>, data: PreparedData, serpPreview: ReactNode) => ReactNode; prepare?: (doc: Document) => PreparedData | Promise<PreparedData>; }; export declare const SeoToolsContext: import("react").Context<SeoToolsContextValue<SanityDocument>>;