This removes the reliance on raw github hosting and instead relies on the Vercel deployment hosting the logo images.
Since we already have static files in each deployment (tarballs), it makes sense to start adding static images too.
This PR converts the `frameworks.json` file to TypeScript, and extends the values with the detection logic from `@vercel/static-build`, so that it's publicly editable. You also don't need to do the type casting downstream anymore.
As a consequence, it also makes Zola a 1st-class framework, as it was previously missing from the `frameworks.json` file, but present in the static-build frameworks. An example has been included based on their "Getting Started" tutorial.
CH-3808
CH-18771
This PR adds an optional property called `sort` to each framework so that we can change the order returned in the API.
The reason this is necessary is because the order of the original array determines the precedence of framework detection. So we need another way to indicate the order of templates/examples returned from the API.
In particular, we need "Next.js" to be first and "Other" to be last.
I also updated the deprecated `@now/node` usage to `@vercel/node` in the API.
* Add API for frameworks and examples
* Adjust headers
* Update frameworks list
* Always use latest
* Add types
* Use now repo for downloading and listing
* Use .existsSync
* Remove unused packages
* Use 307 for redirect
* Add examples
* Update tsconfig.json
Co-Authored-By: Steven <steven@ceriously.com>
* Make examples unique
* Remove detectors from frameworks API
* Use /api instead of Next.js
* Install dependencies
* Rename project
* Change name
* Empty
* Change name
* Update api/tsconfig.json
Co-Authored-By: Steven <steven@ceriously.com>
* Update examples
Co-authored-by: Steven <steven@ceriously.com>