pantheon-systems-ps / pantheon_nextjs_demo
Configures a Drupal site as the headless backend for a single Next.js front end on Pantheon: content model, JSON:API, OAuth, and the Next.js module wired up.
Package info
github.com/pantheon-systems-ps/pantheon_nextjs_demo
Type:drupal-recipe
pkg:composer/pantheon-systems-ps/pantheon_nextjs_demo
Requires
- drupal/consumers: ^1.24
- drupal/core: >=10.4
- drupal/decoupled_router: ^2.0
- drupal/next: ^2.1
- drupal/pathauto: ^1.15
- drupal/simple_oauth: ^6.1
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is not auto-updated.
Last update: 2026-11-04 22:20:34 UTC
README
A Drupal recipe that configures a Drupal 10.4+ site as the headless backend for a single Next.js front end on Pantheon. It wires up the content model, JSON:API, OAuth, and the Next.js module so the front end can read content and revalidate pages out of the box.
Single-site variant. This recipe backs one Next.js front end. For a shared backend serving multiple independent front ends — with per-site content scoping via a
field_next_sitereference and layered vertical recipes — usepantheon-systems-ps/pantheon_nextjs_multi_demoinstead.
Requirements
- Drupal core 10.4 or newer.
drupal/nextplusdecoupled_router,consumers,simple_oauth, andpathauto— all pulled in automatically when you require this package.
What it adds
- Page, Article, and Event content types, with their fields and form/view displays.
next.next_site.nextjs: registers the Next.js front end with base, preview, and revalidate URLs. The base URL is a recipe input (base_url), overridable per environment.nextjsnavigation menu, with the Page content type wired to use it.- JSON:API and the
linkset_endpointfeature flag enabled for decoupled routing. - Preview and revalidation for Page, Article, and Event: each content type previews on
the
nextjssite and revalidates it with Drupal cache tags when content changes. nextjs_previewrole and OAuth scope, so the front end can read unpublished content for draft preview. The client secret and signing keys carry secrets, so they are set up at install time rather than shipped here.
Apply
composer require pantheon-systems-ps/pantheon_nextjs_demo drush recipe recipes/pantheon_nextjs_demo drush cache:rebuild
Set the front-end base URL for your environment:
drush recipe recipes/pantheon_nextjs_demo \ --input=pantheon_nextjs_demo.base_url=https://your-frontend.example
Pair it with
pantheon-systems-ps/pantheon_nextjs_demo_content
to fill the site with ready-made sample content.