Skip to content

docs content: 205 pages render two <h1> — 129 of them the same text twice #12236

Description

@os-zhuang

One-liner

DocsTitle renders the frontmatter title as the page <h1>. 205 of the 403 MDX files also open with a # Heading in the body, so those pages ship two <h1>s — and on 129 of them the two are the identical string.

Measured

$ curl -s http://localhost:3999/docs/data-modeling/objects | grep -o '<h1[^>]*>.*</h1>'
h1: Object Metadata
h1: Object Metadata ← the body's own `# Object Metadata`
files with a body H1: 205
body H1 identical to the frontmatter title: 129
body H1 different from the title: 76

Expected

  • Strip the leading body # … from the 129 files where it duplicates the title — the rendered page is unchanged apart from losing the second h1.
  • For the 76 where the body H1 says something different, demote it to ## rather than deleting it; the wording is often the more search-friendly of the two, so consider promoting that wording into the frontmatter title instead (coordinate with the page-title card rather than doing it twice).
  • Add a gate so a new page cannot reintroduce a body # heading — the repo already runs scripts/check-*.mjs style checks from Lint & Repo Gates.

Why it matters

Two h1s split the strongest on-page signal a document has, and a screen reader announces the title twice. It is also the cheapest keyword fix on the site: 129 files, mechanical.

Acceptance

  • no page in content/docs/** renders more than one <h1>
  • pnpm check:* gains a check that fails on a body-level # heading in content/docs/**
  • anchors/links that pointed at the removed heading still resolve (pnpm check:doc-anchors)

Source

Found in an SEO review of the docs site (apps/docs) run on 2026-08-25, measured against the local dev server and against production. The canonical origin is https://objectstack.ai — maintainer ruling recorded in #10659:

这个仓的文档站规范 URL 是 https://objectstack.ai

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions