Configuring a Preview Site
Before You Begin
Make sure you have necessary permissions, for example login as Site Administrator user.
- Log in to your Drupal instance.
- Make sure Pantheon Decoupled & Decoupled Preview module are installed.
Creating a new Preview Site Configuration
- Go to the Configuration >> Web Services >> Front-End Sites section of your Drupal instance.
- Click on Add preview site to create a new configuration for your preview site.
- Fill out the form to set up the Label, URL, Secret, Preview Type, and select the Content Type required.
- Set the URL to point to http(s)://{YOUR_SITE_URL}/api/preview replacing
{YOUR_SITE_URL}
with the URL of your frontend site, orlocalhost:3000
for testing preview locally. - Set a secret for the Preview Site and note this value down.
Editing an existing Preview Site Configuration
- Go to the Configuration >> Web Services >> Front-End Sites section of your Drupal instance.
- Locate the existing preview site you wish to edit, such as the Example NextJS Preview site.
- Click on Edit to open the configuration form.
- Update the placeholder URL to the desired URL for your preview site, from the
example URL
https://example.site/api/preview
replaceexample.site
with the URL of your frontend site or uselocalhost:3000
for local testing. - Save your changes.
note
If you are not using the pantheon-decoupled plugin, the Structure >> Preview Sites section will provide comparable configuration.