Improve favicon setup

This commit is contained in:
Helen Chong 2024-10-12 16:59:45 +08:00
parent 59ce265d86
commit 35c7f818ef
4 changed files with 20 additions and 19 deletions

View File

@ -4,6 +4,7 @@ export default function(eleventyConfig) {
eleventyConfig.addWatchTarget("./src/assets/"); eleventyConfig.addWatchTarget("./src/assets/");
eleventyConfig.addWatchTarget("./src/_bundle/"); eleventyConfig.addWatchTarget("./src/_bundle/");
eleventyConfig.addPassthroughCopy({ eleventyConfig.addPassthroughCopy({
"./src/assets/favicon/favicon.ico": "/favicon.ico",
"node_modules/@zachleat/details-utils/details-utils.js": "assets/js/details-utils.js", "node_modules/@zachleat/details-utils/details-utils.js": "assets/js/details-utils.js",
}); });
} }

View File

@ -1,4 +1,4 @@
<link rel="icon" sizes="32x32" href="/assets/favicon/favicon.ico"> <link rel="icon" sizes="32x32" href="/favicon.ico">
<link rel="icon" type="image/svg+xml" href="/assets/favicon/leilukin-bee-favicon.svg"> <link rel="icon" type="image/svg+xml" href="/assets/favicon/leilukin-bee-favicon.svg">
<link rel="apple-touch-icon" sizes="180x180" href="/assets/favicon/apple-touch-icon.png"> <link rel="apple-touch-icon" sizes="180x180" href="/assets/favicon/apple-touch-icon.png">
<link rel="manifest" href="/assets/favicon/site.webmanifest"> <link rel="manifest" href="/assets/favicon/site.webmanifest">

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

View File

@ -1,20 +1,20 @@
{ {
"name": "Leilukin's Hub", "icons": [
"short_name": "Leilukin's Hub", {
"icons": "src": "./android-chrome-192x192.png",
[ "sizes": "192x192",
{ "type": "image/png"
"src": "/assets/favicon/android-chrome-192x192.png", },
"sizes": "192x192", {
"type": "image/png" "src": "./icon-mask.png",
}, "type": "image/png",
{ "sizes": "512x512",
"src": "/assets/favicon/android-chrome-512x512.png", "purpose": "maskable"
"sizes": "512x512", },
"type": "image/png" {
} "src": "./android-chrome-512x512.png",
], "sizes": "512x512",
"theme_color": "#7A37A3", "type": "image/png"
"background_color": "#000000", }
"display": "standalone" ]
} }