Skip to content

Commit

Permalink
🧹 Chore: Add PNG versions to all images to ensure SEO compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
danielbakas authored Jul 6, 2024
2 parents efcd1b8 + 65a17ea commit 79aafb0
Show file tree
Hide file tree
Showing 7 changed files with 83 additions and 19 deletions.
Binary file added public/favicon-dark.ico
Binary file not shown.
Binary file added public/favicon.ico
Binary file not shown.
Binary file added public/icon-dark.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 public/icon.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 public/seo-dark.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 public/seo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
102 changes: 83 additions & 19 deletions src/backend/logic/seo.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,44 +45,96 @@ export async function getMetadata() {
icons: {
apple: [
{
type: "image/svg+xml",
media: "(prefers-color-scheme: light)",
url: "/icon.svg"
},
{
type: "image/png",
media: "(prefers-color-scheme: light)",
url: "/icon.png"
},
{
type: "image/svg+xml",
media: "(prefers-color-scheme: dark)",
url: "/icon-dark.svg",
url: "/icon-dark.svg"
},
{
type: "image/png",
media: "(prefers-color-scheme: dark)",
url: "/icon-dark.png"
},
],
icon: [
{
type: "image/svg+xml",
media: "(prefers-color-scheme: light)",
url: "/icon.svg"
},
{
type: "image/png",
media: "(prefers-color-scheme: light)",
url: "/icon.png"
},
{
type: "image/svg+xml",
media: "(prefers-color-scheme: dark)",
url: "/icon-dark.svg"
},
{
type: "image/png",
media: "(prefers-color-scheme: dark)",
url: "/icon-dark.png"
},
],
shortcut: [
{
type: "image/svg+xml",
media: "(prefers-color-scheme: light)",
url: "/favicon.svg"
},
{
type: "image/x-icon",
media: "(prefers-color-scheme: light)",
url: "/favicon.ico"
},
{
type: "image/svg+xml",
media: "(prefers-color-scheme: dark)",
url: "/favicon-dark.svg"
},
{
type: "image/x-icon",
media: "(prefers-color-scheme: dark)",
url: "/favicon-dark.ico"
}
],
icon: [{
media: "(prefers-color-scheme: light)",
url: "/icon.svg"
}, {
media: "(prefers-color-scheme: dark)",
url: "/icon-dark.svg"
}],
shortcut: [{
type: "image/x-icon",
media: "(prefers-color-scheme: light)",
url: "/favicon.svg"
}, {
type: "image/x-icon",
media: "(prefers-color-scheme: dark)",
url: "/favicon-dark.svg"
}],
},
keywords: app.keywords,
lang: app.lang,
openGraph: {
description: `${app.slogan} | ${app.description}`,
images: [
{
type: "image/svg+xml",
media: "(prefers-color-scheme: light)",
url: "/seo.svg"
},
{
type: "image/png",
media: "(prefers-color-scheme: light)",
url: "/seo.png"
},
{
type: "image/svg+xml",
media: "(prefers-color-scheme: dark)",
url: "/seo-dark.svg"
}
},
{
type: "image/png",
media: "(prefers-color-scheme: dark)",
url: "/seo-dark.png"
},
],
locale: app.lang,
siteName: app.name,
Expand All @@ -101,13 +153,25 @@ export async function getMetadata() {
description: `${app.slogan} | ${app.description}`,
images: [
{
type: "image/svg+xml",
media: "(prefers-color-scheme: light)",
url: "/seo.svg"
},
{
type: "image/png",
media: "(prefers-color-scheme: light)",
url: "/seo.png"
},
{
type: "image/svg+xml",
media: "(prefers-color-scheme: dark)",
url: "/seo-dark.svg"
}
},
{
type: "image/png",
media: "(prefers-color-scheme: dark)",
url: "/seo-dark.png"
},
],
siteId: "",
title: app.name,
Expand Down

0 comments on commit 79aafb0

Please sign in to comment.