FeaturesCMS
PreviousNext

Fumadocs

Repository-native documentation and MDX rendering with @kit/fumadocs.

What It Does

@kit/fumadocs provides shared MDX options, MDX components, and docs UI primitives used by this docs site.

When To Use

  • You want docs/blog content versioned in Git.

Prerequisites

  • Fumadocs configured in your app (source.config.ts, docs routes, page loader).

How To Use

Key exports:

  • @kit/fumadocs/mdx-options
  • @kit/fumadocs/mdx-components
  • @kit/fumadocs/ui/*
  • @kit/fumadocs/llm

Example source config:

import { transformers } from '@kit/cms/lib/highlight-code';
import { defaultMdxOptions } from '@kit/fumadocs/mdx-options';
import { defineConfig } from 'fumadocs-mdx/config';
 
export default defineConfig({
  mdxOptions: defaultMdxOptions(transformers),
});

Components

DocsSidebar

The docs sidebar renders hierarchical navigation for your documentation tree.

DocsLayoutProps

PropTypeDefault
tree*
PageTree.Root
sidebar
SidebarOptions
containerProps
HTMLAttributes<HTMLDivElement>
themeSwitch
{ enabled?: boolean;...
searchToggle
Partial<{ enabled: boolean; components: Partial<{ sm: ReactNode; lg: ReactNode; }>...
i18n
boolean | I18nConfig<string>
false
githubUrl
string
links
LinkItemType[]
nav
Partial<NavOptions>
children
ReactNode

DocsBottomNavigation

Bottom navigation renders previous/next links between documentation pages.

DocsBottomNavigationProps

PropTypeDefault
neighbours*
{ previous?: Item; next?:...

MCP Context

capability: fumadocs_integration
entrypoints:
  - @kit/fumadocs/mdx-options
  - @kit/fumadocs/mdx-components
  - @kit/fumadocs/ui/*
inputs:
  - mdx_content_tree
outputs:
  - rendered_docs_pages
constraints:
  - docs source metadata must be valid
side_effects:
  - static page generation

Agent Recipe

  1. Configure source and MDX options.
  2. Reuse shared mdx component map.
  3. Build docs routes and static params from source loader.

Troubleshooting

  • Rendering issues often come from invalid MDX frontmatter or component imports.
  • Missing navigation usually means broken meta.json chains.

How is this guide?

Last updated on 3/23/2026