Skip to content
This repository was archived by the owner on Oct 27, 2026. It is now read-only.

Use Fumadocs' own content components - #1254

Open
sdserranog wants to merge 3 commits into
fumadocs-native-shellfrom
fumadocs-native-content
Open

sdserranog wants to merge 3 commits into
fumadocs-native-shellfrom
fumadocs-native-content

Conversation

@sdserranog

@sdserranog sdserranog commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

What this is

Step 2 of the Fumadocs follow-ups, stacked on #1253 (the page shell). The page content now renders with Fumadocs' own components and typography instead of the Nextra theme's, which were copied over during the migration.

  • No MDX changes. Thin wrappers in components/mdx take the props the 180 pages were written with (<Tabs storageKey>, <Cards.Card>, <Callout type="warning">, numbered ### inside <Steps>).
  • Removed: the ported Nextra renderers (headings, links, lists, tables, code blocks, tabs, copy buttons, icons) and about 500 lines of Nextra CSS.
  • Brand colours and fonts are not in this PR. That's step 3.

Preview: https://docs-git-fumadocs-native-content-arcade-ai.vercel.app

Before and after

Left is #1253, whose page content is the same as production. Right is this PR. Pink numbers mark what changed and match the list under each image.

Steps and code blocks

Steps and code blocks

Highlighted lines

Highlighted lines

Tabs

Tabs

Tabs now remember your pick by name, not position. Production remembered the position. So picking "JavaScript" on a page that lists Python first opened Python on "Secure auth in production", which lists JavaScript first. Here the same pick opens JavaScript.

Tabs remember the pick by name

Video

Tables and callouts

Tables and callouts

Cards

Cards

Collapsible sections

Collapsible sections

Toolkit pages

Toolkit pages

Light mode

Light mode

Phone

Phone

How it was done

  • mdx-components.tsx starts from fumadocs-ui/mdx, so links, code blocks, tables and images are Fumadocs' own.
  • The MDX body sits in Fumadocs' DocsBody typography. The home page is built from its own components and stays outside it.
  • Callouts: Fumadocs' Callout. Nextra's types map onto Fumadocs' (default becomes a tip, important a warning).
  • Steps: Fumadocs' fd-steps / fd-step utilities number the headings inside <Steps>, so pages need no <Step> wrappers.
  • Tabs: built on Fumadocs' tabs.
    • storageKey becomes Fumadocs' group sync, saved for the next visit.
    • A saved pick that a group has no tab for is ignored, so a group never ends up with no open panel. That includes picks saved by production, which stored a position like 1.
    • "TypeScript" and "JavaScript" count as the same pick: most groups say JavaScript, a few say TypeScript.
    • Every panel stays in the HTML, so search and links still reach a closed tab, and Fumadocs opens the tab a link points into.
  • Code blocks: Fumadocs' code block, with a title bar, language icon, line numbers and {1-3} line highlighting. Content needs no change.
  • Cards: Fumadocs' cards. A card linking to a docs page shows that page's description.
  • Collapsible sections (<details>): drawn like Fumadocs' accordion but kept as the native element. Fumadocs' Accordion leaves a closed body out of the page, which would hide it from search and find-in-page.
  • Headings: same look as Fumadocs' and the same ids. Fumadocs' copy-link button puts a hidden "Copy Anchor Link" label inside the heading, so this one leaves it out. Otherwise every search record and the heading's accessible name would end in "Copy Anchor Link".
  • Self-styled components opt out of the typography with not-prose, the Fumadocs convention: the client and framework cards, sample apps and auth provider cards. Without it, every line inside those link cards got underlined.

What we checked so nothing broke

Each check compared #1253's preview with this branch.

  • Search records: I ran what the Algolia crawler indexes (headings and text, after its remove rules) on 40 pages.
    • Headings and record counts are identical.
    • The only differences: the stray space the Nextra external-link arrow left before punctuation is gone ("dashboard ." is now "dashboard.").
  • Markdown export (/llms.mdx/*, used by Copy Markdown and agents): byte-for-byte identical on the same 40 pages.
  • SEO: title, description, canonical link and H1 are identical on the same 40 pages. robots.txt and llms.txt are identical; the sitemap differs only in build timestamps.
  • Tabs:
    • Groups switch together, and the pick survives a reload.
    • A saved value from production opens the first tab.
    • A link to a heading inside a closed tab opens that tab: on a fresh load, from the table of contents (desktop and phone), and when the URL already has that hash (a gap production also has, fixed here).
  • Screens: desktop and phone, dark and light, guides, a quickstart, hub pages, a toolkit page and the home page (unchanged).
  • Repo checks: lint, typecheck, build and 911 tests pass, including new tests for the tab rule.

Two layout issues found while reviewing are fixed here:

  • Tall JSX table rows: table cells written as JSX over several lines picked up paragraph margins. They now sit flush.
  • Doubled quote marks: Fumadocs' typography added its own quote marks around blockquotes that already have them. It no longer does.

Visible changes to know about

  • Typography: sizes and spacing follow Fumadocs' typography. For example, h2 headings are smaller and have no underline.
  • No external-link arrow: external links lose the small arrow Nextra added.
  • Bash code blocks without a file name lose the "Terminal" bar with the three dots.
  • On phones, code blocks scroll sideways instead of wrapping.
  • Short pages: the page footer sits at the bottom of the screen (Fumadocs' layout).

Not in this PR

  • Brand colours and fonts mapped onto Fumadocs' variables (step 3). Some tab labels in light mode are low-contrast until then.
  • Changing the MDX itself to Fumadocs' native tags (a later step).

The images live on the pr-1254-media branch, which holds only media and can be deleted after merge.

🤖 Generated with Claude Code


Note

Medium Risk
Wide change to how every docs page renders (typography, tabs, code blocks, headings) with intentional UX differences from production; MDX source is untouched but visual and interaction regressions are the main risk.

Overview
Docs content now uses Fumadocs typography and components instead of the ported Nextra theme. MDX pages are unchanged; wrappers keep Nextra-style props (storageKey, callout types, <Cards.Card>, etc.).

The docs route wraps non-landing MDX in DocsBody. mdx-components.tsx spreads fumadocs-ui/mdx for prose, links, and code blocks, and drops the custom Nextra element renderers (elements, pre, code-buttons, tabs.client, icons). Callouts, cards, steps, and tables delegate to Fumadocs; tabs use SyncedTabs (label-based sync, invalid saved picks ignored, hash/TOC deep links); <details> stays native for search/find-in-page; headings use a custom copy-link control without polluting accessible names.

global.css removes the large Nextra “content parity” block and adds small .prose fixes (task lists, blockquotes, table cells, hidden tab-label headings). Shiki in source.config.ts maps fence {line} meta to Fumadocs’ highlighted class instead of reshaping output for Nextra pre markup.

Card/grid components add not-prose so Fumadocs typography does not restyle them. tabValue tests cover cross-group tab memory.

Reviewed by Cursor Bugbot for commit 430a2b5. Bugbot is set up for automated code reviews on this repo. Configure here.

The MDX pages render with Fumadocs' components and typography instead of the
Nextra theme's, copied over during the migration:

- Callouts, tabs, steps, cards, code blocks, tables, links and images come
  from fumadocs-ui. Thin wrappers in components/mdx take the props the pages
  were written with (`<Tabs storageKey>`, `<Cards.Card>`, numbered `###`
  inside `<Steps>`, `<Callout type="warning">`), so no MDX changes.
- The body uses Fumadocs' typography (`DocsBody`). Self-styled components
  (client and framework cards, sample apps, auth providers) opt out with
  `not-prose`.
- Code blocks: Fumadocs' title bar with a language icon, line numbers and
  highlighted lines (`{1-3}`).
- Tabs remember the pick by label, not position, so groups that order their
  tabs differently agree; "TypeScript" and "JavaScript" count as one pick.
  Every panel stays in the HTML for search and deep links.
- Cards linking to a docs page show that page's description.
- `<details>` stays the native element, drawn like Fumadocs' accordion, so
  its body is in the page for search and find-in-page.
- Headings keep their ids; the copy-link button adds no text to the heading.

Removes the ported Nextra renderers and about 500 lines of Nextra CSS.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docs Ready Ready Preview Oct 20, 2026 7:33pm UTC

Request Review

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

Comment thread components/mdx/tabs.tsx
Comment thread components/guide-overview.tsx
Fumadocs opens the tab holding the URL's target when the hash changes. A
click on a link to the hash the URL already has (a table of contents entry,
after the reader switched to another tab) changes nothing, so the heading
stayed in a closed tab. The tab group now opens it on that click too. The
Nextra tabs on production had the same gap.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit c491f13. Configure here.

Comment thread components/mdx/synced-tabs.tsx
A click on a link to the URL's current hash that points into a closed
tab now cancels the browser's own jump (it aimed at the hidden heading
and, with smooth scrolling, raced ours) and scrolls after React shows
the tab. Other hash links are left to the browser and Fumadocs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sdserranog
sdserranog marked this pull request as ready for review October 20, 2026 19:38

This branch was successfully deployed

1 active deployment
Preview — 430a2b5e Deployed Oct 20, 2026 by vercel[bot]
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant