first commit
This commit is contained in:
42
app/layout.tsx
Normal file
42
app/layout.tsx
Normal file
@@ -0,0 +1,42 @@
|
||||
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>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user