Skip to main content

Configuring a Preview Site

Before You Begin

Make sure you have necessary permissions, for example login as Site Administrator user.

  1. Log in to your Drupal instance.
  2. Make sure Pantheon Decoupled & Decoupled Preview module are installed.

Creating a new Preview Site Configuration

  1. Go to the Configuration >> Web Services >> Front-End Sites section of your Drupal instance.
  2. Click on Add preview site to create a new configuration for your preview site.
  3. Fill out the form to set up the Label, URL, Secret, Preview Type, and select the Content Type required.
  4. Set the URL to point to http(s)://{YOUR_SITE_URL}/api/preview replacing {YOUR_SITE_URL} with the URL of your frontend site, or localhost:3000 for testing preview locally.
  5. Set a secret for the Preview Site and note this value down.

Editing an existing Preview Site Configuration

  1. Go to the Configuration >> Web Services >> Front-End Sites section of your Drupal instance.
  2. Locate the existing preview site you wish to edit, such as the Example NextJS Preview site.
  3. Click on Edit to open the configuration form.
  4. Update the placeholder URL to the desired URL for your preview site, from the example URL https://example.site/api/preview replace example.site with the URL of your frontend site or use localhost:3000 for local testing.
  5. Save your changes.
note

If you are not using the pantheon-decoupled plugin, the Structure >> Preview Sites section will provide comparable configuration.