How-to
1 min read

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.

Content Link can be enabled on a preview deployment through the Edit Mode button on the Vercel Toolbar's.

The corresponding model in the CMS determines an editable field. Hover over an element to display a link in the top-right corner of the element. Select the link to open the related CMS field for editing.

An editable element with a link to open the related field in the CMS
An editable element with a link to open the related field in the CMS

Using this feature doesn't require any additional configuration or code changes to the page you want to edit.

Last updated on July 27, 2024