Skip to content

fix(seo): drop transcript from VideoObject - #19017

Open
patrick-star-10 wants to merge 1 commit into
ethereum:devfrom
patrick-star-10:fix/drop-videoobject-transcript
Open

fix(seo): drop transcript from VideoObject#19017
patrick-star-10 wants to merge 1 commit into
ethereum:devfrom
patrick-star-10:fix/drop-videoobject-transcript

Conversation

@patrick-star-10

Copy link
Copy Markdown

Description

Closes #18996.

This PR removes the transcript property from the VideoObject JSON-LD emitted by video detail pages.

Google does not list transcript as a supported property for video rich results. In addition, the existing escaping converted every slash in transcript content into literal \u002f text after JSON serialization, corrupting URLs, dates, and fractions. On localized pages, attaching a translated transcript to a VideoObject whose inLanguage describes the original audio also made the node internally ambiguous.

The transcript remains in the server-rendered page body, where it is visible to users and available for indexing.

Changes

  • Removed transcript from the video detail page's VideoObject JSON-LD node.
  • Removed the now-unused transcript prop from VideoPageJsonLD.
  • Removed the now-unused stripMarkdown import and transcript escaping logic.
  • Stopped passing transcript Markdown into the JSON-LD component.
  • Added Playwright regression coverage for English and Spanish versions of the example video from the issue.

The regression test parses the emitted JSON-LD and verifies that:

  • the VideoObject has no transcript property;
  • name, thumbnailUrl, and uploadDate remain populated; and
  • localized transcript text still renders in the page body.

No transcript content, translations, accordion behavior, or other VideoObject fields were changed.

JSON-LD size measurements

Measured from the application/ld+json script containing the VideoObject while running the site locally:

Page Before After Reduction
/videos/ethereum-privacy-stack-andy-guzman/ 26,853 bytes 3,124 bytes 88.4%
/es/videos/ethereum-privacy-stack-andy-guzman/ 29,820 bytes 3,258 bytes 89.1%

Testing

  • TDD regression check before the implementation: corepack pnpm exec playwright test tests/e2e/videos-jsonld.spec.ts --project=e2e --workers=1 — failed in both locale cases specifically because VideoObject.transcript was still present.
  • corepack pnpm lint — passed with no ESLint errors.
  • corepack pnpm type-check — passed Next.js route type generation, application TypeScript checks, and Netlify edge-function TypeScript checks.
  • corepack pnpm test:unit — 990 passed, 1 skipped, 0 failed.
  • corepack pnpm exec playwright test tests/e2e/videos-jsonld.spec.ts --project=e2e --workers=1 — 2 passed, 0 failed.

@netlify

netlify Bot commented Aug 7, 2026

Copy link
Copy Markdown

Deploy Preview for ethereumorg ready!

Name Link
🔨 Latest commit 19699bd
🔍 Latest deploy log https://app.netlify.com/projects/ethereumorg/deploys/6a759e3574d7c5000800dd4c
😎 Deploy Preview https://deploy-preview-19017.ethereum.it
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
7 paths audited
Performance: 59 (🟢 up 2 from production)
Accessibility: 95 (no change from production)
Best Practices: 100 (🟢 up 1 from production)
SEO: 98 (no change from production)
PWA: 60 (no change from production)
View the detailed breakdown and full score reports
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions

Copy link
Copy Markdown
Contributor

🔎 First-pass review — ✅ Looks mergeable

Drops the transcript field from the video VideoObject JSON-LD (page-jsonld.tsx), removes the now-unused transcript prop threaded in from page.tsx, and the newly-unused stripMarkdown import. A new tests/e2e/videos-jsonld.spec.ts asserts the VideoObject no longer carries transcript while the transcript text still renders in the page body (checked in both en and es). Tightly scoped, and removing the import means no unused-var fallout.

The one thing worth a conscious ✅ from a reviewer: this is a deliberate structured-data change. transcript is a valid schema.org property but isn't used for Google video rich results, and a full transcript inlined as JSON-LD meaningfully bloats each video page's HTML — so dropping it is a reasonable payload win, with the transcript still present on-page for users. Just confirm that's the intent.

Analysis

Lane: code (2 .tsx under app/[locale]/videos/[slug]/, 1 new e2e spec).

Checked: stripMarkdown import removed together with its only use; the transcript prop removed from both the component signature and the call site (no dangling references); the e2e spec follows the @playwright/test convention and asserts not.toHaveProperty("transcript") plus on-page toContainText. No unused vars introduced.

Routing: needs dev approval 🧑💻 — an engineer to confirm the SEO intent; CI (e2e) will confirm behavior. CI is likely still running — no comment on pending checks.

Generated by PR Backlog Sweeper · 450.3 AIC · ⌖ 30.2 AIC · ⊞ 6K ·

@patrick-star-10

Copy link
Copy Markdown
Author

Confirmed — removing transcript from the VideoObject JSON-LD is intentional. Google does not use this property for video rich results, and the existing values add substantial payload size while creating content and language inconsistencies. The transcript remains server-rendered in the page body, with E2E coverage verifying that behavior in both English and Spanish.

@ethorg-agent

ethorg-agent Bot commented Sep 3, 2026

Copy link
Copy Markdown

🔎 First-pass review — ✅ Looks mergeable

Short re-review. The author (@patrick-star-10) confirmed on Aug 10 that dropping transcript from the video VideoObject JSON-LD is intentional — Google doesn't use that property for video rich results, it meaningfully inflates each video page's payload, and the transcript still server-renders in the page body (with e2e coverage in both en and es). That conscious sign-off on the structured-data change was the one thing the first-pass flagged, so it's now on record.

Nothing blocking — it just needs a dev to accept the change and merge. Applied needs dev approval 🧑💻 (the PR had no routing label). Please confirm CI is green on the current SHA before merging.

Analysis

Lane: code (app/[locale]/videos/[slug]/{page,page-jsonld}.tsx, tests/e2e/videos-jsonld.spec.ts). The stripMarkdown import and the transcript prop were removed together, so no unused-var fallout. No type label applies to the code lane — routing only.

Generated by PR Backlog Sweeper · 351.1 AIC · ⌖ 31.3 AIC · ⊞ 6K ·

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.

fix(seo): drop transcript from VideoObject (unsupported by Google, values corrupted, contradicts inLanguage)

1 participant