- A React theme for WordPress, using Decoupled Architecture in Next.js
- Front end in React
- Backend in WordPress.
rename .env-example to .env and add your WordPress Site URL
- Download, Upload and activate all the plugins from wordpress/plugins folder of this repo, into your WordPress Site.
- wp-graphql - tested on ( v1.0.0 )
- Headless CMS
- WP GraphQL Gutenberg
npm run dev # Runs next dev which starts Next.js in development mode
npm run build # Runs next build which builds the application for production usage
npm run start # Runs next start which starts a Next.js production server
To run cypress locally we run cypress-open
It adds a cypress
directory and some example test in cypress/integrations
npm run cypress:open
- Cypress docs
Notice that we have added this in package.json
"dev": "NODE_OPTIONS='--inspect' next",
when you run npm run dev
, you will see a node js icon in the Chrome inspector tab and there will also be a url to access it on the terminal
that says Debugger listeing on ...
- Prerendering
- Querying blocks: WP GraphQL Gutenberg allows you to query Gutenberg blocks. If you want to break down the blocks and render the content using individual React components, here is the query example.
{
posts {
nodes {
title
blocks {
name
innerBlocks {
name
saveContent
}
saveContent
}
}
}
}