---
title: "From Fumadocs"
description: "Migrate Fumadocs content, meta files, source loaders, layouts, and components"
canonical_url: "https://docs.farming-labs.dev/docs/migrations/fumadocs"
markdown_url: "https://docs.farming-labs.dev/docs/migrations/fumadocs.md"
last_updated: "2018-10-20"
agent:
  tokenBudget: 1450
  task: "Simplify a Fumadocs project into a Farming Labs Docs configuration while preserving its content and routes."
  outcome: "Existing Fumadocs Markdown or MDX content and navigation run through the selected Farming Labs adapter with equivalent routes and components."
  appliesTo:
    framework:
      - "nextjs"
      - "tanstackstart"
      - "sveltekit"
      - "astro"
      - "nuxt"
    version:
      - ">=0.2.60"
    package:
      - "@farming-labs/docs"
  prerequisites:
    - "Preserve source.config, content collections, meta files, source loaders, layouts, search routes, and MDX components."
    - "Record the existing loader baseUrl and published route tree."
    - "Initialize the target runtime in a migration branch."
  files:
    - "source.config.ts"
    - "lib/source.ts"
    - "mdx-components.tsx"
    - "docs.config.ts"
    - "docs.config.tsx"
  commands:
    - run: "npx @farming-labs/docs init"
      description: "Scaffold Farming Labs Docs around the selected target runtime."
  sideEffects:
    - "Custom Fumadocs source and layout wiring may be replaced by a single docs configuration."
  verification:
    - description: "Build the target and compare the source page tree, base URL, meta ordering, components, search, and API routes."
      expect: "Existing content routes build and render without duplicated source loaders or catch-all routes."
  rollback:
    - "Restore source.config, source loader, layout, and route files from version control."
  failureModes:
    - symptom: "Pages are duplicated or route generation conflicts."
      resolution: "Remove overlapping Fumadocs loaders or catch-all routes only after the Farming Labs route works."
    - symptom: "A custom collection is missing."
      resolution: "Keep that collection on its existing loader or migrate it separately instead of treating it as docs content."
---

<!-- farming-labs:agent-contract:start -->
## Agent Contract

Task: Simplify a Fumadocs project into a Farming Labs Docs configuration while preserving its content and routes.
Outcome: Existing Fumadocs Markdown or MDX content and navigation run through the selected Farming Labs adapter with equivalent routes and components.

### Applies To

- Framework: `nextjs`, `tanstackstart`, `sveltekit`, `astro`, `nuxt`
- Version: `>=0.2.60`
- Package: `@farming-labs/docs`

### Prerequisites

- Preserve source.config, content collections, meta files, source loaders, layouts, search routes, and MDX components.
- Record the existing loader baseUrl and published route tree.
- Initialize the target runtime in a migration branch.

### Files

- `source.config.ts`
- `lib/source.ts`
- `mdx-components.tsx`
- `docs.config.ts`
- `docs.config.tsx`

### Commands

- `npx @farming-labs/docs init` — Scaffold Farming Labs Docs around the selected target runtime.

### Side Effects

- Custom Fumadocs source and layout wiring may be replaced by a single docs configuration.

### Verification

- Build the target and compare the source page tree, base URL, meta ordering, components, search, and API routes.
  - Expected: Existing content routes build and render without duplicated source loaders or catch-all routes.

### Rollback

- Restore source.config, source loader, layout, and route files from version control.

### Failure Modes

- Pages are duplicated or route generation conflicts. — Recovery: Remove overlapping Fumadocs loaders or catch-all routes only after the Farming Labs route works.
- A custom collection is missing. — Recovery: Keep that collection on its existing loader or migrate it separately instead of treating it as docs content.
<!-- farming-labs:agent-contract:end -->

# From Fumadocs

## From Fumadocs task

Task: Simplify a Fumadocs project into a Farming Labs Docs configuration while preserving its content and routes.

Expected result: Existing Fumadocs Markdown or MDX content and navigation run through the selected Farming Labs adapter with equivalent routes and components.

## From Fumadocs prerequisites

- Preserve source.config, content collections, meta files, source loaders, layouts, search routes, and MDX components.
- Record the existing loader baseUrl and published route tree.
- Initialize the target runtime in a migration branch.
- Applies to framework nextjs, tanstackstart, sveltekit, astro, nuxt; version >=0.2.60; package @farming-labs/docs.

## From Fumadocs verification

- Build the target and compare the source page tree, base URL, meta ordering, components, search, and API routes. Expected: Existing content routes build and render without duplicated source loaders or catch-all routes.
- Failure: Pages are duplicated or route generation conflicts.
- Recovery: Remove overlapping Fumadocs loaders or catch-all routes only after the Farming Labs route works.
- Rollback: Restore source.config, source loader, layout, and route files from version control.

## From Fumadocs agent guidance

Read source.config.ts, every collection definition, lib/source loader options, meta files, and the
docs catch-all route before editing. Migrate only the documentation collection. Blog, changelog, or
custom collections may need to remain on their current Fumadocs source.

## Sitemap

See the full [sitemap](/sitemap.md) for all pages.
Docs-scoped sitemap: [/docs/sitemap.md](/docs/sitemap.md).
Well-known sitemap: [/.well-known/sitemap.md](/.well-known/sitemap.md).
