Skip to content

Latest commit

 

History

History
70 lines (48 loc) · 1.63 KB

README.md

File metadata and controls

70 lines (48 loc) · 1.63 KB

a kawaii brownie

brownie

Add support for Google Analytics to your GitHub readme and cache your images for a faster loading experience! Built using deno and fp-ts.

getting started

  1. Install deno if you haven't already:
curl -fsSL https://deno.land/x/install/install.sh | sh
  1. Clone the repo:
git clone [email protected]:Jabolol/brownie.git .
  1. Fill in the .env file:
cp .env.example .env && vim .env
  1. 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 * * * *",
};
  1. This will make the endpoints /cocoa and /vanilla available and cache the images every 20 minutes. You can add as many routes as you want!

Note

It is common practice to make your routes ingredients of your brownie!

  1. Deploy to Deno Deploy and fill in the environment variables

  2. Add your freshly baked images to your readme

https://[your-deployed-url].deno.dev/cocoa
  1. The visits will be tracked in your Google Analytics dashboard!

contributing

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

license

This project is licensed under the MIT license.