FuelRats/fuelrats.com

Rewrite Blog pages and actions to use new Fuel Rats WP API.

Opened this issue · 0 comments

We have a new rest api built by NoLifeKing which renders data in JSONAPI format, includes and all. We can use it to significantly speed up our blog load times by dropping the synchronous request loading we do now in favor of having a all-in-one page that includes related data for us.

 

api docs: https://github.com/FuelRats/fuelrats-blogapi

 

Implementation Requirements

  • Blog data retrieval actions are rewritten to use wpService/axios, and points to [~NoLifeKing]'s wonderful blog API
  • Authors and Categories are either moved to their own global state objects, or separated from blog post objects within the blog global state
    • This is to simplify code required to support blog post filtering options down the line.
  • Blog pages (all.js and blog.js) are rewritten to work with the new JSON API format.
    • Preferably tracking it's own loading state
    • Server-side data loading should be avoided for now due to performance concerns caused by inconsistent response times from the wordpress server.