Render WordPress Gutenberg content 1:1 in Next.js. Automatic script/stylesheet loading, middleware proxy, and multi-WordPress support.
@axistaylor/nextpress - NPM Package
npm install @axistaylor/nextpressComponents and utilities for rendering WordPress content in Next.js:
Content- Render WordPress HTML content with custom parsersHeadScripts/BodyScripts- Load WordPress scripts with dependency resolutionRenderStylesheets- Load WordPress stylesheets with inline styleswithWCR- Next.js configuration wrapperproxyByWCR- Middleware proxy for WordPress APIs
NextPress WordPress Plugin - WordPress Plugin
Add the GitHub repository to your composer.json:
{
"repositories": [
{
"type": "git",
"url": "https://github.com/AxisTaylor/nextpress.git"
}
]
}Then require the package:
composer require axistaylor/nextpress:dev-mainExtends WPGraphQL with queries for enqueued scripts and stylesheets.
See the docs for detailed guides:
- Getting Started
- WordPress Plugin
- Content Component
- HeadScripts / BodyScripts
- withWCR Configuration
- proxyByWCR Middleware
- Node.js 18+
- Next.js 14.2.5+
- WordPress 6.0+
- PHP 7.4+
- WPGraphQL 1.27.0+
- NPM Package: MIT
- WordPress Plugin: GPL-3.0-or-later