Skip to content

Latest commit

 

History

History
59 lines (40 loc) · 1.39 KB

README.md

File metadata and controls

59 lines (40 loc) · 1.39 KB

WORDPRESS + REACT = REACTPRESS 💛

Start a SEO-friendly Decoupled Wordpress with React in minutes.

Gettings started

make sur CORS is enabled on Wordpress

add this to your wp-config.php to make sure CORS are enabled :

// allow CORS
header("Access-Control-Allow-Origin: *");

install

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"
};

Features

current features

  • 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)

planned features

  • authentification
  • comments

CSS

there several available ways to manage your css with Reactpress

import "../css/globals.css";