From 8cd4ba4463a1a83f572d813de6301440f6a09af4 Mon Sep 17 00:00:00 2001 From: Liam Date: Mon, 15 Apr 2024 09:13:52 +0100 Subject: [PATCH] add site metadata --- config.json | 5 +++++ src/app/layout.tsx | 24 ++++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 config.json diff --git a/config.json b/config.json new file mode 100644 index 0000000..0d8f1f1 --- /dev/null +++ b/config.json @@ -0,0 +1,5 @@ +{ + "siteName": "Minecraft Utilities", + "siteDescription": "Minecraft Utilities offers you many endpoints to get information about a minecraft server or a player.", + "siteUrl": "https://mcutils.xyz/" +} diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 6c82d6d..4be3d6f 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -1,13 +1,37 @@ import Container from "@/components/container"; import ThemeProvider from "@/components/theme-provider"; +import { Metadata, Viewport } from "next"; import { ToastContainer } from "react-toastify"; +import Config from "../../config.json"; + import { Inter } from "next/font/google"; import "react-toastify/dist/ReactToastify.css"; import "./globals.css"; const inter = Inter({ subsets: ["latin"] }); +export const viewport: Viewport = { + themeColor: "#3498DB", +}; + +export const metadata: Metadata = { + metadataBase: new URL(Config.siteUrl), + title: { + template: Config.siteName + " - %s", + default: Config.siteName, + }, + description: Config.siteDescription, + keywords: "Minecraft, APIs, wrapper, utility, development", + openGraph: { + title: Config.siteName, + description: Config.siteDescription, + url: Config.siteUrl, + locale: "en_US", + type: "website", + }, +}; + export default function RootLayout({ children, }: Readonly<{