Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!-- BEGIN:nextjs-agent-rules -->

# This is NOT the Next.js you know
## This is NOT the Next.js you know

This version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in `node_modules/next/dist/docs/` (resolved from this file's directory; in monorepos the `next` package may not be visible from the repo root) before writing any code. Heed deprecation notices.

Expand Down
18 changes: 15 additions & 3 deletions app/(docs)/[[...slug]]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { DocsBody, DocsDescription, DocsPage, DocsTitle } from 'fumadocs-ui/layouts/notebook/page';
import { DocsBody, DocsDescription, DocsPage, DocsTitle, MarkdownCopyButton } from 'fumadocs-ui/layouts/notebook/page';
import { createRelativeLink } from 'fumadocs-ui/mdx';
import type { Metadata } from 'next';
import { notFound } from 'next/navigation';
import { getMDXComponents } from '@/components/mdx';
import { appName, getPageImageUrl, siteUrl } from '@/lib/shared';
import { appName, getPageImageUrl, getPageMarkdownUrl, siteUrl } from '@/lib/shared';
import { source } from '@/lib/source';

export default async function Page(props: PageProps<'/[[...slug]]'>) {
Expand Down Expand Up @@ -42,7 +42,19 @@ export default async function Page(props: PageProps<'/[[...slug]]'>) {

return (
<DocsPage toc={page.data.toc} full={page.data.full ?? page.data.mode === 'wide'}>
<DocsTitle>{page.data.title}</DocsTitle>
<div className="flex items-start justify-between gap-4">
<DocsTitle>{page.data.title}</DocsTitle>
{/* Mintlify's "Copy page" button as an icon only, without its dropdown of AI and Markdown links.
The empty string replaces Fumadocs' "Copy Markdown" label: `null` would fall back to it. */}
<MarkdownCopyButton
markdownUrl={getPageMarkdownUrl(page).url}
aria-label="Copy page"
title="Copy page"
className="mt-1 size-8 shrink-0 p-0"
>
{''}
</MarkdownCopyButton>
</div>
<DocsDescription>{page.data.description}</DocsDescription>
<DocsBody>
<MDX components={components} />
Expand Down
10 changes: 10 additions & 0 deletions app/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@
display: none;
}

/*
* A full page caps its content at 1285px and aligns it left, which leaves the start page off-centre
* under the wider navbar. `width` keeps the content stretched: an auto margin alone would shrink a
* flex item to fit its content.
*/
article[data-home] > * {
width: 100%;
margin-inline: auto;
}

/*
* The dropdown switcher (Wallets → Web, Android, …) lives at the top of the sidebar, so drop the
* copy Fumadocs renders at the start of the navbar tab row. The tabs are links; it's the button.
Expand Down
Loading