®Docs

Sanity

Publish SEO articles into a Sanity dataset with schema-aware field mapping.

What the Sanity integration does

Sanity publishing writes Superpractice articles into a Sanity project and dataset. It supports common blog schemas and advanced mapping for custom schemas.

Setup

  1. Create a Sanity API token with dataset write access from Sanity Manage.
  2. Open Settings > Integrations > Sanity.
  3. Enter the project ID, dataset, API version, and token.
  4. Click Connect Sanity.
  5. Set the default author, blog base URL, and publish mode.
  6. If your schema differs from common blog defaults, open Advanced Schema Mapping.
  7. Map document type, author type, category type, and article fields.
  8. Save settings and publish a draft test article.

Schema mapping

FieldRequiredNotes
Document typeYesThe Sanity type used for articles, commonly post.
Title fieldYesUsually title.
Slug fieldYesUsually slug.
Body fieldYesSupports Portable Text, HTML, or Markdown depending on your schema.
Featured image fieldNoUsually mainImage.
Author and categoriesNoMap these if your content model uses references.

Test publishing

  1. Set default publish mode to draft.
  2. Publish a test article from Superpractice SEO.
  3. Open Sanity Studio and confirm the document is created in the expected type.
  4. Confirm title, slug, excerpt, body, featured image, author, and categories.
  5. If any field is empty, update Advanced Schema Mapping and publish another draft.

On this page