File tree Expand file tree Collapse file tree 9 files changed +12
-12
lines changed
Expand file tree Collapse file tree 9 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -29,16 +29,16 @@ Open http://localhost:3000 to view the docs.
2929
3030## Writing Documentation
3131
32- Content is located in ` content/docs ` . We use ** MDX** (Markdown + React components).
32+ Content is located in ` content/ ` . We use ** MDX** (Markdown + React components).
3333
3434### File Structure
3535
36- * ` content/docs/ *.mdx ` : The actual documentation pages. The file path determines the URL.
36+ * ` content/*.mdx ` : The actual documentation pages. The file path determines the URL.
3737* ` app/source.ts ` : Configuration for the content source adapter.
3838
3939### Adding a Page
4040
41- Create a new ` .mdx ` file in ` content/docs ` . Every file requires a frontmatter block at the top:
41+ Create a new ` .mdx ` file in ` content/ ` . Every file requires a frontmatter block at the top:
4242
4343``` mdx
4444---
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import { getMDXComponents } from '@/mdx-components';
1010import type { Metadata } from 'next' ;
1111import { createRelativeLink } from 'fumadocs-ui/mdx' ;
1212
13- export default async function Page ( props : PageProps < '/docs /[[...slug]]' > ) {
13+ export default async function Page ( props : PageProps < '/content /[[...slug]]' > ) {
1414 const params = await props . params ;
1515 const page = source . getPage ( params . slug ) ;
1616 if ( ! page ) notFound ( ) ;
@@ -38,7 +38,7 @@ export async function generateStaticParams() {
3838}
3939
4040export async function generateMetadata (
41- props : PageProps < '/docs /[[...slug]]' > ,
41+ props : PageProps < '/content /[[...slug]]' > ,
4242) : Promise < Metadata > {
4343 const params = await props . params ;
4444 const page = source . getPage ( params . slug ) ;
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import { source } from '@/lib/source';
22import { DocsLayout } from 'fumadocs-ui/layouts/docs' ;
33import { baseOptions } from '@/lib/layout.shared' ;
44
5- export default function Layout ( { children } : LayoutProps < '/docs ' > ) {
5+ export default function Layout ( { children } : LayoutProps < '/content ' > ) {
66 return (
77 < DocsLayout tree = { source . pageTree } { ...baseOptions ( ) } >
88 { children }
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ export const revalidate = false;
77
88export async function GET (
99 _req : Request ,
10- { params } : RouteContext < '/og/docs /[...slug]' > ,
10+ { params } : RouteContext < '/og/content /[...slug]' > ,
1111) {
1212 const { slug } = await params ;
1313 const page = source . getPage ( slug . slice ( 0 , - 1 ) ) ;
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ title: Hello World
33description : Your first document
44---
55
6- Welcome to the docs! You can start writing documents in ` /content/docs ` .
6+ Welcome to the docs! You can start writing documents in ` /content/ ` .
77
88## What is Next?
99
File renamed without changes.
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import { lucideIconsPlugin } from 'fumadocs-core/source/lucide-icons';
44
55// See https://fumadocs.dev/docs/headless/source-api for more info
66export const source = loader ( {
7- baseUrl : '/docs ' ,
7+ baseUrl : '/content ' ,
88 source : docs . toFumadocsSource ( ) ,
99 plugins : [ lucideIconsPlugin ( ) ] ,
1010} ) ;
@@ -14,7 +14,7 @@ export function getPageImage(page: InferPageType<typeof source>) {
1414
1515 return {
1616 segments,
17- url : `/og/docs /${ segments . join ( '/' ) } ` ,
17+ url : `/og/content /${ segments . join ( '/' ) } ` ,
1818 } ;
1919}
2020
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ const config = {
1010 return [
1111 {
1212 source : '/' ,
13- destination : '/docs ' ,
13+ destination : '/content ' ,
1414 permanent : false ,
1515 } ,
1616 ] ;
Original file line number Diff line number Diff line change 88// You can customise Zod schemas for frontmatter and `meta.json` here
99// see https://fumadocs.dev/docs/mdx/collections
1010export const docs = defineDocs ( {
11- dir : 'content/docs ' ,
11+ dir : 'content' ,
1212 docs : {
1313 schema : frontmatterSchema ,
1414 postprocess : {
You can’t perform that action at this time.
0 commit comments