-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add
caching
and cron image refresh
- Loading branch information
Showing
3 changed files
with
92 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,8 @@ | |
|
||
# brownie | ||
|
||
Add support for **Google Analytics** to your GitHub readme. | ||
Add support for **Google Analytics** to your GitHub readme and cache your images | ||
for a faster loading experience! | ||
|
||
## getting started | ||
|
||
|
@@ -24,24 +25,31 @@ git clone [email protected]:Jabolol/brownie.git . | |
cp .env.example .env && vim .env | ||
``` | ||
|
||
4. Edit the [`config.ts`](./config.ts) file to add your images: | ||
4. Edit the [`config.ts`](./config.ts) file to add your images and the cron | ||
schedule to cache the images: | ||
|
||
```ts | ||
export const config: RouteConfig = { | ||
routes: { | ||
cocoa: "https://my-stats.dev/contribs", | ||
vanilla: "https://my-stats.dev/issues", | ||
}, | ||
schedule: { | ||
minute: { | ||
every: 20, | ||
}, | ||
}, | ||
}; | ||
``` | ||
|
||
5. This will make the endpoints `/cocoa` and `/vanilla` available | ||
5. 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! | ||
6. Deploy to [Deno Deploy](https://deno.com/deploy) and fill in the environment | ||
variables: | ||
variables | ||
|
||
7. Add your freshly baked images to your readme | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3ecd205
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Failed to deploy: