2019-07-09 10:36:40 +03:00
# All-in-one favicon generator
2019-07-09 09:54:49 +03:00
Generates all necessary favicons for your website.
2019-07-09 10:34:54 +03:00
This includes iOS Safari, Google Chrome, Mozilla Firefox, Windows 8 and 10, and possibly some other browsers.
2021-10-17 18:52:06 +03:00
## Getting Started
2019-07-09 10:34:54 +03:00
To get started with favicon generator you need to make sure [ImageMagick ](https://imagemagick.org/index.php ) and the latest [GNU make ](https://www.gnu.org/software/make/ ) software are installed and present in your PATH environment variable.
2021-10-17 18:52:06 +03:00
## Configuration
2019-11-17 22:55:25 +02:00
By default, makefile uses `convert` file of ImageMagick software, but you can change that by specifying a new name as a parameter for make
2021-10-17 18:52:06 +03:00
```make
2019-07-09 10:34:54 +03:00
make CC=< executable name >
```
or by changing the following line in a makefile
2021-10-17 19:41:34 +03:00
```make
CC = convert
2019-07-09 10:34:54 +03:00
```
Also, the default image filename make is looking for is `source.png` , and you can change that either passing the new filename as a parameter
2021-10-17 19:41:34 +03:00
```bash
2021-10-17 18:52:06 +03:00
make SOURCE=< image filename >
2019-07-09 10:34:54 +03:00
```
or by changing the following line
2021-10-17 19:41:34 +03:00
```make
2021-10-17 18:52:06 +03:00
SOURCE ?= < image filename >
2019-07-09 10:34:54 +03:00
```
2021-10-17 18:52:06 +03:00
## Using bash
2020-07-17 05:55:22 +03:00
You use bash script `generate.sh` to use the program anywhere on your system. First of, you have to create a symbolic link to an executable using the following command
2019-11-17 22:55:25 +02:00
```bash
$ ln -s < path to program > /generate.sh ~/.local/bin/webicongen
# example: ln -s ~/Programs/Favicons_generation/generate.sh ~/.local/bin/webicongen
```
then you can use it in such a way
```bash
$ webicongen < image > < output dir >
```
The output directory will be created automatically.
2021-10-17 18:52:06 +03:00
## Usage
2019-07-09 10:34:54 +03:00
After everything is configured, simply place your image in the same directory as makefile, and then simply run `make` . It will generate the following directory structure
```
2019-11-17 22:55:25 +02:00
dist/
2020-07-17 05:55:22 +03:00
├── public/
2019-11-17 22:55:25 +02:00
│ ├── apple-touch-icon.png
│ ├── apple-touch-icon-precomposed.png
│ ├── favicon.ico
2020-07-17 05:55:22 +03:00
│ ├── icons/
2019-11-17 22:55:25 +02:00
│ │ ├── android-chrome-192x192.png
│ │ ├── android-chrome-512x512.png
│ │ ├── apple-touch-icon-114x114.png
│ │ ├── apple-touch-icon-120x120.png
│ │ ├── apple-touch-icon-144x144.png
│ │ ├── apple-touch-icon-152x152.png
│ │ ├── apple-touch-icon-57x57.png
│ │ ├── apple-touch-icon-60x60.png
│ │ ├── apple-touch-icon-72x72.png
│ │ ├── apple-touch-icon-76x76.png
│ │ ├── apple-touch-icon.png
│ │ ├── favicon-128x128.png
│ │ ├── favicon-16x16.png
│ │ ├── favicon-192x192.png
│ │ ├── favicon-196x196.png
│ │ ├── favicon-228x228.png
│ │ ├── favicon-32x32.png
│ │ ├── favicon-48x48.png
│ │ ├── favicon-57x57.png
│ │ ├── favicon-76x76.png
│ │ ├── favicon-96x96.png
│ │ ├── ieconfig.xml
│ │ ├── mstile-144x144.png
│ │ ├── mstile-large.png
│ │ ├── mstile-medium.png
│ │ ├── mstile-small.png
│ │ └── mstile-wide.png
│ └── manifest.json
2023-06-04 09:25:39 +03:00
└── index.html
2019-07-09 10:34:54 +03:00
```
2023-06-04 09:25:39 +03:00
`index.html` contains HTML code that needs to be pasted in your document's head.