3 ms·
Yes, you can get all of your content from Cosmic at build time for your static site. Here are some resources that may help: Gatsby source plugin: https://www.n
by tonyspiro 8y ago
Yes, you can get all of your content from Cosmic at build time for your static site. Here are some resources that may help:
Gatsby source plugin:
https://www.npmjs.com/package/gatsby-source-cosmicjs https://www.npmjs.com/package/gatsby-source-cosmicjs
Gatsby Starter:
https://github.com/cosmicjs/gatsby-starter https://github.com/cosmicjs/gatsby-starter
Gatsby App:
https://cosmicjs.com/apps/gatsby-blog https://cosmicjs.com/apps/gatsby-blog
Gridsome App:
https://cosmicjs.com/apps/gridsome-blog https://cosmicjs.com/apps/gridsome-blog
For API requests:
To get all of your posts, you can use just one API request to the Objects endpoint.
Does this help?
- seanwilson 8y agoThanks! So you mean if I wanted to trigger a fresh build of a Gatsby site, it would only take a single API request to pull in all the content needed for the build? Even if you had thousands of posts and pages?
- tonyspiro 8y agoThat's right. You get up to 1,000 results (Objects) before you have to do multiple requests on the API.