This project is not covered by Drupal’s security advisory policy.

Decoupled Preview

Preview Drupal content on your decoupled front end site.

For a full description of the module, visit the
project page.

Submit bug reports and feature suggestions, or track changes in the
issue queue.

Features

  • Preview published content.
  • Preview while editing a node.
  • Preview revisions.
  • Configure multiple preview sites.
  • Specify the content types that each preview site applies to.
  • Specify an OAuth consumer related to a preview site.

Requirements

This module requires the following modules:

Installation

Require using composer:

composer require drupal/decoupled_preview

Install as you would normally install a contributed Drupal module. For further
information, see
Installing Drupal Modules.

Configuration

This module requires a patch to the Decoupled Router module. If you install this module with composer, allow patches to be applied from dependencies and require cweagans/composer-patches in the root of the project composer.json file. The patch will be applied automatically.

Navigate to Structure -> Preview Sites (/admin/structure/dp-preview-site), add
one or more preview sites, and configure the following:

  • Label: The name of the site.
  • Preview URL: The URL of the decoupled site you are providing preview data to.
  • Preview Secret: A token that will be passed to your decoupled site used to
    limit access to the preview.
  • Preview Type: The type of preview site - currently only Next.js is supported.
  • Content Types: The content types that this preview site applies to.

Preview Types

While we hope to expand in the future, the initial release of this module only
supports Next.js. It was developed in support of Pantheon's Next Drupal Starter, but can be applied to other
Next.js sites using a similar approach.

Supporting organizations: 
Sponsored development

Project information

Releases