Skip to content

feat(offlinedocs): prefer front-matter title, fall back to manifest#27167

Open
nickvigilante wants to merge 1 commit into
mainfrom
vigilante/offlinedocs-front-matter-title
Open

feat(offlinedocs): prefer front-matter title, fall back to manifest#27167
nickvigilante wants to merge 1 commit into
mainfrom
vigilante/offlinedocs-front-matter-title

Conversation

@nickvigilante

@nickvigilante nickvigilante commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Part of the docs front-matter title migration (Linear DOCS-482).

offlinedocs now prefers a front-matter title for a page and falls back to the
manifest nav label when the page has no front matter. This keeps the offline docs
renderer aligned with the hosted docs renderer as docs pages migrate to front-matter
titles.

No docs/** page has front matter today, so every page renders exactly as before.
The existing & + h1 dedup is kept, so exactly one H1 renders.

Changes

  • offlinedocs/pages/[[...slug]].tsx
    • getStaticProps reads attributes from front-matter and passes a resolved
      title (front matter, else manifest label) through props.
    • The <title> and the injected page <Heading> render the resolved title.

Verification

Built offlinedocs (pnpm build): 455/455 static pages generated. Temporarily added a
front-matter title to one page to confirm precedence, then reverted:

State <title> page <h1>
Before (no front matter) Administration Administration
After (title: "FM Proof: Administration Console") FM Proof: Administration Console FM Proof: Administration Console

The body # Administration stayed hidden by the & + h1 dedup, so exactly one H1
rendered in both cases. pnpm lint (tsc --noEmit) and prettier --check both pass.

AI disclosure

This PR was generated by Coder Agents and opened on behalf of @nickvigilante, who is
accountable for its contents. Manual verification evidence is included above per the
AI contribution guidelines.

@nickvigilante nickvigilante marked this pull request as ready for review July 10, 2026 18:34
@linear-code

linear-code Bot commented Jul 10, 2026

Copy link
Copy Markdown

DOCS-482

@Jesswinters Jesswinters left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! ☘️

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.

2 participants