Skip to content

Commit 9bdb191

Browse files
authored
Merge pull request #22 from thibaultduponchelle/favicons
Plenty of favicons improvements
2 parents 1b5a552 + 1ebea8b commit 9bdb191

File tree

5 files changed

+30
-6
lines changed

5 files changed

+30
-6
lines changed

.github/workflows/generate.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,15 @@ jobs:
1313
- name: Install prerequisites
1414
run: |
1515
npm i svgo
16-
sudo apt-get install -y librsvg2-bin
16+
sudo apt-get install -y librsvg2-bin imagemagick
1717
1818
- name: Clean exports directory
1919
run: |
2020
git rm blessed/exports/*.svg || true
2121
git rm blessed/exports/*.png || true
22+
git rm blessed/favicons/*.png || true
23+
git rm blessed/favicons/*.svg || true
24+
git rm blessed/favicons/*.ico || true
2225
2326
- name: Generate all sizes in SVG and PNG
2427
run:
@@ -33,5 +36,6 @@ jobs:
3336
git config --global user.name "Assets Generator"
3437
git config --global user.email "thibaultduponchelle@users.noreply.github.com"
3538
git add blessed/exports
39+
git add blessed/favicons
3640
git commit -m "Generate several sizes in SVG and PNG" || true
3741
git push || true

FAVICONS.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Favicons
2+
We provide a `favicon.ico` with multiple sizes and a SVG
3+
4+
You can find them at [blessed/favicons/](blessed/favicons/)
5+
6+
```html
7+
<link rel="icon" href="/favicon.ico" type="image/x-icon">
8+
<link rel="icon" href="/icon.svg" type="image/svg+xml">
9+
```
10+
11+
This is minimal setup, you can install [more favicons and manifests](https://developer.mozilla.org/en-US/docs/Glossary/Favicon).
12+
13+
## Notes
14+
SVG starts to be [more widely compatible](https://caniuse.com/link-icon-svg)
15+
but not enough yet to only use SVG favicons.

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,17 @@ CC-BY. We hope that you will take it, use it and make it your own.
1313

1414
There are several folders:
1515

16-
- `./base` contains the original camel artwork. This is the camel which is the
16+
- [base/](base/) contains the original camel artwork. This is the camel which is the
1717
source of the more polished artwork which is found elsewhere. All art in this
1818
repository is licensed under CC-BY, so you are free to use these images as
1919
source material.
20-
- `./experimental` contains experiments from which were used in coming up with
20+
- [experimental/](experimental/) contains experiments from which were used in coming up with
2121
final logo designs.
22-
- `./blessed` contains the "official" logos. If you are designing icons for an
22+
- [blessed/exports/](blessed/exports/) contains the "official" logos. If you are designing icons for an
2323
Operating System, an IDE or need a `favicon.ico`, we would ask you to draw
2424
from these assets.
25+
- [blessed/favicons/](blessed/favicons/) contains the "official" favicons.
26+
Read [FAVICONS](FAVICONS.md) for help with favicons.
2527

2628
### Attribution
2729

blessed/favicons/.gitkeep

Whitespace-only changes.

generate.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
cd blessed/src/
22
for f in `ls *.svg | sed s/\.svg//g`; do
33
for s in 64 300 800 1500 2500; do
4-
rsvg-convert -f svg -w $s $f.svg > ../exports/perl-$f-$s.svg;
5-
rsvg-convert -f png -w $s $f.svg > ../exports/perl-$f-$s.png;
4+
rsvg-convert -f svg -w $s -h $s $f.svg > ../exports/perl-$f-$s.svg;
5+
rsvg-convert -f png -w $s -h $s $f.svg > ../exports/perl-$f-$s.png;
66
done
77
done
8+
9+
convert -background transparent -define 'icon:auto-resize=16,24,32,64' 080.svg ../favicons/favicon.ico
10+
rsvg-convert -f svg -w 512 -h 512 080.svg > ../favicons/icon.svg;

0 commit comments

Comments
 (0)