-
How can I remove the home page and promote the docs up to the root level, i.e. a documentation only site with no landing page? |
Beta Was this translation helpful? Give feedback.
Answered by
bradstdev
May 15, 2024
Replies: 2 comments 1 reply
-
Yes, you can change the routing structure, remember to change your |
Beta Was this translation helpful? Give feedback.
1 reply
-
Example site: https://github.com/austererisk/austererisk-com Procedure:
app/layout.tsx import { RootProvider } from "fumadocs-ui/provider";
import "fumadocs-ui/style.css";
import { Inter } from "next/font/google";
import type { ReactNode } from "react";
import { DocsLayout } from "fumadocs-ui/layout";
import { pageTree } from "./source";
import Image from "next/image";
import './styles.css'
const inter = Inter({
subsets: ["latin"],
});
export default function Layout({ children }: { children: ReactNode }) {
return (
<html lang="en" className={inter.className}>
<body>
<RootProvider>
<DocsLayout tree={pageTree} nav={{ title: 'My Site' }}>
{children}
</DocsLayout>
</RootProvider>
</body>
</html>
);
} app/source.ts import { map } from '@/.map';
import { createMDXSource } from 'fumadocs-mdx';
import { loader } from 'fumadocs-core/source';
export const { getPage, getPages, pageTree } = loader({
baseUrl: '',
rootDir: '',
source: createMDXSource(map),
}); |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
bradstdev
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Example site: https://github.com/austererisk/austererisk-com
Procedure:
/content/docs
to/content
app/source.ts
file as belowapp/layout.tsx