Add support for Google Analytics to your GitHub readme and cache your images
for a faster loading experience! Built using deno
and
fp-ts
.
- Install deno if you haven't already:
curl -fsSL https://deno.land/x/install/install.sh | sh
- Clone the repo:
git clone git@github.com:Jabolol/brownie.git .
- Fill in the
.env
file:
cp .env.example .env && vim .env
- Edit the
config.ts
file to add your images and the cron schedule to cache the images:
export const config: RouteConfig = {
routes: {
cocoa: "https://my-stats.dev/contribs",
vanilla: "https://my-stats.dev/issues",
},
schedule: "*/20 * * * *",
};
- This will make the endpoints
/cocoa
and/vanilla
available and cache the images every20
minutes. You can add as many routes as you want!
Note
It is common practice to make your routes ingredients of your brownie!
-
Deploy to Deno Deploy and fill in the environment variables
-
Add your freshly baked images to your readme
https://[your-deployed-url].deno.dev/cocoa
- The visits will be tracked in your Google Analytics dashboard!
Contributions are welcome! Feel free to open an issue or submit a pull request. Please run the following commands and ensure that there are no errors:
deno fmt && deno lint
This project is licensed under the MIT license.