How to Set Up Multiple Documentation Sections Using Separate .mdx Folders ? #926
Unanswered
eyallampel1
asked this question in
Q&A
Replies: 1 comment 2 replies
-
Hmm maybe you are looking for https://fumadocs.vercel.app/docs/ui/page-conventions#multiple-page-trees, which is the one our official docs use. The method you used will create two layouts and two source objects (which may appear to be unnecessary), would like to hear if there's anything the current multi page tree API cannot handle. Your method also works, but you need to use |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi Fumadocs developers,
I'm trying to configure my Fumadocs project to have two separate documentation sections, each with its own folder of
.mdx
files. I would like to have two tabs in the navigation, one for "Documentation" (/docs
) and one for another section ("Another",/another
), with each tab pulling from separate folders:content/docs
for "Documentation" andcontent/another
for "Another".Here’s what I’ve done so far:
layout.config.tsx
— "Documentation" and "Another"./another
path, similar to the one used for/docs
.source.ts
file to handle loading content from bothdocs
andanother
folders. I’ve set upcreateMDXSource
for both:Issues:
TypeScript Errors: I get the following TypeScript errors:
TS2305: Module "./another-source" has no exported member 'meta'
.TS2739: Type 'any[]' is missing properties from type 'Root'
when passingsource.getPages('another')
toDocsLayout
.TS2554: Expected 0 arguments, but got 1
forgetPages('another')
.Folder Structure: How should I structure and configure my
source.ts
to support loading.mdx
files from bothdocs
andanother
folders correctly?DocsLayout: What should I adjust in the
tree
prop passed toDocsLayout
to ensure it meets the requiredRoot
type (withname
andchildren
)?Any guidance on properly setting up two separate content sources within the same Fumadocs project would be greatly appreciated! Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions