From 99fc22eccc37822080c6d6250234edcacbe46d11 Mon Sep 17 00:00:00 2001 From: Dorian Niemiec Date: Tue, 5 Nov 2024 19:19:02 +0100 Subject: [PATCH] feat: add a root layout --- app/(root)/layout.js | 37 +++++++++++++++++++++++++++++++++++++ app/{ => (root)}/page.js | 0 app/layout.js | 4 +++- 3 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 app/(root)/layout.js rename app/{ => (root)}/page.js (100%) diff --git a/app/(root)/layout.js b/app/(root)/layout.js new file mode 100644 index 0000000..bca4e7d --- /dev/null +++ b/app/(root)/layout.js @@ -0,0 +1,37 @@ +import { ThemeProvider } from "next-themes"; + +export const metadata = { + title: "MERNMail - a MERN stack webmail application", + description: + "MERNMail: Open-source webmail app built with MERN stack. Send, receive, & manage emails easily. Explore and contribute today!", + openGraph: { + title: "MERNMail - a MERN stack webmail application", + description: + "MERNMail: Open-source webmail app built with MERN stack. Send, receive, & manage emails easily. Explore and contribute today!", + url: `${process.env.NEXT_PUBLIC_WEBSITE_URL}`, + type: "website", + images: [ + { + url: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/metadata/mernmail-cover.png`, + width: 2560, + height: 1440, + alt: "MERNMail - a MERN stack webmail application", + }, + ], + }, + twitter: { + card: "summary_large_image", + site: "@MERNMail", + title: "MERNMail - a MERN stack webmail application", + description: + "MERNMail: Open-source webmail app built with MERN stack. Send, receive, & manage emails easily. Explore and contribute today!", + images: [ + `${process.env.NEXT_PUBLIC_WEBSITE_URL}/metadata/mernmail-cover.png`, + ], + creator: "@MERNMail", + }, +}; + +export default function RootLayout({ children }) { + return <>{children}; +} diff --git a/app/page.js b/app/(root)/page.js similarity index 100% rename from app/page.js rename to app/(root)/page.js diff --git a/app/layout.js b/app/layout.js index 1d68a56..4fbe0df 100644 --- a/app/layout.js +++ b/app/layout.js @@ -32,7 +32,9 @@ export const metadata = { title: "MERNMail - a MERN stack webmail application", description: "MERNMail: Open-source webmail app built with MERN stack. Send, receive, & manage emails easily. Explore and contribute today!", - images: [`${process.env.NEXT_PUBLIC_WEBSITE_URL}/metadata/svrjs-cover.png`], + images: [ + `${process.env.NEXT_PUBLIC_WEBSITE_URL}/metadata/mernmail-cover.png`, + ], creator: "@MERNMail", }, };