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.
Depends on
Dependencies of the latest stable release
No dependencies recorded for this project.
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