A Wordpress theme to create Vue SPA site with WP as a Headless CMS
- Hot reloading/browsersync for local development.
- VueRouter integrated
- Vuex integrated (with sample WordPress-centric modules)
- Axios for API requests
- Bare essentials needed for a functional WordPress theme
- All requests are redirected back to the index.php so your Vue routing is respected.
- Clone the repo inside of your
wp-content/themes/
directory - Navigate to the theme directory in your terminal and run
npm install
npm run watch
for developmentnpm run build
when you're ready to deploy the theme. - Activate the theme in your WordPress instance.
- Update your permalink settings
(Settings -> Permalinks)
to be "Day and name". If you don't want to use this setting you'll need to update the Vue router so it can find your content correctly. Please note that if you want to use a different permalink structure you'll need to update./src/router/index.js
so it looks for the correct path.