feat(offlinedocs): prefer front-matter title, fall back to manifest#27167
Open
nickvigilante wants to merge 1 commit into
Open
feat(offlinedocs): prefer front-matter title, fall back to manifest#27167nickvigilante wants to merge 1 commit into
nickvigilante wants to merge 1 commit into
Conversation
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.
Summary
Part of the docs front-matter title migration (Linear DOCS-482).
offlinedocsnow prefers a front-mattertitlefor a page and falls back to themanifest 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
& + h1dedup is kept, so exactly one H1 renders.Changes
offlinedocs/pages/[[...slug]].tsxgetStaticPropsreadsattributesfromfront-matterand passes a resolvedtitle(front matter, else manifest label) through props.<title>and the injected page<Heading>render the resolved title.Verification
Built offlinedocs (
pnpm build): 455/455 static pages generated. Temporarily added afront-matter title to one page to confirm precedence, then reverted:
<title><h1>AdministrationAdministrationtitle: "FM Proof: Administration Console")FM Proof: Administration ConsoleFM Proof: Administration ConsoleThe body
# Administrationstayed hidden by the& + h1dedup, so exactly one H1rendered in both cases.
pnpm lint(tsc --noEmit) andprettier --checkboth 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.