docs: remove duplicate page title from every MDX body#45
Merged
Conversation
The docs renderer already prints the frontmatter title via <DocsTitle>, so the leading '# Title' H1 in each content file rendered the title a second time. Strip that H1 from all pages (English + translations); the frontmatter title remains the single source, and the on-this-page TOC no longer lists the title itself. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0145MY7RdJr8KuRMyn5oKAR6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Fixes the doc-site issue where every page's title rendered twice.
The docs page renderer (
app/[lang]/docs/[[...slug]]/page.tsx) already prints the frontmatter title via<DocsTitle>(with the description subtitle and Copy-Markdown / Open buttons). Each content file also opened its body with a# TitleH1 that matched the frontmatter title, so the title appeared a second time right below the header.Changes
# TitleH1 from all 406 content MDX files (English + all locales). The frontmattertitleremains the single source of truth — it's what<DocsTitle>, the sidebar, and the browser tab already use.The 15 files whose body H1 differed cosmetically from the frontmatter title (e.g.
`skills` CLIvsskills CLI,岗位(Positions)vs岗位) now show the canonical frontmatter title, matching what the sidebar already displayed.Verification
npm run type-checkandnpm run buildpass (740 pages)/docs/useand zh-Hans positions page both show a single title); header layout and TOC render correctly🤖 Generated with Claude Code
https://claude.ai/code/session_0145MY7RdJr8KuRMyn5oKAR6
Generated by Claude Code