From 249934786c0861e863e9417f41a275eb95f7b672 Mon Sep 17 00:00:00 2001 From: MacRimi Date: Tue, 18 Feb 2025 20:00:51 +0100 Subject: [PATCH] Update --- web/app/layout.tsx | 41 +++------------------------------- web/app/metadata.ts | 54 +++++++++++++++++++++++++++++++++++++++++++++ web/app/page.tsx | 29 +++++++++--------------- 3 files changed, 68 insertions(+), 56 deletions(-) create mode 100644 web/app/metadata.ts diff --git a/web/app/layout.tsx b/web/app/layout.tsx index 96508d8..dd46841 100644 --- a/web/app/layout.tsx +++ b/web/app/layout.tsx @@ -1,48 +1,13 @@ import "./globals.css" -import { Inter } from "next/font/google" +import { Inter } from 'next/font/google' import Navbar from "@/components/navbar" import MouseMoveEffect from "@/components/mouse-move-effect" import type React from "react" -import type { Metadata } from "next" +import { metadata } from './metadata' const inter = Inter({ subsets: ["latin"] }) -const basePath = "/ProxMenux" - -const description = - "A menu-driven script for Proxmox VE management, designed to facilitate productivity, it simplifies automation and streamlines task execution." - - export const metadata = { - title: "ProxMenux", - generator: "Next.js", - applicationName: "ProxMenux", - referrer: "origin-when-cross-origin", - keywords: ["Proxmox VE", "VE", "ProxMenux", "MacRimi", "menu-driven", "menu", "scripts", "virtualization"], - authors: { name: "MacRimi" }, - creator: "MacRimi", - publisher: "MacRimi", - description, - favicon: "/favicon.ico", - apple: "/apple-touch-icon.png", - formatDetection: { - email: false, - address: false, - telephone: false, - }, - metadataBase: new URL(`https://macrimi.github.io${basePath}/`), - openGraph: { - title: "ProxMenux", - description, - url: "/main.png", - images: [ - { - url: `https://macrimi.github.io${basePath}/main.png`, - }, - ], - locale: "en_US", - type: "website", - }, - } +export { metadata } export default function RootLayout({ children, diff --git a/web/app/metadata.ts b/web/app/metadata.ts new file mode 100644 index 0000000..2becef6 --- /dev/null +++ b/web/app/metadata.ts @@ -0,0 +1,54 @@ +import type { Metadata } from 'next' + +const basePath = "/ProxMenux" + +const description = "A menu-driven script for Proxmox VE management, designed to facilitate productivity, it simplifies automation and streamlines task execution." + +export const metadata: Metadata = { + title: { + default: "ProxMenux", + template: "%s | ProxMenux", + }, + description, + generator: "Next.js", + applicationName: "ProxMenux", + referrer: "origin-when-cross-origin", + keywords: ["Proxmox VE", "VE", "ProxMenux", "MacRimi", "menu-driven", "menu", "scripts", "virtualization"], + authors: [{ name: "MacRimi" }], + creator: "MacRimi", + publisher: "MacRimi", + formatDetection: { + email: false, + address: false, + telephone: false, + }, + metadataBase: new URL(`https://macrimi.github.io${basePath}/`), + openGraph: { + title: "ProxMenux", + description, + url: `https://macrimi.github.io${basePath}/`, + siteName: "ProxMenux", + images: [ + { + url: `https://macrimi.github.io${basePath}/main.png`, + width: 1363, + height: 735, + }, + ], + locale: "en_US", + type: "website", + }, + twitter: { + card: "summary_large_image", + title: "ProxMenux", + description, + images: [`https://macrimi.github.io${basePath}/main.png`], + }, + icons: { + icon: [ + { url: "/favicon.ico", sizes: "any" }, + { url: "/icon.svg", type: "image/svg+xml" }, + ], + apple: [{ url: "/apple-touch-icon.png" }], + }, +} \ No newline at end of file diff --git a/web/app/page.tsx b/web/app/page.tsx index 4737c28..6267670 100644 --- a/web/app/page.tsx +++ b/web/app/page.tsx @@ -1,29 +1,22 @@ import dynamic from "next/dynamic" -import { Metadata } from "next" +import type { Metadata } from "next" +import { metadata as siteMetadata } from './metadata' const Hero = dynamic(() => import("@/components/hero"), { ssr: false }) const Resources = dynamic(() => import("@/components/resources"), { ssr: false }) const SupportProject = dynamic(() => import("@/components/support-project"), { ssr: false }) const Footer = dynamic(() => import("@/components/footer"), { ssr: false }) - export const metadata: Metadata = { - title: "ProxMenux", - description: - "A menu-driven script for Proxmox VE management, designed to facilitate productivity, it simplifies automation and streamlines task execution.", + ...siteMetadata, + title: "ProxMenux - Home", openGraph: { - title: "ProxMenux", - description: - "A menu-driven script for Proxmox VE management, designed to facilitate productivity, it simplifies automation and streamlines task execution.", - url: "https://macrimi.github.io/ProxMenux/", - siteName: "ProxMenux", - images: [ - { - url: "https://macrimi.github.io/ProxMenux/main.png", - }, - ], - locale: "en_US", - type: "website", + ...siteMetadata.openGraph, + title: "ProxMenux - Home", + }, + twitter: { + ...siteMetadata.twitter, + title: "ProxMenux - Home", }, } @@ -36,4 +29,4 @@ export default function Home() {