This is a simple skeleton theme powered by the WordPress REST API and Vue.js. The aim is to demonstrate how to create a single page application using Vue.js to power the front end site while fetching data from the backend via the WordPress REST API, all without sacrificing SEO.
This project has multiple branches. Each branch adds a feature overtop the prior branch. The history/progression is as follows:
- Vue-2: Upgrades the original codebase to Vue 2.0+
- WP-Router: Adds in an automatic routing for all Wordpress paths
- TBD..
To use the theme on your WordPress site just install it like any other theme, but you'll likely need to compile the dist/build.js file.
All of the Vue.js specific code is in the rest-theme/src
folder. To build the dist/build.js
script while
developing run the following from the theme root:
npm run dev
To build the dist/build.js
script before deploying run:
npm run build
- 2018-04: Using native WP Nav, subdirectory installs safe.
- 2018-03: WordpressRoute Builder added
- 2018-03: Vue 2.0 Compatible (@MW)
- 2016-02: Vue 1.0 Based (@GP)
Some of the libraries used in the making of this theme:
The WP REST Theme was originally created by Gilbert Pellegrom from Dev7studios. Released under the MIT license.