Skip to content

Commit

Permalink
fix: favicon
Browse files Browse the repository at this point in the history
Signed-off-by: Innei <i@innei.in>
  • Loading branch information
Innei committed Oct 10, 2023
1 parent 912f47b commit f9c969c
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 15 deletions.
40 changes: 40 additions & 0 deletions public/innei-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 2 additions & 13 deletions public/innei.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions src/app.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@
"scripts": []
},
"site": {
"favicon": "/innei.svg"
"favicon": "/innei.svg",
"faviconDark": "/innei-dark.svg"
},
"hero": {
"title": {
Expand Down Expand Up @@ -129,4 +130,4 @@
}
}
}
}
}
1 change: 1 addition & 0 deletions src/app/config.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export interface Custom {

export interface Site {
favicon: string
faviconDark?: string
}
export interface Hero {
title: Title
Expand Down
13 changes: 13 additions & 0 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,19 @@ export const generateMetadata = async () => {
type: 'image/svg+xml',
sizes: 'any',
},
{
rel: 'icon',
type: 'image/svg+xml',
url: config.site.favicon,
media: '(prefers-color-scheme: light)',
},
{
rel: 'icon',
type: 'image/svg+xml',
url: config.site.faviconDark || config.site.favicon,

media: '(prefers-color-scheme: dark)',
},
],

themeColor: [
Expand Down

1 comment on commit f9c969c

@vercel
Copy link

@vercel vercel bot commented on f9c969c Oct 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

shiro – ./

springtide.vercel.app
shiro-git-main-innei.vercel.app
innei.in
shiro-innei.vercel.app

Please sign in to comment.