Start a SEO-friendly Decoupled Wordpress with React in minutes.
add this to your wp-config.php to make sure CORS are enabled :
// allow CORS
header("Access-Control-Allow-Origin: *");
npm install
# start the dev server.
npm run dev
You're ready to go ! You can now start working by looking / hacking / editing pages and components and css directories !
By default, reactpress uses a demo API, so code is working out of the box.
To connect your own API, edit reactpress.config.js file and edit variable
wordpressUrl so that is points to your wordpress site with REST API V2 and CORS enabled :
export default {
wordpressUrl: "https://dev-reactpress.pantheonsite.io"
};
- Posts list, posts lists by category, posts lists by tag
- Page
- SEO Friendly : Server Side Rendering with Next.js
- Nices seo-friendly urls using wordpress slugs
- Page loader (progress bar)
- authentification
- comments
there several available ways to manage your css with Reactpress
- css-in-js with styled-jsx, which is shipped by default with Next : https://github.com/zeit/styled-jsx
- you can create classic css files and import them like this :
import "../css/globals.css";