Repository navigation
Fix residual docs metadata from Ahrefs audit #7893
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
51 commits
Select commit
Hold shift + click to select a range
d39be53
Fix site metadata audit findings
lawrencecchen 7bfa15f
Merge remote-tracking branch 'origin/main' into feat-seo-site-audit
lawrencecchen 85b9d5a
Harden localized metadata truncation
lawrencecchen 710120a
Keep metadata on grapheme boundaries
lawrencecchen 63bfbe0
Preserve localized home title context
lawrencecchen ea18e20
Preserve metadata source language
lawrencecchen 3d6a523
Canonicalize untranslated SEO routes
lawrencecchen abcbf95
Keep fallback SEO redirects loop-free
lawrencecchen b803844
Preserve fallback locale negotiation
lawrencecchen 7bbfe14
Keep legal metadata marketing-free
lawrencecchen 4217eb3
Align SEO bounds and canonical links
lawrencecchen 3be4b0f
Emit direct fallback content links
lawrencecchen 2666930
Emit constrained content links directly
lawrencecchen e0a3c07
Preserve localized metadata boundaries
lawrencecchen 852d77d
Select authored SEO metadata candidates
lawrencecchen 1da54cf
Make SEO width checks deterministic
lawrencecchen 3e0a647
Preserve localized SEO route identity
lawrencecchen b4d6a4b
Share localized metadata sentence joining
lawrencecchen 5d3bb81
Prefer complete route-specific SEO prose
lawrencecchen d51d50c
Reject metadata lead-in fragments
lawrencecchen 52659ea
Reject unresolved metadata placeholders
lawrencecchen ab6ce8f
Keep fallback metadata semantically complete
lawrencecchen 0930130
Use complete localized SEO context
lawrencecchen a3faf51
Use complete localized SEO context
lawrencecchen 44ac6d5
Preserve useful localized SEO fallbacks
lawrencecchen 300afa6
Avoid invalid localized SEO fallbacks
lawrencecchen 83f475e
Stabilize navigation mocks in web tests
lawrencecchen 101d1ce
Preserve locale preference for fallback content
lawrencecchen a261994
Normalize fallback SEO paths
lawrencecchen 478a89c
test: cover audited docs metadata
lawrencecchen 2d9bf92
Fix residual docs metadata from audit
lawrencecchen 08220c6
Avoid rich text in docs SEO metadata
lawrencecchen be5c3d6
Adapt docs SEO candidates to complete prose
lawrencecchen efe83a3
Classify docs SEO context fragments
lawrencecchen e889234
test: reject docs metadata placeholders
lawrencecchen 0865b3c
Keep localized docs metadata within bounds
lawrencecchen 42776ba
test: cover docs metadata review regressions
lawrencecchen 488afc9
Fix docs metadata review regressions
lawrencecchen 1747235
test: avoid stacked docs title suffixes
lawrencecchen 18a7afb
Keep templated docs titles within bounds
lawrencecchen f08ed91
Isolate docs metadata regression coverage
lawrencecchen 5daf6d4
Avoid duplicate branding in docs titles
lawrencecchen 19122f4
test: reject generic docs metadata fallbacks
lawrencecchen 7671030
Keep docs metadata grounded in route copy
lawrencecchen 2834291
test: reject truncated docs metadata
lawrencecchen cf6f3f6
Use complete raw copy for docs metadata
lawrencecchen 94e7c94
test: keep docs prose attached to subjects
lawrencecchen 3cfb760
Use standalone prose for docs metadata
lawrencecchen 830eac3
test: require audited docs description sources
lawrencecchen ff04f31
Use audited sources for docs descriptions
lawrencecchen c81e844
Merge remote-tracking branch 'origin/main' into feat-seo-docs-audit
lawrencecchen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
24 changes: 6 additions & 18 deletions
24
web/app/[locale]/(landing)/docs/agent-integrations/oh-my-opencode/page.tsx
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| import { getMessages } from "next-intl/server"; | ||
| import type { Locale } from "@/i18n/routing"; | ||
| import { | ||
| type AuditedDocsPageKey, | ||
| docsPageSeoCopy, | ||
| type SeoMessageLookup, | ||
| } from "@/i18n/audited-seo"; | ||
| import { | ||
| buildAlternates, | ||
| openGraphDefaults, | ||
| twitterSummary, | ||
| } from "@/i18n/seo"; | ||
|
|
||
| export async function auditedDocsMetadata({ | ||
| locale, | ||
| pageKey, | ||
| path, | ||
| availableLocales, | ||
| }: { | ||
| locale: string; | ||
| pageKey: AuditedDocsPageKey; | ||
| path: string; | ||
| availableLocales?: readonly Locale[]; | ||
| }) { | ||
| const allMessages = await getMessages({ locale }); | ||
| const docs = allMessages.docs as Record<string, unknown>; | ||
| const pageMessages = docs[pageKey] as Record<string, unknown>; | ||
| const messages: SeoMessageLookup = (key) => { | ||
| const value = pageMessages[key]; | ||
| if (typeof value !== "string") { | ||
| throw new Error(`Expected docs.${pageKey}.${key} to be a string`); | ||
| } | ||
| return value; | ||
| }; | ||
| const layoutTitle = docs.layoutTitle; | ||
| if (typeof layoutTitle !== "string") { | ||
| throw new Error("Expected docs.layoutTitle to be a string"); | ||
| } | ||
| const alternates = buildAlternates(locale, path, availableLocales); | ||
| const { title, socialTitle, description } = docsPageSeoCopy( | ||
| locale, | ||
| pageKey, | ||
| messages, | ||
| layoutTitle, | ||
| { | ||
| curatedDescription: | ||
| typeof pageMessages.metaDescriptionShort === "string" | ||
| ? pageMessages.metaDescriptionShort | ||
| : undefined, | ||
| intro: | ||
| typeof pageMessages.intro === "string" | ||
| ? pageMessages.intro | ||
| : undefined, | ||
| }, | ||
| ); | ||
| return { | ||
| title, | ||
| description, | ||
| alternates, | ||
| openGraph: { | ||
| ...openGraphDefaults(locale, "article"), | ||
| title: socialTitle, | ||
| description, | ||
| url: alternates.canonical, | ||
| }, | ||
| twitter: twitterSummary(locale, socialTitle, description), | ||
| }; | ||
| } | ||
24 changes: 6 additions & 18 deletions
24
web/app/[locale]/(landing)/docs/browser-automation/page.tsx
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
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
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
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.