Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/maxkostinevich/Cloudflare-Favicon-Generator

Serverless Favicon Generator
https://github.com/maxkostinevich/Cloudflare-Favicon-Generator

cloudflare cloudflare-workers favicon favicon-generator serverless

Last synced: 2 months ago
JSON representation

Serverless Favicon Generator

Awesome Lists containing this project

README

        

![fav](https://fav.frontier.workers.dev/)


# Serverless Favicon Generator

A simple serverless function which generates a Github-like favicon to be hosted on [Cloudflare Workers](https://workers.cloudflare.com/). Inspired by [Identicon.js](https://github.com/stewartlord/identicon.js)

## Usage

Just add link to function to your website:

```

```

You can also pass the following parameters:

- **hash** - pass this parameter if you'd like to get the same favicon on each request. This is a hashed string (min 15 char length), for example - you may use md5 of your domain name;
- **fg** - hex of foreground color, excluding `#`, e.g. `FF0000`
- **bg** - hex of background color, excluding `#`, e.g. `FF0000`

For example:

```

```

## Deploy your own instance

You may deploy this function to your own Cloudflare Workers account.

To do this, make sure [CF Wrangler](https://developers.cloudflare.com/workers/quickstart) is installed and configured on your machine, and run `wrangler publish` in your console.

---

### [MIT License](https://opensource.org/licenses/MIT)

(c) 2020 [Max Kostinevich](https://maxkostinevich.com) - All rights reserved.