Introduction

A minimal fumadocs setup — MDX in content/docs, a generated page tree, and the fumadocs-ui shell.

This docs section runs on fumadocs, the same framework the Rafflesia website uses for its docs. Pages are MDX files under content/docs, and the sidebar is generated from the directory structure plus meta.json files.

How a page becomes a route

fumadocs-mdx compiles content/docs/**/*.mdx into .source/, and src/lib/source.ts wraps that with a loader that owns the base URL. A single catch-all route renders whatever the loader resolves:

FileRoute
content/docs/index.mdx/docs
content/docs/guides/writing-docs.mdx/docs/guides/writing-docs

Because the route is [[...slug]], adding a file is the whole job — there is no route to register and no sidebar entry to hand-maintain.

Ordering

Directory order is alphabetical by default. A meta.json overrides it:

{
  "title": "Guides",
  "pages": ["writing-docs", "components"]
}

title renames the section in the sidebar, and pages fixes the order. A page left out of pages is still routable but hidden from the tree.

Search is off

Fumadocs search needs an /api/search route, which this starter does not wire. The setup note in the README covers turning it on.