This package has been revamped and relaunched as CloakWP.js. Go there.
An NPM package for integrating WordPress into your NextJS front-end.
This is for next-wp package developers only:
- Install Yalc globally
npm i yalc -g
cd next-wp
yalc publish
- Change to parent project folder
cd my-project
yalc add next-wp
yalc link next-wp
- To push changes made to
next-wp
to your parent project in real-time, run the watcher scriptnpm run watch
- Run
yalc remove next-wp
inside parent project to remove locally linked package
NEXTWP_DEV_URL= # NextJS dev server URL
NEXTWP_PROD_URL= # NextJS prod server URL
WORDPRESS_GRAPH_API= # Wordpress GraphQL endpoint
WORDPRESS_REST_API= # Wordpress Rest API endpoint
CUSTOM_NEXT_WP_CONFIG_PATH= # Set a custom path to configuration file