Next.XP app
Contents
The Next.XP app is the Enonic XP companion to a Next.js front end. Install it from Enonic Market and add it to each XP site rendered through Next.XP.
This page documents Next.XP app 4, released with Next.XP 5. The app versions independently of @enonic/nextjs-adapter, so its major does not match the product version. |
The app connects Content Studio to the external front end. It makes the Next.js site available to editors for authenticated preview and notifies the front end when published content must be revalidated. Public visitors still access Next.js directly.
Install and connect
-
Install Next.XP from Enonic Market into Enonic XP 8.
-
Ensure Guillotine is installed and configured for every project the front end will query.
-
Add the Next.XP app to the XP site.
-
Define at least one front-end URL and shared secret as described in Configuration.
-
Select that front-end configuration in the site’s Next.XP config form, then save the site.
-
Open the site in Content Studio and verify that preview loads the Next.js front end.
The application that owns the site’s content types and page components remains a separate XP application.
What the app provides
Authenticated preview
The app proxies Content Studio page and component requests to Next.js. It carries the current editor’s XP session, render mode, project, and site context, then adapts the response for Content Studio. Guillotine queries are consequently performed with the authenticated editor’s permissions.
See Preview for the request flow, protected front-end endpoints, and component refresh behavior.
Published-content revalidation
The app listens for published XP content changes and calls the selected front end’s protected revalidation endpoint. This lets Next.js refresh affected routes while continuing to serve the public site through its normal hosting and cache infrastructure.
See Revalidation for event and path handling.
Division of responsibility
The Next.XP app does not render the public website or replace Guillotine:
-
Enonic XP and Content Studio manage content and page composition.
-
Guillotine exposes that content to the front end.
-
The Next.js application and adapter fetch and render the website.
-
The Next.XP app supplies the bridge required for editor preview and cache revalidation.
After installation, use Configuration to define the reachable Next.js deployments and secure their protected endpoints.