From adaafa95dd5df613d19c4a2785ca224d3ccf036b Mon Sep 17 00:00:00 2001 From: JOYCEQL <1449239013@qq.com> Date: Mon, 13 Jan 2025 00:21:04 +0800 Subject: [PATCH] perf: seo google config --- apps/fronted/public/robots.txt | 5 +++++ apps/fronted/public/sitemap.xml | 18 ++++++++++++++++++ apps/fronted/src/app/layout.tsx | 16 ++++++++++++++++ 3 files changed, 39 insertions(+) create mode 100644 apps/fronted/public/robots.txt create mode 100644 apps/fronted/public/sitemap.xml diff --git a/apps/fronted/public/robots.txt b/apps/fronted/public/robots.txt new file mode 100644 index 0000000..b569f64 --- /dev/null +++ b/apps/fronted/public/robots.txt @@ -0,0 +1,5 @@ +User-agent: * +Allow: / + +# Sitemap +Sitemap: https://magicv.art/sitemap.xml diff --git a/apps/fronted/public/sitemap.xml b/apps/fronted/public/sitemap.xml new file mode 100644 index 0000000..55364c6 --- /dev/null +++ b/apps/fronted/public/sitemap.xml @@ -0,0 +1,18 @@ + + + + https://magicv.art/en + + + daily + 1.0 + + + https://magicv.art/zh + + + daily + 1.0 + + diff --git a/apps/fronted/src/app/layout.tsx b/apps/fronted/src/app/layout.tsx index 64ee518..a473894 100644 --- a/apps/fronted/src/app/layout.tsx +++ b/apps/fronted/src/app/layout.tsx @@ -1,10 +1,26 @@ import { ReactNode } from "react"; +import { Metadata } from "next"; import "./globals.css"; type Props = { children: ReactNode; }; +export const metadata: Metadata = { + metadataBase: new URL("https://magicv.art"), + robots: { + index: true, + follow: true, + googleBot: { + index: true, + follow: true, + "max-video-preview": -1, + "max-image-preview": "large", + "max-snippet": -1, + }, + }, +}; + export default function RootLayout({ children }: Props) { return children; }