1
1
import { Footer , Layout , Navbar , LastUpdated } from 'nextra-theme-docs'
2
2
import { TitleFullWithLogo } from '../components/logo-title'
3
- import { Search } from 'nextra/components'
3
+ import { Head , Search } from 'nextra/components'
4
4
import { getPageMap } from 'nextra/page-map'
5
5
import { localeResources } from '../../locales'
6
6
import 'nextra-theme-docs/style.css'
7
-
7
+
8
8
export const metadata = {
9
9
applicationName : 'SJMCL' ,
10
10
appleWebApp : {
@@ -19,7 +19,7 @@ export const metadata = {
19
19
template : '%s | SJMCL'
20
20
} ,
21
21
}
22
-
22
+
23
23
export default async function RootLayout ( { children, params } ) {
24
24
const { lang } = await params
25
25
let pageMap = await getPageMap ( `/${ lang } ` )
@@ -38,31 +38,47 @@ export default async function RootLayout({ children, params }) {
38
38
placeholder = { t . search . placeholder }
39
39
/>
40
40
)
41
-
41
+
42
42
const footer = (
43
43
< Footer >
44
44
沪 ICP 备 05052060 号-7
45
- < br />
45
+ < br />
46
46
{ new Date ( ) . getFullYear ( ) } © { t . footer . copyright }
47
47
</ Footer >
48
48
)
49
49
50
50
return (
51
- < Layout
52
- // banner={banner}
53
- navbar = { navbar }
54
- search = { search }
55
- pageMap = { pageMap }
56
- docsRepositoryBase = "https://github.com/UNIkeEN/SJMCL/tree/main"
57
- footer = { footer }
58
- editLink = { t . editLink }
59
- feedback = { { content : t . feedbackLink } }
60
- lastUpdated = { < LastUpdated > { t . lastUpdated } </ LastUpdated > }
61
- i18n = { Object . entries ( localeResources ) . map ( ( [ locale , value ] ) => ( {
62
- locale, name : value . display_name ,
63
- } ) ) }
51
+ < html
52
+ // Not required, but good for SEO
53
+ lang = "en"
54
+ // Required to be set
55
+ dir = "ltr"
56
+ // Suggested by `next-themes` package https://github.com/pacocoursey/next-themes#with-app
57
+ suppressHydrationWarning
64
58
>
65
- { children }
66
- </ Layout >
59
+ < Head
60
+ // ... Your additional head options
61
+ >
62
+ { /* Your additional tags should be passed as `children` of `<Head>` element */ }
63
+ </ Head >
64
+ < body >
65
+ < Layout
66
+ // banner={banner}
67
+ navbar = { navbar }
68
+ search = { search }
69
+ pageMap = { pageMap }
70
+ docsRepositoryBase = "https://github.com/UNIkeEN/SJMCL/tree/main"
71
+ footer = { footer }
72
+ editLink = { t . editLink }
73
+ feedback = { { content : t . feedbackLink } }
74
+ lastUpdated = { < LastUpdated > { t . lastUpdated } </ LastUpdated > }
75
+ i18n = { Object . entries ( localeResources ) . map ( ( [ locale , value ] ) => ( {
76
+ locale, name : value . display_name ,
77
+ } ) ) }
78
+ >
79
+ { children }
80
+ </ Layout >
81
+ </ body >
82
+ </ html >
67
83
)
68
84
}
0 commit comments