How-to

Vercel Sanity Integration

Learn how to integrate Sanity with Vercel. Follow our tutorial to deploy the Sanity template or install the integration for real-time collaboration and structured content management.
Table of Contents

Sanity is a headless content management system that provides real-time collaboration and structured content management. It offers a highly customizable content studio and a powerful API, allowing developers to integrate and manage content across various platforms and devices.

To get started with the Sanity on Vercel deploy the template below:

Or, follow the steps below to install the integration:

  1. To pull in environment variables from Sanity to your Vercel project, you need to install the Vercel CLI. Run the following command in your terminal:

    pnpm
    yarn
    npm
    pnpm i -g vercel@latest
  2. Navigate to the Sanity integration and follow the steps to install the integration.

  3. Once you've installed the Sanity integration, you can pull in environment variables from Sanity to your Vercel project. In your terminal, run:

    vercel env pull .env.development.local

See your installed CMSs documentation for next steps on how to use the integration.

Content Link is available on Pro and Enterprise plans

Content Link enables you to edit content on websites using headless CMSs by providing links on elements that match a content model in the CMS. This real-time content visualization allows collaborators to make changes without needing a developer's assistance.

You can enable Content Link on a preview deployment through the Edit Mode button on the Vercel Toolbar.

The corresponding model in the CMS determines an editable field. You can hover over an element to display a link in the top-right corner of the element and then select the link to open the related CMS field for editing.

You don't need any additional configuration or code changes on the page to use this feature.

Last updated on September 19, 2024