Skip to content

Migrate app from Nextra to Fumadocs#53

Open
amcdnl wants to merge 6 commits intomasterfrom
claude/migrate-nextra-to-fumadocs-6M1Ap
Open

Migrate app from Nextra to Fumadocs#53
amcdnl wants to merge 6 commits intomasterfrom
claude/migrate-nextra-to-fumadocs-6M1Ap

Conversation

@amcdnl
Copy link
Member

@amcdnl amcdnl commented Jan 8, 2026

No description provided.

claude added 2 commits January 8, 2026 01:05
This commit contains the migration work from Nextra to Fumadocs:

Changes:
- Replace Nextra packages with fumadocs-core, fumadocs-mdx, fumadocs-ui
- Add source.config.ts for Fumadocs MDX configuration
- Create src/lib/source.ts for content loaders (docs and blocks)
- Create app routes for /docs and /blocks with Fumadocs layouts
- Convert all _meta.ts files to meta.json format
- Update MDX component imports (nextra/components → fumadocs-ui)
- Fix Cards.Card usage to separate Card component
- Create custom landing-footer.tsx and not-found.tsx
- Update globals.css with Fumadocs CSS imports
- Update ThemeRender to use named export

Known issues:
- Build fails with "e.map is not a function" during page data collection
- Likely related to fumadocs-mdx/fumadocs-core page tree formatting
- The landing page and basic structure work, but docs/blocks pages fail

This is a work-in-progress commit to checkpoint progress.
Copilot AI review requested due to automatic review settings January 8, 2026 11:16
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request migrates the documentation website from Nextra to Fumadocs, replacing the custom reablocks-docs-theme with Fumadocs UI components and implementing a new documentation structure.

Key changes:

  • Replaced Nextra with Fumadocs as the documentation framework, updating dependencies and configuration
  • Converted all TypeScript metadata files (_meta.ts) to JSON format (meta.json) for Fumadocs compatibility
  • Updated component imports throughout MDX files to use Fumadocs UI components (Cards, Card, Steps, Tabs, Callout)

Reviewed changes

Copilot reviewed 96 out of 97 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
package.json Removed nextra and reablocks-docs-theme; added fumadocs-core, fumadocs-mdx, and fumadocs-ui packages
next.config.mjs Replaced nextra configuration with fumadocs-mdx/next createMDX wrapper
source.config.ts Added new Fumadocs configuration defining docs and blocks collections
src/lib/source.ts Created source loaders for docs and blocks using Fumadocs core
src/mdx-components.tsx Reimplemented MDX components configuration for Fumadocs
src/app/layout.tsx Replaced Nextra Layout with Fumadocs RootProvider
src/app/layout.config.tsx Added basic Fumadocs layout configuration
src/app/docs/[[...slug]]/page.tsx Created new dynamic route handler for docs pages
src/app/blocks/[[...slug]]/page.tsx Created new dynamic route handler for blocks pages
src/app/docs/layout.tsx Added simple layout wrapper for docs section
src/app/blocks/layout.tsx Added simple layout wrapper for blocks section
src/styles/globals.css Removed Nextra-specific styles and added Fumadocs CSS imports
src/components/ui/story-renderer.tsx Removed dependency on reablocks-docs-theme and implemented custom story rendering
src/components/ui/theme-render.tsx Changed export from default to named export
src/components/ui/landing-footer.tsx Created new custom landing footer component
src/content/**/_meta.ts Removed all TypeScript metadata files
src/content/**/meta.json Added JSON metadata files for all sections
src/content//.mdx Updated imports from nextra/components to fumadocs-ui/components

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 2 to 7

export default function Layout({ children }: { children: ReactNode }) {
return (
<div className="container mx-auto p-4">
{children}
</div>
Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to the docs layout, the blocks layout should use Fumadocs layout components to provide proper documentation structure with navigation, sidebar, and other documentation features.

Suggested change
export default function Layout({ children }: { children: ReactNode }) {
return (
<div className="container mx-auto p-4">
{children}
</div>
import { DocsLayout } from 'fumadocs-ui/layout';
export default function Layout({ children }: { children: ReactNode }) {
return (
<DocsLayout>
{children}
</DocsLayout>

Copilot uses AI. Check for mistakes.
Comment on lines +416 to 419
/* Landing page styles */
.landing-page {
background: linear-gradient(to bottom, #11111F 50%, #11111F, #121212);
}
Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The landing page footer styles reference a class "landing-page" that is defined in globals.css, but this class is never applied to any element in the actual landing page. The background gradient styles should either be applied via the "landing-page" class or the class definition should be removed if unused.

Copilot uses AI. Check for mistakes.
src={img.src}
/>
---
</div>
Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A horizontal rule separator (---) was removed from the markdown. This may have been intentional as part of the migration, but verify that this doesn't negatively impact the visual layout of the blocks index page.

Copilot uses AI. Check for mistakes.
<Tabs items={['Single Theme', 'Multiple Themes']}>
<Tabs.Tab>
<Tabs defaultValue="single">
<Tab value="">
Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Tab component has an empty value attribute. In Fumadocs, the Tab component requires a non-empty value prop to identify each tab. You should provide meaningful values like "single" and "multiple" to match the tab content.

Copilot uses AI. Check for mistakes.
<>
<br />
<code className="border-black border-opacity-[0.04] bg-opacity-[0.03] bg-black break-words rounded-md border py-0.5 px-[.25em] text-[.9em] dark:border-white/10 dark:bg-white/10 nextra-code">
<code className="border-black border-opacity-[0.04] bg-opacity-[0.03] bg-black break-words rounded-md border py-0.5 px-[.25em] text-[.9em] dark:border-white/10 dark:bg-white/10 text-blue-400">
Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The className reference "nextra-code" has been removed from the CSS but this component still references it in the className string. Since you're migrating to Fumadocs, you should update this to use an appropriate Fumadocs or custom class name, or simply remove the reference to "nextra-code".

Copilot uses AI. Check for mistakes.
Comment on lines 2 to 7

export default function Layout({ children }: { children: ReactNode }) {
return (
<div className="container mx-auto p-4">
{children}
</div>
Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docs layout is too simplistic and doesn't use Fumadocs layout components. Fumadocs provides DocsLayout component that should be used here to include sidebar navigation, table of contents, breadcrumbs, and other documentation features that were present in the Nextra version.

Suggested change
export default function Layout({ children }: { children: ReactNode }) {
return (
<div className="container mx-auto p-4">
{children}
</div>
import { DocsLayout } from 'fumadocs-ui';
export default function Layout({ children }: { children: ReactNode }) {
return (
<DocsLayout>
{children}
</DocsLayout>

Copilot uses AI. Check for mistakes.
</Tab>

<Tabs.Tab>
<Tab value="">
Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Tab component has an empty value attribute. This should be a non-empty string that identifies this tab, such as "multiple" to differentiate it from the first tab.

Copilot uses AI. Check for mistakes.
Comment on lines 11 to 15
return (
<div>
<h1>{String(page.data.title)}</h1>
</div>
);
Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docs and blocks page implementations only render a simple title without the actual MDX content. The page should render the full MDX content using Fumadocs components. You need to add the MDX component rendering similar to how Fumadocs typically handles this with their DocsPage or similar components.

Copilot uses AI. Check for mistakes.
Comment on lines 11 to 15
return (
<div>
<h1>{String(page.data.title)}</h1>
</div>
);
Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to the docs page, this blocks page only renders the title without the actual MDX content. The page should render the full MDX content using Fumadocs components to properly display the block documentation.

Copilot uses AI. Check for mistakes.
export const baseOptions: BaseLayoutProps = {
nav: {
title: 'Reablocks',
},
Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The layout configuration only sets the navigation title but doesn't configure other important aspects like links, GitHub repository, or sidebar configuration. Fumadocs typically needs more comprehensive layout configuration including project links, repository base URL, and navigation items to provide a complete documentation experience.

Suggested change
},
},
links: [
{
label: 'GitHub',
href: 'https://github.com/reablocks/reablocks',
},
],
github: {
repo: 'reablocks/reablocks',
branch: 'main',
dir: '/',
},
sidebar: {
defaultOpenLevel: 1,
},

Copilot uses AI. Check for mistakes.
- Fix source.ts to use resolveFiles directly instead of createMDXSource
  (fixes e.map is not a function error due to API mismatch)
- Add proper pages arrays to all meta.json files for navigation
- Restore DocsLayout and DocsPage components with proper typing
- Fix Tab components in migration.mdx with valid value props
- Add error handling to changelog.mdx for GitHub fetch failures
- Update blocks and docs page layouts with full Fumadocs UI
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jan 8, 2026

Deploying reablocks-website with  Cloudflare Pages  Cloudflare Pages

Latest commit: 73968b2
Status:🚫  Build failed.

View logs

claude added 3 commits January 8, 2026 12:34
- Override --color-fd-* variables with site's color palette
- Use black-pearl (#02020f) for sidebar background
- Use vulcan (#11111f) for main background
- Use charade (#242433) for cards and secondary backgrounds
- Use blue-500 (#105eff) for primary/accent colors
- Use athens-gray (#f7f7fa) for text
- Set consistent dark background (#1e1e2e) for pre/code blocks
- Remove per-line background colors
- Add proper border and border-radius
- Style code block captions/titles
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments