Skip to content

Use Fumadocs' own layout for the docs shell - #1253

Open
sdserranog wants to merge 6 commits into
mainfrom
fumadocs-native-shell
Open

sdserranog wants to merge 6 commits into
mainfrom
fumadocs-native-shell

Conversation

@sdserranog

@sdserranog sdserranog commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

What this is

This is the first of three follow-ups to #1250. The goal is to drop the Nextra copies and use Fumadocs' own UI with the Arcade style.

This PR replaces the page shell: the navbar, sidebar, table of contents, breadcrumb, previous/next links and the area under the page. These were a 2,100-line copy of Nextra's theme. They are now Fumadocs' notebook layout and docs page.

The content components (callouts, tabs, steps, code blocks) are not touched here. They come in the next PR, which is also when the page title and the headings get the same type scale.

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

Before and after

Pink numbers mark what changed. The same number points at the same thing on both sides. Everything that isn't marked is unchanged.

A docs page

Page top, before and after

The end of a page

Page bottom, before and after

A toolkit page

Toolkit page, before and after

Search

Same index, same results, in Fumadocs' dialog.

Search, before and after

Video · Screenshot

Table of contents while scrolling

The new table of contents marks where the reader is.

Table of contents while scrolling, before and after

Video

Phones

Fumadocs adds an "On this page" bar on phones. Production has no table of contents there.

Phone table of contents, before and after

Video · Screenshot

The menu opens from the side. Sign Up and Dashboard move into it.

Phone menu, before and after

Video · Screenshot

Light mode and the 404 page

Nothing marked: the content is the same, only the shell around it changed.

Light mode, before and after

404 page, before and after

How it was done

  • app/en/layout.tsx uses Fumadocs' DocsLayout (notebook). The navbar options are in lib/layout.shared.tsx.
  • app/en/[[...slug]]/page.tsx uses Fumadocs' DocsPage, DocsTitle and page actions.
  • Previous/next skip cross links, toolkit pages and external links, the same rule as before (lib/page-neighbours.ts, with a test).
  • Search is built from Fumadocs' dialog parts, with a small client that reads the DocSearch index (components/algolia-search.tsx).
  • The crawler config skips the previous/next cards and the "Last updated" line. Merging syncs it to the live crawler.
  • components/chrome/ and the shell CSS are deleted. The Nextra content CSS stays until the next PR.

What we checked so nothing broke

  • Every page in the sitemap (303): title, description, social share tags, canonical link and H1 are identical to production.
  • robots.txt and llms.txt: byte-for-byte identical.
  • Search: the same query gives the same results, in the same order, as production.
  • Previous/next: checked on pages next to cross links, the Changelog link and toolkit pages (Gmail still goes to Nimble).
  • Screens: desktop and phone, dark and light, plus a guide, a quickstart, a toolkit page and the 404 page.
  • Repo checks: lint, typecheck, build and 908 tests pass.

The recordings caught four bugs, now fixed in this PR:

  • Stray credit line: "Search powered by Algolia" showed at the top of every page.
  • Raw search results: results showed whole text blocks as Markdown.
  • Sidebar over the navbar: at the end of a page, the sidebar slid over the navbar.
  • Hidden headings on phones: jumping to a heading left it under the "On this page" bar.

Bugbot's review caught three more, also fixed and checked in a browser:

  • Toolkit Copy Markdown: "Copy Markdown" and "View as Markdown" on toolkit pages got the toolkit JSON. They now ask for ?format=markdown.
  • Escaped characters in search: results showed &lt;token&gt; and Q&amp;A. They now show <token> and Q&A.
  • Phone scroll offset: pages without the "On this page" bar (toolkit pages, the home page) no longer leave room for it.

Not in this PR

  • Content components: callouts, tabs, steps, cards, code blocks and headings move to Fumadocs in the next PR.
  • Arcade theme: colours and fonts from the brand come after that.
  • Production-only widget: the PostHog "Feedback" tab only loads on docs.arcade.dev, so it is hidden in the screenshots.

🤖 Generated with Claude Code

The navbar, sidebar, table of contents, breadcrumb and previous/next
links were a copy of Nextra's theme. They are now Fumadocs' notebook
layout and docs page, so the shell gets Fumadocs' mobile menu, theme
switch, table-of-contents popover and page actions.

- Search keeps the Algolia index. Its hits are shown in Fumadocs' search
  dialog, reshaped from DocSearch records.
- Previous/next skip link-only entries (cross links, toolkit pages,
  external links), as before. Toolkit pages keep their own breadcrumb
  and tool panel; the page leaves room for the panel.
- The crawler skips the previous/next cards and the "Last updated" line,
  which are inside the article.
- The 404 page uses Fumadocs' home layout.

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 2:22pm UTC

Request Review

@sdserranog

Copy link
Copy Markdown
Contributor Author

Closing for now: reviewing this locally first.

@sdserranog sdserranog closed this Oct 20, 2026
@sdserranog
sdserranog deleted the fumadocs-native-shell branch October 20, 2026 01:48
@sdserranog
sdserranog restored the fumadocs-native-shell branch October 20, 2026 01:48
@sdserranog sdserranog reopened this Oct 20, 2026

@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 app/en/[[...slug]]/page.tsx
Fumadocs' Algolia client expects its own record format, so hits from the
DocSearch index came back as whole text blocks rendered as Markdown, and
its dialog renders the Algolia credit outside the dialog, where it shows
on every page. The dialog is now built from Fumadocs' search parts with
a small DocSearch client: short snippets, the section path of each hit,
and plain text with the matches highlighted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The highlight rule now targets the Fumadocs search dialog. The rules for the old InstantSearch classes are gone.

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.

Stale Bugbot comment from a previous run.

Comment thread components/algolia-search.tsx
The footer band pushes the sticky sidebar up at the end of a page, and the sidebar (layer 20) slid over the navbar (layer 10). The navbar is now above it and opaque.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Below xl the "On this page" bar sits under the navbar, so the anchor offset grows from 5rem to 7.5rem there.

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.

There are 3 total unresolved issues (including 2 from previous reviews).

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 0313ba9. Configure here.

Comment thread app/global.css
…fset

- Toolkit pages: "Copy Markdown" and "View as Markdown" request the page with
  `?format=markdown`. Fumadocs' actions cannot send `Accept: text/markdown`,
  so they were getting the toolkit JSON.
- Search: decode the HTML entities Algolia adds to highlighted text, so
  `&`, `<` and `>` show as themselves instead of `&amp;`, `&lt;` and `&gt;`.
- Phones: only leave room for the "On this page" bar on pages that have it.

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

This branch was successfully deployed

1 active deployment
Preview — 600181e5 Deployed Oct 20, 2026 by vercel[bot]
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.

1 participant