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-authand add "/frontend-editing/".
Post-Installation Editing submodule
After enabling next_preview_editing:
- Go to
/admin/config/system/jwt/path-authand 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.
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
- JSON Web Token Authentication (JWT)
- JSON Web Token Authentication (JWT) jwt_auth_consumer
- JSON Web Token Authentication (JWT) jwt_auth_issuer
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.
More in the Next ecosystem
Most installed first