Skip to content

fix: remove duplicate H1s from docs pages and lint against them - #53

Merged
Bccorb merged 1 commit into
mainfrom
fix/duplicate-page-titles
Oct 6, 2026
Merged

Bccorb merged 1 commit into
mainfrom
fix/duplicate-page-titles

Conversation

@Bccorb

@Bccorb Bccorb commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Starlight renders each page's frontmatter title as the H1. 27 pages under src/content/docs/ also opened with a # heading, so the title appeared twice and the outline had two top-level headings.

  • Remove the leading # heading from all 27 pages.
  • Promote the clearer heading wording into title on two pages (this also updates their sidebar label and <title> tag):
    • build/auth-api.mdx: "Auth API Server" to "Seamless Auth API"
    • operate/CLI.mdx: "CLI" to "Seamless Auth CLI"
  • The other mismatched pages keep their frontmatter title, which is more specific and already drives the sidebar label.
  • Add scripts/check-no-h1.mjs, run by npm run lint (and so by the pre-commit hook). It fails when a docs page has a line starting with # outside a code fence.

No URLs change, so no redirects are needed.

Testing

  • npm run lint, npm run typecheck, npm run build all pass.
  • Built pages (for example /build/react-native-sdk, /build/auth-api, /operate/cli) contain a single <h1>.
  • Adding a # heading to a page makes npm run lint fail, naming the file and line.

Closes #52

Starlight renders the frontmatter title as the page H1, so the leading
# heading in 27 pages showed the title twice. Remove those headings,
promote the clearer wording into the title for the Auth API and CLI
pages, and fail npm run lint when a body H1 is added again.

Closes #52
@Bccorb
Bccorb merged commit d11e149 into main Oct 6, 2026
1 check passed
@Bccorb
Bccorb deleted the fix/duplicate-page-titles branch October 6, 2026 20:01
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.

Pages render their title twice: Starlight's title plus an # H1 in the MDX

1 participant