Skip to content

Commit 55cdf2b

Browse files
committed
docs: generate favicon.ico with transparent background
1 parent 470a881 commit 55cdf2b

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

docs/src/assets/favicon.ico

5.67 KB
Binary file not shown.

docs/src/assets/generate-favicon.sh

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/bin/bash
2+
3+
# ---------------------------------------------------------------
4+
# Script Name: SVG to ICO Converter
5+
# Description: This bash script automates the process of converting
6+
# an SVG (Scalable Vector Graphics) file to an ICO
7+
# (Icon) file. It uses the tools Inkscape and ImageMagick.
8+
# The script takes an SVG file 'logo.svg', scales it to a
9+
# 128x128 PNG image using Inkscape, then converts the PNG
10+
# image to an ICO file using ImageMagick, and finally removes
11+
# the temporary PNG file.
12+
#
13+
# Prerequisites: Please ensure Inkscape and ImageMagick are installed
14+
# on your system. For Arch Linux and its derivatives, you
15+
# can use the following command:
16+
# sudo pacman -S inkscape imagemagick
17+
#
18+
# Usage: To run the script, navigate to the directory containing the script
19+
# and the 'logo.svg' file, then execute the script. In a terminal,
20+
# you can do this by typing:
21+
# sh ./generate-favicon.sh
22+
# ---------------------------------------------------------------
23+
24+
# Export the SVG image to a temporary PNG image with Inkscape
25+
inkscape -w 128 -h 128 -o temp.png logo.svg
26+
27+
# Convert the PNG image to ICO with ImageMagick
28+
convert temp.png favicon.ico
29+
30+
# Remove the temporary PNG image
31+
rm temp.png

0 commit comments

Comments
 (0)