Skip to content

Commit e3e3651

Browse files
kyleconroyclaude
andcommitted
Remove the per-page Copy Markdown and Open buttons
The button row above each page body held fumadocs' MarkdownCopyButton and ViewOptionsPopover (the "Open" popover: view as markdown / edit on GitHub). Drop both, along with the now-unused markdownUrl and sourcePath locals and the getPageMarkdownUrl and gitConfig imports. DocsDescription loses its mb-0 override and falls back to the default mb-8; the override only existed so the description butted against the button row's bottom border, which is gone with it. The /llms.mdx/docs/**/content.md routes stay — the copy button fetched them, but llms.txt and llms-full.txt still do. gitConfig stays in lib/layout.shared.tsx for the navbar's GitHub link. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GKc3BJAnDEG26khsB5p125
1 parent 7a50bb4 commit e3e3651

1 file changed

Lines changed: 2 additions & 18 deletions

File tree

app/(docs)/[[...slug]]/page.tsx

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
1-
import { getPageImageUrl, getPageMarkdownUrl, source } from '@/lib/source';
1+
import { getPageImageUrl, source } from '@/lib/source';
22
import {
33
DocsBody,
44
DocsDescription,
55
DocsPage,
66
DocsTitle,
7-
MarkdownCopyButton,
8-
ViewOptionsPopover,
97
} from 'fumadocs-ui/layouts/docs/page';
108
import { notFound } from 'next/navigation';
119
import { getMDXComponents } from '@/components/mdx';
1210
import type { Metadata } from 'next';
1311
import { createRelativeLink } from '@/lib/relative-link';
14-
import { gitConfig } from '@/lib/shared';
1512

1613
// Routes carry the .html suffix of the legacy Read the Docs URLs
1714
// (/howto/select.html); page slugs in the source do not.
@@ -28,24 +25,11 @@ export default async function Page(props: PageProps<'/[[...slug]]'>) {
2825
if (!page) notFound();
2926

3027
const MDX = page.data.body;
31-
const markdownUrl = getPageMarkdownUrl(page).url;
32-
// Per-release changelog pages are split out of reference/changelog.md by
33-
// the ingest step; their upstream source is that one file.
34-
const sourcePath = page.path.startsWith('reference/changelog/')
35-
? 'reference/changelog.md'
36-
: page.path;
3728

3829
return (
3930
<DocsPage toc={page.data.toc} full={page.data.full}>
4031
<DocsTitle>{page.data.title}</DocsTitle>
41-
<DocsDescription className="mb-0">{page.data.description}</DocsDescription>
42-
<div className="flex flex-row gap-2 items-center border-b pb-6">
43-
<MarkdownCopyButton markdownUrl={markdownUrl} />
44-
<ViewOptionsPopover
45-
markdownUrl={markdownUrl}
46-
githubUrl={`https://github.com/${gitConfig.user}/${gitConfig.repo}/blob/${gitConfig.branch}/docs/${sourcePath}`}
47-
/>
48-
</div>
32+
<DocsDescription>{page.data.description}</DocsDescription>
4933
<DocsBody>
5034
<MDX
5135
components={getMDXComponents({

0 commit comments

Comments
 (0)