Create Next.js site

Create a Next.js site on Drupal


Start by creating a Next.js site so that we can render the preview on Drupal.

  1. Visit /admin/config/services/next.
  2. Click Add Next.js site.
  3. Fill in the following values:
  • Label: Next.js site
  • Base URL: http://localhost:3000
  • Preview URL: http://localhost:3000/api/preview
  • Preview secret: secret
  1. Click Save

The Preview secret can be any string. This is the secret to you will use for the DRUPAL_PREVIEW_SECRET environment variable.