nextjs-wordpress-starter
nextjs-wordpress-starter copied to clipboard
Break frontend into packages
Similar to the new monorepo plugin setup, break the NextJS frontend into packages, such as the following:
- [ ] Core - next/auth, ACF custom settings (to be moved out of ACF at a later time per #635)
- [ ] Block Handler - include in core for 1.0.0, break out into separate package at a later time
- [ ] Algolia
- [ ] Gravity Forms
- [ ] ACF - custom blocks, fields
- [ ] SEO
- [x] LazyBlocks, CPTs - remove entirely
9/1 EOD
- Discussion with @gregrickaby to narrow down frontend packages and clarify plan for moving forward.
- Continued setting up
corepackage structure.
9/2 EOD
corepackage:- Added Apollo client handling
- Added WP config handling to allow for dynamic WP-related env var usage
- Added WP Apollo client handling
- Added auth handling: user login, registration, refresh token queries and function calls
- Added post comment fragment
- Added function to dynamically create single post data fragment
9/3 EOD
corepackage:- Added remaining post handling (single, archive, category archive, tag archive)
- Added single page handling (standard dynamic pages)
- Added generic post type retrieval handling (single, archive, taxonomy archive)
9/7 EOD
corepackage:- Added
displayBlockfunction with dynamic imports - Added all currently-supported core block components with dependent components and functions
- Started adding route helper functions:
getPropTypesgetNextStaticPaths(single pages/posts only)getNextStaticProps(single pages/posts, archives, category/tag archives, next/auth frontend routes)
- Added query for error 404 page with function to retrieve a specified custom page set via headless config
- Added
9/8 EOD
corepackage:- Expanded handling
getNextStaticPathsandgetNextStaticProps - Misc fixes
- Expanded handling
- Started working on
basicexample to work withcorepackage - Troubleshooting package imports