---
title: "Migrations"
description: "Move documentation from Docusaurus, Mintlify, Nextra, Fumadocs, VitePress, Starlight, GitBook, or Material for MkDocs"
canonical_url: "https://docs.farming-labs.dev/docs/migrations"
markdown_url: "https://docs.farming-labs.dev/docs/migrations.md"
last_updated: "2018-10-20"
agent:
  tokenBudget: 1400
  task: "Select and execute the correct source-specific migration into a Farming Labs Docs project."
  outcome: "The source content, navigation, assets, and supported components are represented in a buildable Farming Labs Docs site, with unsupported behavior listed for review."
  appliesTo:
    framework:
      - "nextjs"
      - "tanstackstart"
      - "sveltekit"
      - "astro"
      - "nuxt"
    version:
      - ">=0.2.60"
    package:
      - "@farming-labs/docs"
  prerequisites:
    - "Identify the current documentation platform and its content root."
    - "Choose the target application runtime before moving files."
    - "Preserve the source project or create a migration branch before editing."
  files:
    - "docs.config.ts"
    - "docs.config.tsx"
    - "src/lib/docs.config.ts"
  commands:
    - run: "npx @farming-labs/docs init"
      description: "Scaffold the target docs runtime from the target application root."
  sideEffects:
    - "Initialization installs framework packages and creates the target docs configuration and routes."
    - "Migration copies or rewrites documentation content, navigation metadata, and assets."
  verification:
    - description: "Run the target application's production build and inspect navigation, links, assets, code blocks, search, and Markdown page actions."
      expect: "The build succeeds and the migrated content is reachable from both its HTML route and matching .md route."
  rollback:
    - "Restore the migration branch or remove the new target directory; do not delete the preserved source project."
  failureModes:
    - symptom: "A source-specific component prevents MDX compilation."
      resolution: "Replace it with the closest built-in component or plain Markdown, and record the visual behavior that still needs review."
    - symptom: "Migrated URLs differ from published URLs."
      resolution: "Preserve the original slug in the target file layout or add host-level redirects before switching traffic."
---

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

Task: Select and execute the correct source-specific migration into a Farming Labs Docs project.
Outcome: The source content, navigation, assets, and supported components are represented in a buildable Farming Labs Docs site, with unsupported behavior listed for review.

### Applies To

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

### Prerequisites

- Identify the current documentation platform and its content root.
- Choose the target application runtime before moving files.
- Preserve the source project or create a migration branch before editing.

### Files

- `docs.config.ts`
- `docs.config.tsx`
- `src/lib/docs.config.ts`

### Commands

- `npx @farming-labs/docs init` — Scaffold the target docs runtime from the target application root.

### Side Effects

- Initialization installs framework packages and creates the target docs configuration and routes.
- Migration copies or rewrites documentation content, navigation metadata, and assets.

### Verification

- Run the target application's production build and inspect navigation, links, assets, code blocks, search, and Markdown page actions.
  - Expected: The build succeeds and the migrated content is reachable from both its HTML route and matching .md route.

### Rollback

- Restore the migration branch or remove the new target directory; do not delete the preserved source project.

### Failure Modes

- A source-specific component prevents MDX compilation. — Recovery: Replace it with the closest built-in component or plain Markdown, and record the visual behavior that still needs review.
- Migrated URLs differ from published URLs. — Recovery: Preserve the original slug in the target file layout or add host-level redirects before switching traffic.
<!-- farming-labs:agent-contract:end -->

# Migrations

## Migrations task

Task: Select and execute the correct source-specific migration into a Farming Labs Docs project.

Expected result: The source content, navigation, assets, and supported components are represented in a buildable Farming Labs Docs site, with unsupported behavior listed for review.

## Migrations prerequisites

- Identify the current documentation platform and its content root.
- Choose the target application runtime before moving files.
- Preserve the source project or create a migration branch before editing.
- Applies to framework nextjs, tanstackstart, sveltekit, astro, nuxt; version >=0.2.60; package @farming-labs/docs.

## Migrations verification

- Run the target application's production build and inspect navigation, links, assets, code blocks, search, and Markdown page actions. Expected: The build succeeds and the migrated content is reachable from both its HTML route and matching .md route.
- Failure: A source-specific component prevents MDX compilation.
- Recovery: Replace it with the closest built-in component or plain Markdown, and record the visual behavior that still needs review.
- Rollback: Restore the migration branch or remove the new target directory; do not delete the preserved source project.

## Migrations agent guidance

Use this page only to select a source guide. Do not combine conversion rules from multiple source
platforms unless the repository actually contains more than one docs system. After selecting a
guide, read its `.md` route and preserve its source inventory, URL, navigation, component, asset,
integration, verification, and recovery steps.

The target runtime is independent from the source platform. Detect whether the destination is
Next.js, TanStack Start, SvelteKit, Astro, or Nuxt before choosing file locations. Never remove the
source project until the target production build and route comparison pass.

## 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).
