|
1 | | -import type { Metadata } from "next"; |
2 | | -import { Inter, JetBrains_Mono } from "next/font/google"; |
3 | | -import { getSiteUrl, siteConfig } from "../lib/site"; |
4 | | -import "nextra-theme-docs/style.css"; |
5 | | -import "./globals.scss"; |
| 1 | +import type {Metadata} from 'next' |
| 2 | +import {Inter, JetBrains_Mono} from 'next/font/google' |
| 3 | +import {getSiteUrl, siteConfig} from '../lib/site' |
| 4 | +import 'nextra-theme-docs/style.css' |
| 5 | +import './globals.scss' |
6 | 6 |
|
7 | 7 | const sans = Inter({ |
8 | | - variable: "--font-sans", |
| 8 | + variable: '--font-sans', |
9 | 9 | preload: true, |
10 | | - subsets: ["latin"], |
11 | | -}); |
| 10 | + subsets: ['latin'] |
| 11 | +}) |
12 | 12 |
|
13 | 13 | const mono = JetBrains_Mono({ |
14 | | - variable: "--font-mono", |
15 | | - subsets: ["latin"], |
16 | | - preload: true, |
17 | | -}); |
| 14 | + variable: '--font-mono', |
| 15 | + subsets: ['latin'], |
| 16 | + preload: true |
| 17 | +}) |
18 | 18 |
|
19 | 19 | export const metadata: Metadata = { |
20 | 20 | metadataBase: getSiteUrl(), |
21 | 21 | title: { |
22 | 22 | default: siteConfig.title, |
23 | | - template: `%s | ${siteConfig.productName}`, |
| 23 | + template: `%s | ${siteConfig.productName}` |
24 | 24 | }, |
25 | 25 | description: siteConfig.description, |
26 | 26 | applicationName: siteConfig.shortName, |
27 | 27 | alternates: { |
28 | | - canonical: "/", |
| 28 | + canonical: '/' |
29 | 29 | }, |
30 | | - category: "developer tools", |
31 | | - manifest: "/manifest.webmanifest", |
| 30 | + category: 'developer tools', |
| 31 | + manifest: '/manifest.webmanifest', |
32 | 32 | openGraph: { |
33 | | - type: "website", |
34 | | - url: "/", |
| 33 | + type: 'website', |
| 34 | + url: '/', |
35 | 35 | title: siteConfig.title, |
36 | 36 | description: siteConfig.description, |
37 | 37 | siteName: siteConfig.title, |
38 | | - locale: "zh_CN", |
| 38 | + locale: 'zh_CN' |
39 | 39 | }, |
40 | 40 | twitter: { |
41 | | - card: "summary_large_image", |
| 41 | + card: 'summary_large_image', |
42 | 42 | title: siteConfig.title, |
43 | | - description: siteConfig.description, |
44 | | - }, |
45 | | -}; |
| 43 | + description: siteConfig.description |
| 44 | + } |
| 45 | +} |
46 | 46 |
|
47 | | -export default function RootLayout({ children }: { readonly children: React.ReactNode }) { |
| 47 | +export default function RootLayout({children}: {readonly children: React.ReactNode}) { |
48 | 48 | return ( |
49 | | - <html lang="zh-CN" className="dark" style={{ colorScheme: "dark", backgroundColor: "#0b0c10" }} suppressHydrationWarning> |
| 49 | + <html lang="zh-CN" className="dark" style={{colorScheme: 'dark', backgroundColor: '#0b0c10'}} suppressHydrationWarning> |
50 | 50 | <body className={`${sans.variable} ${mono.variable}`} suppressHydrationWarning> |
51 | 51 | {children} |
52 | 52 | </body> |
53 | 53 | </html> |
54 | | - ); |
| 54 | + ) |
55 | 55 | } |
0 commit comments