Skip to content

Commit

Permalink
Fix handling of favicon
Browse files Browse the repository at this point in the history
Follow the blog of https://blog.ghkk.net/post/how-to-favicon-in-2021-six-files-that-fit-most-needs/

* Remove everything about mstile.
* Regenerate favicon using SVG file from
  https://commons.wikimedia.org/wiki/File:OOjs_UI_icon_academic-progressive.svg
  with minor tweaks in SVG viewBox.
* Provide .svg, .ico, 32x32, 192x192, 512x512, and apple 180x180 .png icons.

This commit closes: #2337 .
  • Loading branch information
hosiet committed Feb 4, 2025
1 parent 7f94030 commit b7379ff
Show file tree
Hide file tree
Showing 15 changed files with 16 additions and 99 deletions.
28 changes: 8 additions & 20 deletions _includes/head/custom.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,14 @@

<!-- start custom head snippets -->

<link rel="apple-touch-icon" sizes="57x57" href="{{ base_path }}/images/apple-touch-icon-57x57.png?v=M44lzPylqQ">
<link rel="apple-touch-icon" sizes="60x60" href="{{ base_path }}/images/apple-touch-icon-60x60.png?v=M44lzPylqQ">
<link rel="apple-touch-icon" sizes="72x72" href="{{ base_path }}/images/apple-touch-icon-72x72.png?v=M44lzPylqQ">
<link rel="apple-touch-icon" sizes="76x76" href="{{ base_path }}/images/apple-touch-icon-76x76.png?v=M44lzPylqQ">
<link rel="apple-touch-icon" sizes="114x114" href="{{ base_path }}/images/apple-touch-icon-114x114.png?v=M44lzPylqQ">
<link rel="apple-touch-icon" sizes="120x120" href="{{ base_path }}/images/apple-touch-icon-120x120.png?v=M44lzPylqQ">
<link rel="apple-touch-icon" sizes="144x144" href="{{ base_path }}/images/apple-touch-icon-144x144.png?v=M44lzPylqQ">
<link rel="apple-touch-icon" sizes="152x152" href="{{ base_path }}/images/apple-touch-icon-152x152.png?v=M44lzPylqQ">
<link rel="apple-touch-icon" sizes="180x180" href="{{ base_path }}/images/apple-touch-icon-180x180.png?v=M44lzPylqQ">
<link rel="icon" type="image/png" href="{{ base_path }}/images/favicon-32x32.png?v=M44lzPylqQ" sizes="32x32">
<link rel="icon" type="image/png" href="{{ base_path }}/images/android-chrome-192x192.png?v=M44lzPylqQ" sizes="192x192">
<link rel="icon" type="image/png" href="{{ base_path }}/images/favicon-96x96.png?v=M44lzPylqQ" sizes="96x96">
<link rel="icon" type="image/png" href="{{ base_path }}/images/favicon-16x16.png?v=M44lzPylqQ" sizes="16x16">
<link rel="manifest" href="{{ base_path }}/images/manifest.json?v=M44lzPylqQ">
<link rel="mask-icon" href="{{ base_path }}/images/safari-pinned-tab.svg?v=M44lzPylqQ" color="#000000">
<link rel="shortcut icon" href="/images/favicon.ico?v=M44lzPylqQ">
<meta name="msapplication-TileColor" content="#000000">
<meta name="msapplication-TileImage" content="{{ base_path }}/images/mstile-144x144.png?v=M44lzPylqQ">
<meta name="msapplication-config" content="{{ base_path }}/images/browserconfig.xml?v=M44lzPylqQ">
<meta name="theme-color" content="#ffffff">
<!-- favicon from https://commons.wikimedia.org/wiki/File:OOjs_UI_icon_academic-progressive.svg -->
<link rel="apple-touch-icon" sizes="180x180" href="{{ base_path }}/images/apple-touch-icon-180x180.png"/>
<link rel="icon" type="image/svg+xml" href="{{ base_path }}/images/favicon.svg"/>
<link rel="icon" type="image/png" href="{{ base_path }}/images/favicon-32x32.png" sizes="32x32"/>
<link rel="icon" type="image/png" href="{{ base_path }}/images/favicon-192x192.png" sizes="192x192"/>
<link rel="manifest" href="{{ base_path }}/images/manifest.json"/>
<link rel="icon" href="/images/favicon.ico"/>
<meta name="theme-color" content="#ffffff"/>
<link rel="stylesheet" href="{{ base_path }}/assets/css/academicons.css"/>


Expand Down
Binary file added images/apple-touch-icon-180x180.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 0 additions & 12 deletions images/browserconfig.xml

This file was deleted.

Binary file added images/favicon-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/favicon-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/favicon.ico
Binary file not shown.
1 change: 1 addition & 0 deletions images/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 7 additions & 33 deletions images/manifest.json
Original file line number Diff line number Diff line change
@@ -1,41 +1,15 @@
{
"name": "Minimal Mistakes",
"name": "OOjs UI icon academic-progressive",
"icons": [
{
"src": "\/images\/android-chrome-36x36.png?v=M44lzPylqQ",
"sizes": "36x36",
"type": "image\/png",
"density": 0.75
},
{
"src": "\/images\/android-chrome-48x48.png?v=M44lzPylqQ",
"sizes": "48x48",
"type": "image\/png",
"density": 1
},
{
"src": "\/images\/android-chrome-72x72.png?v=M44lzPylqQ",
"sizes": "72x72",
"type": "image\/png",
"density": 1.5
},
{
"src": "\/images\/android-chrome-96x96.png?v=M44lzPylqQ",
"sizes": "96x96",
"type": "image\/png",
"density": 2
},
{
"src": "\/images\/android-chrome-144x144.png?v=M44lzPylqQ",
"sizes": "144x144",
"type": "image\/png",
"density": 3
"src": "/images/favicon-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "\/images\/android-chrome-192x192.png?v=M44lzPylqQ",
"sizes": "192x192",
"type": "image\/png",
"density": 4
"src": "/images/favicon-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
]
}
Binary file removed images/mstile-144x144.png
Binary file not shown.
Binary file removed images/mstile-150x150.png
Binary file not shown.
Binary file removed images/mstile-310x150.png
Binary file not shown.
Binary file removed images/mstile-310x310.png
Binary file not shown.
Binary file removed images/mstile-70x70.png
Binary file not shown.
34 changes: 0 additions & 34 deletions images/safari-pinned-tab.svg

This file was deleted.

0 comments on commit b7379ff

Please sign in to comment.