From 5b745a49d8c97aa1ec9977e546f2d5dc3f19101b Mon Sep 17 00:00:00 2001 From: iCrawl Date: Thu, 23 Mar 2023 22:37:50 +0100 Subject: [PATCH] chore(website): fix metadata --- apps/website/src/app/layout.tsx | 61 ++++++++++++++++++++++++++++++++ apps/website/src/app/page.tsx | 62 +-------------------------------- 2 files changed, 62 insertions(+), 61 deletions(-) diff --git a/apps/website/src/app/layout.tsx b/apps/website/src/app/layout.tsx index 0c5e803d6..6dad190ca 100644 --- a/apps/website/src/app/layout.tsx +++ b/apps/website/src/app/layout.tsx @@ -1,5 +1,7 @@ +import type { Metadata } from 'next/types'; import type { PropsWithChildren } from 'react'; import { Providers } from './providers'; +import { DESCRIPTION } from '~/util/constants'; import { inter } from '~/util/fonts'; import '@unocss/reset/tailwind-compat.css'; @@ -7,6 +9,65 @@ import '../styles/unocss.css'; import '../styles/cmdk.css'; import '../styles/main.css'; +export const metadata: Metadata = { + title: 'discord.js', + description: DESCRIPTION, + viewport: { + minimumScale: 1, + initialScale: 1, + width: 'device-width', + }, + icons: { + other: [ + { + url: '/favicon-32x32.png', + sizes: '32x32', + type: 'image/png', + }, + { + url: '/favicon-16x16.png', + sizes: '16x16', + type: 'image/png', + }, + ], + apple: [ + '/apple-touch-icon.png', + { + url: '/safari-pinned-tab.svg', + rel: 'mask-icon', + }, + ], + }, + + manifest: '/site.webmanifest', + + themeColor: '#5865f2', + colorScheme: 'light dark', + + appleWebApp: { + title: 'discord.js', + }, + + applicationName: 'discord.js', + + openGraph: { + siteName: 'discord.js', + type: 'website', + title: 'discord.js', + description: DESCRIPTION, + images: 'https://discordjs.dev/api/open-graph.png', + }, + + twitter: { + card: 'summary_large_image', + creator: '@iCrawlToGo', + }, + + other: { + 'msapplication-TileColor': '#090a16', + }, +}; + export default function RootLayout({ children }: PropsWithChildren) { return ( diff --git a/apps/website/src/app/page.tsx b/apps/website/src/app/page.tsx index bea38108f..23abb37d6 100644 --- a/apps/website/src/app/page.tsx +++ b/apps/website/src/app/page.tsx @@ -1,69 +1,9 @@ import { FiExternalLink } from '@react-icons/all-files/fi/FiExternalLink'; import Image from 'next/image'; import Link from 'next/link'; -import type { Metadata } from 'next/types'; import vercelLogo from '../assets/powered-by-vercel.svg'; import { SyntaxHighlighter } from '~/components/SyntaxHighlighter'; -import { CODE_EXAMPLE, DESCRIPTION } from '~/util/constants'; - -export const metadata: Metadata = { - title: 'discord.js', - description: DESCRIPTION, - viewport: { - minimumScale: 1, - initialScale: 1, - width: 'device-width', - }, - icons: { - other: [ - { - url: '/favicon-32x32.png', - sizes: '32x32', - type: 'image/png', - }, - { - url: '/favicon-16x16.png', - sizes: '16x16', - type: 'image/png', - }, - ], - apple: [ - '/apple-touch-icon.png', - { - url: '/safari-pinned-tab.svg', - rel: 'mask-icon', - }, - ], - }, - - manifest: '/site.webmanifest', - - themeColor: '#5865f2', - colorScheme: 'light dark', - - appleWebApp: { - title: 'discord.js', - }, - - applicationName: 'discord.js', - - openGraph: { - siteName: 'discord.js', - type: 'website', - title: 'discord.js', - description: DESCRIPTION, - images: 'https://discordjs.dev/api/open-graph.png', - }, - - twitter: { - card: 'summary_large_image', - creator: '@iCrawlToGo', - }, - - other: { - 'msapplication-TileColor': '#090a16', - }, -}; +import { CODE_EXAMPLE } from '~/util/constants'; export default function Page() { return (