42 lines
1.2 KiB
TypeScript
42 lines
1.2 KiB
TypeScript
import { Head } from "nextra/components";
|
|
import { Layout } from "nextra-theme-docs";
|
|
import "nextra-theme-docs/style.css";
|
|
import { getPageMap } from "nextra/page-map";
|
|
import { CustomFooter } from "./components/CustomFooter";
|
|
import { CustomNavbar } from "./components/CustomNavbar";
|
|
import { sidebar } from "./components/sidebar";
|
|
|
|
export const metadata = {
|
|
title: "Nextra Docs",
|
|
description: "Nextra Docs",
|
|
};
|
|
|
|
export default async function RootLayout({
|
|
children,
|
|
}: {
|
|
children: React.ReactNode;
|
|
}) {
|
|
const pageMap = await getPageMap();
|
|
|
|
return (
|
|
<html lang="zh-CN" suppressHydrationWarning>
|
|
<Head>
|
|
<meta
|
|
name="viewport"
|
|
content="width=device-width, initial-scale=1.0"
|
|
/>
|
|
</Head>
|
|
<body>
|
|
<Layout
|
|
footer={<CustomFooter />}
|
|
pageMap={pageMap}
|
|
docsRepositoryBase="https://gitea.shenjianl.cn/shenjianZ/nextra-template-docs"
|
|
navbar={<CustomNavbar />}
|
|
sidebar={sidebar}
|
|
>
|
|
{children}
|
|
</Layout>
|
|
</body>
|
|
</html>
|
|
);
|
|
} |