krata/_posts/2019-08-11-customize-the-fa...

40 lines
1.8 KiB
Markdown
Raw Normal View History

2019-09-30 14:38:58 +02:00
---
2020-04-06 20:11:50 +02:00
title: Customize the Favicon
author: Cotes Chung
2019-09-30 14:38:58 +02:00
date: 2019-08-11 00:34:00 +0800
categories: [Blogging, Tutorial]
tags: [favicon]
toc: false
---
2019-11-16 16:12:26 +01:00
In [**Chirpy**](https://github.com/cotes2020/jekyll-theme-chirpy/), the image files of [Favicons](https://www.favicon-generator.org/about/) are placed in `assets/img/favicons/`. You may need to replace them with your own. So let's see how to customize these Favicons.
2019-09-30 14:38:58 +02:00
2020-06-01 08:45:48 +02:00
With a square image (PNG, JPG or GIF) in hand, open the site [*Favicon & App Icon Generator*](https://www.favicon-generator.org/) and upload your original image.
2019-09-30 14:38:58 +02:00
2021-01-09 15:31:43 +01:00
![upload-image](https://cdn.jsdelivr.net/gh/cotes2020/chirpy-images/posts/20190811/upload-image.png)
2019-09-30 14:38:58 +02:00
2019-10-11 18:46:12 +02:00
Click button <kbd>Create Favicon</kbd> and wait a moment for the website to generate the icons of various sizes automatically.
2019-09-30 14:38:58 +02:00
2021-01-09 15:31:43 +01:00
![download-icons](https://cdn.jsdelivr.net/gh/cotes2020/chirpy-images/posts/20190811/download-icons.png){: width="600"}
2019-09-30 14:38:58 +02:00
2019-11-16 16:12:26 +01:00
Download the generated package, unzip and delete the following two from the extracted files:
2019-10-10 18:06:18 +02:00
- browserconfig.xml
- manifest.json
2021-01-09 15:31:43 +01:00
Now, copy the remaining image files (`.PNG` and `.ICO`) from the extracted `.zip` file to cover the original files in the folder `assets/img/favicons/`.
2019-09-30 14:38:58 +02:00
The following table helps you understand the changes to the icon file:
> ✓ means keep, ✗ means delete.
| File(s) | From Favicon & App Icon Generator | From Chirpy |
|---------------------|:---------------------------------:|:-----------:|
| `*.PNG` | ✓ | ✗ |
| `*.ICO` | ✓ | ✗ |
| `browserconfig.xml` | ✗ | ✓ |
| `manifest.json` | ✗ | ✓ |
The next time you build the site, the icon will be replaced with a customized edition.