GithubHelp home page GithubHelp logo

andresolg-dev / react-wordpress-theme Goto Github PK

View Code? Open in Web Editor NEW

This project forked from imranhsayed/react-wordpress-theme

0.0 0.0 0.0 4.98 MB

:art: A React theme for WordPress, using Decoupled Architecture. Front end in React. Backend in WordPress.

JavaScript 17.43% CSS 72.54% HTML 0.74% SCSS 9.29%

react-wordpress-theme's Introduction

React WordPress Theme ๐ŸŽจ

Project Status: WIP โ€“ Initial development is in progress. code style: prettier

A React theme for WordPress, using Decoupled Architecture. Front end in React. Backend in WordPress.

Live Demo

Live Demo

Performance

Maintainer

Name Github Username
Imran Sayed @imranhsayed

Usage

  1. Clone the WordPress plugin Headless CMS in your WordPress plugin directory and activate it.

  2. The REST API endpoints, registers custom endpoints and also registers two menus. So please create two menus Header Menu and Footer Menu and select their respective menu location as HCMS Header Menu and HCMS Footer Menu as shown in the picture.

  • Set Header menu as Travel Header Menu

  • Set Footer menu as Travel Footer Menu
  1. Set the siteURL and other settings in client-config.js.
const config = {
	siteURL: 'xxxxxx', // e.g. 'https://wordpressSite.com' 
	headerMenuLocation: 'hcms-menu-header', // Change this menu location name to another, if you would like a different menu to be used for header. 
	footerMenuLocation: 'hcms-menu-footer', // Change this menu location name to another, if you would like a different menu to be used for footer.
	siteTitle: 'React WordPress Theme', // Will be used if we don't set site title from WordPress customizer.
	siteDescription: 'Awesome theme', // Will be used if we don't set site description from WordPress customizer.
};

More settings can be found in client-config.js

Development

Install

Clone the repo and run

npm install

During development

Starts webpack dev server at localhost:8080

npm run dev

Production

Creates an index.html and JavaScript file in build directory.

npm run prod

Client Config Put your site URL name in the client-config.js; const siteUrl = 'https://yourWordPressSite.com';

Linting & Formatting

The following command will fix most errors and show and remaining ones which cannot be fixed automatically.

npm run eslint:fix

We follow the stylelint configuration used in WordPress Gutenberg, run the following command to lint and fix styles.

npm run stylelint:fix

Format code with prettier

npm run format-js

Run test

npm run test

Update test

npm run test:update

precommit

You should run precommit to check for any eslint, stylint errors/warnings and to ensure all tests are passing before making a PR ready for review.

npm run precommit

react-wordpress-theme's People

Contributors

imranhsayed avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.