Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

NextJS Headless Preview

No security coverage Under active development 2 sites

Part of the Next ecosystem · 7 projects

This module embeds a preview of your Next.js application directly within Drupal's node view page. It also allows content editing directly within the front-end application through an isolated editing form.

This module provides a preview iFrame of your NextJS application on the node view page in Drupal and allows editing content through the front-end application.

Features

  • iFrame on node view that embeds the decoupled front-end for that page.
  • NextJS Headless Preview: Editing - This submodule provides an isolated edit form that can be iFramed to allow editing in the front-end application.

Post-Installation

  • The configuration form can be found under "Configuration > Content authoring". (/admin/config/content/preview)
  • Make sure your front-end application allows being embedded in an iframe from your Drupal site. (next_preview adds the path /frontend-editing/* to the allowed_iframed_site config, but depending on your site's security policies you may need to check your frame-ancestors headers)
  • Go to /admin/config/system/jwt/path-auth and add "/frontend-editing/".

Post-Installation Editing submodule

After enabling next_preview_editing:

  • Go to /admin/config/system/jwt/path-auth and add "/frontend-editing/".
  • Add a JWT key (/admin/config/system/keys/add). Example:
    • Key type: JWT HMAC Key
    • JWT Algorithm: HMAC using SHA-256 (HS256)
    • Key Provider: Environment
    • Environment Variable: JWT_TOKEN
  • Add the token to environment variables.

Additional Requirements

You need the NPM package next-drupal-preview installed and set up in your NextJS application. Please refer to the documentation.

Drupal 8–10 · not 11

Ask your assistant about NextJS Headless Preview

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
2
Tracked since
Nov 2023
Latest release
2 years ago
Releases (12 mo)
0
Maintenance
Dormant

Releases

Version Type Core PHP Release date
0.1.0 Stable 8–10 Dec 21, 2023
0.0.1 Stable 8–9 Nov 30, 2023