Next.js Discord

Discord Forum

Help with Fumadocs

Unanswered
Baird's Sparrow posted this in #help-forum
Open in Discord
Avatar
Baird's SparrowOP
I wanted to add a blog to my portfolio, so I came across FumaDocs. It looked cool, so I followed the documentation and used parts of the FumaDocs repo to set up the blog.
I'm not entirely sure if I did everything correctly. This is the repo: https://github.com/techwithanirudh/shadcn-portfolio/tree/canary/src/app
I also want to include custom metadata in addition to what FumaDocs provides.

20 Replies

Avatar
Asian black bear
Additionally you don't have any question or request in your original post. What are you looking for?
Avatar
Baird's SparrowOP
I wanted to know, if I'm doing stuff right
Avatar
Baird's SparrowOP
@fuma ๐Ÿ’™ joulev Hey
How would I add a custom schema while using @fumadocs/content-collections
Avatar
you just use object spread like: { ...original, myProperty: xxx } to the schema.
Avatar
Baird's SparrowOP
cool, tysm!
Avatar
Baird's SparrowOP
Is there a way for fumadocs to use the existing next-themes instance, so that when I switch color schemes fumadocs's rendering too changes the color

I looked up root provider for fumadocs
Avatar
disabling theme can do the trick
Avatar
i think if you are bringing your own styles you should use fumadocs in headless mode and use your own UI
Avatar
Baird's SparrowOP
yeah
i've never used fumadocs before, so idk what i'm doing but it seems good so far
but i'm not sure if it's the right way
Avatar
For custom color schemas you can use our tailwind css plugin or css variables. But changing next themes config (only light/dark mode) doesnโ€™t need further setup
Avatar
Baird's SparrowOP
i just did prose-invert works fine
this is what I did, most of it is from fuma, works fine
Image
Avatar
Baird's SparrowOP
Hey!

I'm doing this
<InlineTOC items={page.data.toc} />

and i'm getting a type error
TS2322: Type
{ title: string | number | bigint | boolean | { type: string | {} | {}; props: any; key: string | null; } | { [Symbol. iterator]: {}; } | { children: string | number | bigint | boolean | { type: string | ... 1 more ... | {}; props: any; key: string | null; } | ... 4 more ... | undefined; type: string | ... 1 more ......
is not assignable to type TOCItemType[]
Avatar
Try as any first and see if thereโ€™s any issue
The information you provided is insufficient for further investigation
Avatar
Baird's SparrowOP
yeah, that works, but i probably want to fix this without doing that
i just copied the fumadocs blog example, but i'm using content collectors instead, so i changed some stuff, i'm not so sure if me porting to content collectors is causing the issue. i can give more info