academicpages / academicpages.github.io

Github Pages template for academic personal websites, forked from mmistakes/minimal-mistakes
https://academicpages.github.io
MIT License
12.13k stars 43.15k forks source link

Favicon revised: Prepare dark-theme-friendly favicon, make it 404-free, modern favicon handling #2337

Open hosiet opened 2 months ago

hosiet commented 2 months ago

Problems

I noticed the aging code around the handling of favicon in the theme. To be more concrete:

GET $HOST/images/android-chrome-192x192.png?v=M44lzPylqQ NS_ERROR_FAILURE
GET $HOST/images/favicon-32x32.png?v=M44lzPylqQ NS_ERROR_FAILURE

The QUERY_STRING here is suspicious. Those two icons also never existed anywhere.

Possible Solutions

I found the valuable blog article https://evilmartians.com/chronicles/how-to-favicon-in-2021-six-files-that-fit-most-needs , which should describe the best practice in handling favicon.

For the updated favicon choice: I would suggest using https://commons.wikimedia.org/wiki/File:OOjs_UI_icon_academic-progressive.svg , which comes with a blue icon that is visible both in dark theme and light theme. Its icon license is CC0-1.0, means that we can directly use it without any copyright concerns.