Repository navigation
Fix page titles of docs with a notice above the h1 - #910
Merged
Merged
Conversation
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>
Contributor
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
This comment has been minimized.
This comment has been minimized.
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
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 findscontentTitlewithparseMarkdownContentTitle(from@docusaurus/utils), a regex that skips leadingimports and then expects the# h1to come next. A component such as<RebrandingNotice />placed before the h1 makes that check fail, so the title falls back to the file name.millicast/getting-started/index.mdxandtheolive_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.docusaurus.config.ts, theparseFrontMatterhook now fails the build when a doc page (not a_partial) has no front mattertitleand no detectedcontentTitle: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