Skip to content

Commit

Permalink
Extract metadata title and description (#770)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChangoMan committed Mar 12, 2024
1 parent d7334d2 commit 2e7dc5a
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions packages/nextjs/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,23 @@ const baseUrl = process.env.VERCEL_URL
: `http://localhost:${process.env.PORT || 3000}`;
const imageUrl = `${baseUrl}/thumbnail.jpg`;

const title = "Scaffold-ETH 2 App";
const titleTemplate = "%s | Scaffold-ETH 2";
const description = "Built with πŸ— Scaffold-ETH 2";

export const metadata: Metadata = {
metadataBase: new URL(baseUrl),
title: {
default: "Scaffold-ETH 2 App",
template: "%s | Scaffold-ETH 2",
default: title,
template: titleTemplate,
},
description: "Built with πŸ— Scaffold-ETH 2",
description,
openGraph: {
title: {
default: "Scaffold-ETH 2 App",
template: "%s | Scaffold-ETH 2",
default: title,
template: titleTemplate,
},
description: "Built with πŸ— Scaffold-ETH 2",
description,
images: [
{
url: imageUrl,
Expand All @@ -32,10 +36,10 @@ export const metadata: Metadata = {
card: "summary_large_image",
images: [imageUrl],
title: {
default: "Scaffold-ETH 2",
template: "%s | Scaffold-ETH 2",
default: title,
template: titleTemplate,
},
description: "Built with πŸ— Scaffold-ETH 2",
description,
},
icons: {
icon: [{ url: "/favicon.png", sizes: "32x32", type: "image/png" }],
Expand Down

0 comments on commit 2e7dc5a

Please sign in to comment.