diff --git a/AGENTS.md b/AGENTS.md index 18fc188..cf9e213 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,6 +1,6 @@ -# 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. diff --git a/app/(docs)/[[...slug]]/page.tsx b/app/(docs)/[[...slug]]/page.tsx index 3e4eacc..1608187 100644 --- a/app/(docs)/[[...slug]]/page.tsx +++ b/app/(docs)/[[...slug]]/page.tsx @@ -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]]'>) { @@ -42,7 +42,19 @@ export default async function Page(props: PageProps<'/[[...slug]]'>) { return ( - {page.data.title} +
+ {page.data.title} + {/* 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. */} + + {''} + +
{page.data.description} diff --git a/app/global.css b/app/global.css index 12db55f..dc31799 100644 --- a/app/global.css +++ b/app/global.css @@ -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.