Skip to content

Fix page titles of docs with a notice above the h1 - #910

Merged
MattiasBuelens merged 2 commits into
mainfrom
devin/1791795775-fix-doc-page-titles
Oct 12, 2026
Merged

MattiasBuelens merged 2 commits into
mainfrom
devin/1791795775-fix-doc-page-titles

Conversation

@MattiasBuelens

Copy link
Copy Markdown
Collaborator

Summary

Some pages had the wrong <title>. For example, /millicast/getting-started/ showed "index | Dolby OptiView Documentation" instead of its h1.

Docusaurus sets a doc's title as frontMatter.title ?? contentTitle ?? baseID. It finds contentTitle with parseMarkdownContentTitle (from @docusaurus/utils), a regex that skips leading imports and then expects the # h1 to come next. A component such as <RebrandingNotice /> placed before the h1 makes that check fail, so the title falls back to the file name.

  • In millicast/getting-started/index.mdx and theolive_versioned_docs/version-v1/getting-started.mdx, the h1 now comes before the imports and notices. Most other pages with a rebranding notice already use this order (e.g. theoplayer/web/index.mdx). MDX hoists imports, so they can appear after the h1.
  • In docusaurus.config.ts, the parseFrontMatter hook now fails the build when a doc page (not a _partial) has no front matter title and no detected contentTitle:
if (!frontMatter.title && !path.basename(params.filePath).startsWith('_') && !parseMarkdownContentTitle(result.content).contentTitle) {
  throw new Error(`${params.filePath}: Missing page title. Move the h1 heading to the top of the document ...`);
}

These two were the only pages that tripped the check. The built titles are now "Getting started with OptiView Real-time Streaming" and "Backend" (the THEOlive v1 page's h1).

Link to Devin session: https://dolby.devinenterprise.com/sessions/3c8f1fdea34b4fce8ed086d5a11a16c1
Open in Devin Desktop: https://dolby.devinenterprise.com/desktop/session/3c8f1fdea34b4fce8ed086d5a11a16c1?variant=devin
Requested by: @MattiasBuelens

MattiasBuelens and others added 2 commits October 12, 2026 09:09
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@theoplayer-bot

This comment has been minimized.

@MattiasBuelens
MattiasBuelens merged commit 1944b66 into main Oct 12, 2026
2 checks passed
@MattiasBuelens
MattiasBuelens deleted the devin/1791795775-fix-doc-page-titles branch October 12, 2026 09:53
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.

1 participant