6 ms·
Does this work with static site generators? For the API requests per month pricing tiers, roughly how many API calls get made each time a site build is trigger
by seanwilson 8y ago
Does this work with static site generators?
For the API requests per month pricing tiers, roughly how many API calls get made each time a site build is triggered for a site with say 100 blog posts?
- tonyspiro 8y agoYes, 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.