distributeaid / aggregated-public-information

https://aggregated-public-information.vercel.app
2 stars 3 forks source link

Feat(data-ingestion): Transfer needs assessment data from Gatsby to Strapi #48

Open TravisAlmey opened 4 months ago

TravisAlmey commented 4 months ago

Research approaches to transfer data from Gatsby to Strapi

Possible approaches include:

jtfairbank commented 4 months ago

Hey @TravisAlmey I was able to pull the processed needs assessment data out of the current landing site repo pretty easily (see attached here). The trick is:

  1. Modify the sourceNeedsAssessmentData.ts to import writeFileSync at the top, and then add writeFileSync("./needs-data.json", JSON.stringify(needsDatas)) to line 164 right before the for loop that creates the gatsby nodes
  2. Run yarn build to build the site, triggering Gatsby to source / process data for the site which will result in the needs data being written out to a file.

needs-data.json