Overview for using Wordpress as a headless CMS, specifically with Nuxt.js
Theme currently using is wpapi-cms
- Advanced Custom Fields
- ACF to REST API
- WP-REST-API V2 Menus
- Custom Post Type UI
- JAMstack Deployments
There is wpapi-inc
which includes a file for each for each of the Customizations added to Wordpress. This will eventually be a plugin probably.
Gets all post types and registers it to be in rest-api
Checks if not on main site and if so, redirects to admin
Handles logic for getting site info, posts, & pages. @/lib/WpApi.js
Using Nuxt's generate
feature to get posts and pages from API and generate them for a statically built site
TODO:
- Need to check if logged in and send straight to dashboard if so
- Check on adding https://wordpress.org/plugins/notification/