|
1 | 1 | import { RootProvider } from 'fumadocs-ui/provider/next'; |
2 | 2 | import './global.css'; |
3 | 3 | import { Inter } from 'next/font/google'; |
| 4 | +import type { Metadata } from 'next'; |
| 5 | +import { getSiteUrl, siteMetadata } from '@/lib/seo'; |
4 | 6 |
|
5 | 7 | const inter = Inter({ |
6 | 8 | subsets: ['latin'], |
7 | 9 | }); |
8 | 10 |
|
9 | 11 | import { type ReactNode } from 'react'; |
10 | 12 |
|
| 13 | +const siteUrl = getSiteUrl(); |
| 14 | + |
| 15 | +export const metadata: Metadata = { |
| 16 | + metadataBase: new URL(siteUrl), |
| 17 | + title: { |
| 18 | + default: siteMetadata.title, |
| 19 | + template: `%s | ${siteMetadata.name}`, |
| 20 | + }, |
| 21 | + description: siteMetadata.description, |
| 22 | + keywords: siteMetadata.keywords, |
| 23 | + applicationName: siteMetadata.name, |
| 24 | + alternates: { |
| 25 | + canonical: '/', |
| 26 | + }, |
| 27 | + robots: { |
| 28 | + index: true, |
| 29 | + follow: true, |
| 30 | + googleBot: { |
| 31 | + index: true, |
| 32 | + follow: true, |
| 33 | + 'max-image-preview': 'large', |
| 34 | + 'max-snippet': -1, |
| 35 | + 'max-video-preview': -1, |
| 36 | + }, |
| 37 | + }, |
| 38 | + openGraph: { |
| 39 | + type: 'website', |
| 40 | + locale: 'en_US', |
| 41 | + url: siteUrl, |
| 42 | + siteName: siteMetadata.name, |
| 43 | + title: siteMetadata.title, |
| 44 | + description: siteMetadata.description, |
| 45 | + }, |
| 46 | + twitter: { |
| 47 | + card: 'summary_large_image', |
| 48 | + title: siteMetadata.title, |
| 49 | + description: siteMetadata.description, |
| 50 | + }, |
| 51 | +}; |
| 52 | + |
11 | 53 | export default function Layout({ children }: { children: ReactNode }) { |
12 | 54 | return ( |
13 | 55 | <html lang="en" className={inter.className} suppressHydrationWarning> |
|
0 commit comments