refactor: update metatags

This commit is contained in:
trafficlunar 2025-05-10 19:57:35 +01:00
parent 5a01bfb234
commit 58032ed31b
3 changed files with 25 additions and 10 deletions

View file

@ -14,8 +14,25 @@ const lexend = Lexend({
}); });
export const metadata: Metadata = { export const metadata: Metadata = {
metadataBase: new URL(process.env.BASE_URL!),
title: "TomodachiShare", title: "TomodachiShare",
description: "Discover and share Mii residents for your Tomodachi Life island!", description: "Discover and share Mii residents for your Tomodachi Life island!",
keywords: ["mii", "tomodachi life", "nintendo", "tomodachishare", "tomodachi-share", "mii creator", "mii collection"],
category: "Gaming",
openGraph: {
locale: "en_US",
siteName: "TomodachiShare",
title: "TomodachiShare",
description: "Discover and share Mii residents for your Tomodachi Life island!",
images: "/preview.png",
},
twitter: {
card: "summary_large_image",
title: "TomodachiShare - Discover and Share Your Mii Residents",
description: "Discover and share Mii residents for your Tomodachi Life island!",
images: "/preview.png",
creator: "@trafficlunr",
},
robots: { robots: {
index: true, index: true,
follow: true, follow: true,

View file

@ -47,14 +47,13 @@ export async function generateMetadata({ params }: Props): Promise<Metadata> {
metadataBase: new URL(process.env.BASE_URL!), metadataBase: new URL(process.env.BASE_URL!),
title: `${mii.name} - TomodachiShare`, title: `${mii.name} - TomodachiShare`,
description: `Check out '${mii.name}', a Tomodachi Life Mii created by ${username} on TomodachiShare. From ${mii.islandName} Island with ${mii._count.likedBy} likes.`, description: `Check out '${mii.name}', a Tomodachi Life Mii created by ${username} on TomodachiShare. From ${mii.islandName} Island with ${mii._count.likedBy} likes.`,
keywords: [`mii`, `tomodachi life`, `nintendo`, ...mii.tags], keywords: ["mii", "tomodachi life", "nintendo", "tomodachishare", "tomodachi-share", "mii creator", "mii collection", ...mii.tags],
creator: username, creator: username,
category: "Gaming",
openGraph: { openGraph: {
locale: "en_US",
type: "article", type: "article",
title: `${mii.name} - TomodachiShare`,
description: `Check out '${mii.name}', a Tomodachi Life Mii created by ${username} on TomodachiShare. From ${mii.islandName} Island with ${mii._count.likedBy} likes.`,
images: [miiImageUrl, qrCodeUrl], images: [miiImageUrl, qrCodeUrl],
siteName: "TomodachiShare",
publishedTime: mii.createdAt.toISOString(), publishedTime: mii.createdAt.toISOString(),
authors: username, authors: username,
}, },

View file

@ -41,14 +41,13 @@ export async function generateMetadata({ params }: Props): Promise<Metadata> {
metadataBase: new URL(process.env.BASE_URL!), metadataBase: new URL(process.env.BASE_URL!),
title: `${user.name} (@${user.username}) - TomodachiShare`, title: `${user.name} (@${user.username}) - TomodachiShare`,
description: `View ${user.name}'s profile on TomodachiShare. Creator of ${user._count.miis} Miis. Member since ${joinDate}.`, description: `View ${user.name}'s profile on TomodachiShare. Creator of ${user._count.miis} Miis. Member since ${joinDate}.`,
keywords: [`tomodachi life`, `mii creator`, `nintendo`, `mii collection`, `profile`], keywords: ["mii", "tomodachi life", "nintendo", "mii creator", "mii collection", "profile"],
creator: user.username, creator: user.username,
category: "Gaming",
openGraph: { openGraph: {
locale: "en_US",
type: "profile", type: "profile",
images: [user.image ?? "/missing.svg"], title: `${user.name} (@${user.username}) - TomodachiShare`,
siteName: "TomodachiShare", description: `View ${user.name}'s profile on TomodachiShare. Creator of ${user._count.miis} Miis. Member since ${joinDate}.`,
images: [user.image ?? "/guest.svg"],
username: user.username, username: user.username,
firstName: user.name, firstName: user.name,
}, },
@ -56,7 +55,7 @@ export async function generateMetadata({ params }: Props): Promise<Metadata> {
card: "summary", card: "summary",
title: `${user.name} (@${user.username}) - TomodachiShare`, title: `${user.name} (@${user.username}) - TomodachiShare`,
description: `View ${user.name}'s profile on TomodachiShare. Creator of ${user._count.miis} Miis. Member since ${joinDate}.`, description: `View ${user.name}'s profile on TomodachiShare. Creator of ${user._count.miis} Miis. Member since ${joinDate}.`,
images: [user.image ?? "/missing.svg"], images: [user.image ?? "/guest.svg"],
creator: user.username!, creator: user.username!,
}, },
alternates: { alternates: {