diff --git a/app/layout.tsx b/app/layout.tsx index 884a71f..853653d 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -1,70 +1,67 @@ -"use client" - -import React, { useEffect } from 'react' +import React from 'react' +import { Metadata } from 'next' +import Head from 'next/head' import './globals.css' import { GeistSans } from 'geist/font/sans' -import '../i18n' +import AnimatedTitle from '../components/AnimatedTitle' +import I18nProvider from '../components/I18nProvider' + +export const metadata: Metadata = { + description: "The Internet home of Aidan. Come on in!", + openGraph: { + type: "website", + url: "https://aidxn.cc", + title: "aidxn.cc", + description: "The Internet home of Aidan. Come on in!", + siteName: "aidxn.cc", + images: [ + { + url: "https://aidxn.cc/android-icon-192x192.png", + width: 192, + height: 192, + }, + ], + }, +} export default function RootLayout({ children, }: { children: React.ReactNode }) { - useEffect(() => { - const title = 'aidxn.cc'; - let index = 1; - let forward = true; - const interval = setInterval(() => { - document.title = title.substring(0, index); - if (forward) { - index++; - if (index > title.length) { - forward = false; - index = title.length - 1; - } - } else { - index--; - if (index < 1) { - forward = true; - index = 1; - } - } - }, 500); - return () => clearInterval(interval); - }, []); - return ( - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + {children} - - + + + ); } diff --git a/app/robots.ts b/app/robots.ts new file mode 100644 index 0000000..e429c8f --- /dev/null +++ b/app/robots.ts @@ -0,0 +1,9 @@ +import type { MetadataRoute } from 'next' + +export const robots: MetadataRoute.Robots = { + rules: { + userAgent: '*', + allow: '/', + }, + sitemap: 'https://aidxn.cc/sitemap.xml', +} \ No newline at end of file diff --git a/app/sitemap.ts b/app/sitemap.ts new file mode 100644 index 0000000..c792039 --- /dev/null +++ b/app/sitemap.ts @@ -0,0 +1,36 @@ +import type { MetadataRoute } from 'next' + +export default function sitemap(): MetadataRoute.Sitemap { + return [ + { + url: 'https://aidxn.cc', + lastModified: new Date(), + changeFrequency: 'weekly', + priority: 1.0, + }, + { + url: 'https://aidxn.cc/about', + lastModified: new Date(), + changeFrequency: 'weekly', + priority: 0.8, + }, + { + url: 'https://aidxn.cc/contact', + lastModified: new Date(), + changeFrequency: 'monthly', + priority: 0.8, + }, + { + url: 'https://aidxn.cc/domains', + lastModified: new Date(), + changeFrequency: 'monthly', + priority: 0.8, + }, + { + url: 'https://aidxn.cc/manifesto', + lastModified: new Date(), + changeFrequency: 'yearly', + priority: 0.7, + }, + ] +} \ No newline at end of file diff --git a/components/AnimatedTitle.tsx b/components/AnimatedTitle.tsx new file mode 100644 index 0000000..ea8346c --- /dev/null +++ b/components/AnimatedTitle.tsx @@ -0,0 +1,29 @@ +"use client" + +import { useEffect } from "react"; + +export default function AnimatedTitle() { + useEffect(() => { + const title = 'aidxn.cc'; + let index = 1; + let forward = true; + const interval = setInterval(() => { + document.title = title.substring(0, index); + if (forward) { + index++; + if (index > title.length) { + forward = false; + index = title.length - 1; + } + } else { + index--; + if (index < 1) { + forward = true; + index = 1; + } + } + }, 500); + return () => clearInterval(interval); + }, []); + return null; +} diff --git a/components/I18nProvider.tsx b/components/I18nProvider.tsx new file mode 100644 index 0000000..3ddf176 --- /dev/null +++ b/components/I18nProvider.tsx @@ -0,0 +1,8 @@ +"use client"; + +import { ReactNode } from "react"; +import "../i18n"; + +export default function I18nProvider({ children }: { children: ReactNode }) { + return <>{children}; +}