Skip to content

WS 1939 - Expose canonical PodcastEpisode structured data on all podcast episode pages#13766

Open
Louis-Matsika wants to merge 13 commits intolatestfrom
WS-1939--podcast-data
Open

WS 1939 - Expose canonical PodcastEpisode structured data on all podcast episode pages#13766
Louis-Matsika wants to merge 13 commits intolatestfrom
WS-1939--podcast-data

Conversation

@Louis-Matsika
Copy link
Contributor

@Louis-Matsika Louis-Matsika commented Mar 2, 2026

Resolves JIRA: 1939

Summary

  • updates the linked data supplied by podcast episode pages to follow the PodcastEpisode schema by schema.org

  • these changes are put behind a new toggle podcastEpisodeLinkedData so we can roll them out service by service

  • references to http://www.schema.org have been updated to https://www.schema.org as this aligns with schema.org’s new “preferred form” in their docs

  • updated many snapshots

Testing

using https://validator.schema.org/ and pasting linked data for any podcast episode page with these changes, e.g. http://localhost:7081/russian/podcasts/p076qqzl/p0mv4g8m?renderer_env=live

will validate that the fields we want are now coming through

{"@context":"https://schema.org","@graph":[{"@type":"WebPage","url":"http://localhost:7081/russian/podcasts/p076qqzl/p0mv4g8m","publisher":{"@type":"NewsMediaOrganization","name":"BBC News Русская служба","publishingPrinciples":"https://www.bbc.com/russian/institutional-50098149","logo":{"@type":"ImageObject","width":1024,"height":576,"url":"https://static.files.bbci.co.uk/ws/simorgh-assets/public/russian/images/metadata/poster-1024x576.png"}},"thumbnailUrl":"https://static.files.bbci.co.uk/ws/simorgh-assets/public/russian/images/metadata/poster-1024x576.png","image":{"@type":"ImageObject","width":1024,"height":576,"url":"https://static.files.bbci.co.uk/ws/simorgh-assets/public/russian/images/metadata/poster-1024x576.png"},"mainEntityOfPage":{"@type":"WebPage","@id":"http://localhost:7081/russian/podcasts/p076qqzl/p0mv4g8m","name":"Зеленский объявил режим ЧС в украинской энергетике - Что это было? - Russian"},"inLanguage":{"@type":"Language","name":"Russian","alternateName":"ru"},"mainEntity":{"@id":"http://localhost:7081/russian/podcasts/p076qqzl/p0mv4g8m#episode"}},{"@type":"PodcastSeries","@id":"http://localhost:7081/russian/podcasts/p076qqzl#series","name":"Что это было?"},{"@type":"PodcastEpisode","@id":"http://localhost:7081/russian/podcasts/p076qqzl/p0mv4g8m#episode","name":"Зеленский объявил режим ЧС в украинской энергетике","description":"В особенно тяжелом положении Киев","datePublished":"2026-01-15T00:00:00.000Z","partOfSeries":{"@id":"http://localhost:7081/russian/podcasts/p076qqzl#series"},"associatedMedia":{"@type":"AudioObject","@id":"http://localhost:7081/russian/podcasts/p076qqzl/p0mv4g8m#audio","name":"Зеленский объявил режим ЧС в украинской энергетике","description":"В особенно тяжелом положении Киев","duration":"PT23M34S","thumbnailUrl":"https://ichef.bbci.co.uk/images/ic/1024x576/p0mv4gd1.jpg","uploadDate":"2026-01-15T12:36:00.000Z"}}]}

Useful Links

@Louis-Matsika Louis-Matsika changed the title update linked data WS 1939 - Expose canonical PodcastEpisode structured data on all podcast episode pages Mar 4, 2026
@Louis-Matsika Louis-Matsika marked this pull request as ready for review March 5, 2026 08:29
Copilot AI review requested due to automatic review settings March 5, 2026 08:29
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates podcast episode pages to emit canonical PodcastEpisode JSON-LD (schema.org) behind a new podcastEpisodeLinkedData toggle, and standardises JSON-LD @context to https://schema.org across the app.

Changes:

  • Add PodcastSeries + PodcastEpisode entities (and mainEntity) for podcast episode pages when podcastEpisodeLinkedData is enabled.
  • Add mainEntityId support to the shared LinkedData component and switch @context to https://schema.org.
  • Add the new toggle to toggle configs/docs and update snapshots accordingly.

Reviewed changes

Copilot reviewed 66 out of 67 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
ws-nextjs-app/pages/[service]/onDemandAudio/index.test.tsx Adds snapshot coverage for podcast episode linked data behind a toggle.
ws-nextjs-app/pages/[service]/onDemandAudio/OnDemandAudioLayout.tsx Emits PodcastEpisode/PodcastSeries linked data for episode routes; wires in toggle + RequestContext.
ws-nextjs-app/integration/pages/topicPage/pidgin/snapshots/canonical.test.ts.snap Snapshot update for @context https change.
ws-nextjs-app/integration/pages/storyPage/mundo/snapshots/canonical.test.ts.snap Snapshot update for @context https change.
ws-nextjs-app/integration/pages/storyPage/mundo/snapshots/amp.test.ts.snap Snapshot update for @context https change.
ws-nextjs-app/integration/pages/storyPage/kyrgyz/snapshots/canonical.test.ts.snap Snapshot update for @context https change.
ws-nextjs-app/integration/pages/storyPage/kyrgyz/snapshots/amp.test.ts.snap Snapshot update for @context https change.
ws-nextjs-app/integration/pages/storyPage/hausa/snapshots/canonical.test.ts.snap Snapshot update for @context https change.
ws-nextjs-app/integration/pages/storyPage/hausa/snapshots/amp.test.ts.snap Snapshot update for @context https change.
ws-nextjs-app/integration/pages/photoGalleryPage/thai/snapshots/canonical.test.ts.snap Snapshot update for @context https change.
ws-nextjs-app/integration/pages/photoGalleryPage/thai/snapshots/amp.test.ts.snap Snapshot update for @context https change.
ws-nextjs-app/integration/pages/photoGalleryPage/mundo/snapshots/canonical.test.ts.snap Snapshot update for @context https change.
ws-nextjs-app/integration/pages/photoGalleryPage/mundo/snapshots/amp.test.ts.snap Snapshot update for @context https change.
ws-nextjs-app/integration/pages/onDemandAudioPage/pashtoBrand/snapshots/canonical.test.ts.snap Snapshot update for @context https change + uploadDate change.
ws-nextjs-app/integration/pages/onDemandAudioPage/pashto/snapshots/canonical.test.ts.snap Snapshot update for @context https change + uploadDate change.
ws-nextjs-app/integration/pages/onDemandAudioPage/pashto.expired/snapshots/canonical.test.ts.snap Snapshot update for @context https change.
ws-nextjs-app/integration/pages/onDemandAudioPage/indonesia/snapshots/canonical.test.ts.snap Snapshot update for @context https change + uploadDate change.
ws-nextjs-app/integration/pages/onDemandAudioPage/indonesia.expired/snapshots/canonical.test.ts.snap Snapshot update for @context https change.
ws-nextjs-app/integration/pages/onDemandAudioPage/gahuza.expired/snapshots/canonical.test.ts.snap Snapshot update for @context https change.
ws-nextjs-app/integration/pages/mediaAssetPage/pidgin/snapshots/canonical.test.ts.snap Snapshot update for @context https change.
ws-nextjs-app/integration/pages/mediaAssetPage/pidgin/snapshots/amp.test.ts.snap Snapshot update for @context https change.
ws-nextjs-app/integration/pages/mediaAssetPage/persian/snapshots/canonical.test.ts.snap Snapshot update for @context https change.
ws-nextjs-app/integration/pages/mediaAssetPage/persian/snapshots/amp.test.ts.snap Snapshot update for @context https change.
ws-nextjs-app/integration/pages/mediaAssetPage/arabicTC2/snapshots/canonical.test.ts.snap Snapshot update for @context https change.
ws-nextjs-app/integration/pages/mediaArticlePage/pidgin/snapshots/canonical.test.ts.snap Snapshot update for @context https change.
ws-nextjs-app/integration/pages/mediaArticlePage/pidgin/snapshots/amp.test.ts.snap Snapshot update for @context https change.
ws-nextjs-app/integration/pages/live/serbian/snapshots/canonical.test.ts.snap Snapshot update for @context https change.
ws-nextjs-app/integration/pages/homePage/serbianLat/snapshots/canonical.test.ts.snap Snapshot update for @context https change.
ws-nextjs-app/integration/pages/homePage/serbianCyr/snapshots/canonical.test.ts.snap Snapshot update for @context https change.
ws-nextjs-app/integration/pages/homePage/kyrgyz/snapshots/canonical.test.ts.snap Snapshot update for @context https change.
ws-nextjs-app/integration/pages/homePage/hindi/snapshots/canonical.test.ts.snap Snapshot update for @context https change.
ws-nextjs-app/integration/pages/homePage/arabic/snapshots/canonical.test.ts.snap Snapshot update for @context https change.
ws-nextjs-app/integration/pages/articles/scotland/snapshots/canonical.test.ts.snap Snapshot update for @context https change.
ws-nextjs-app/integration/pages/articles/scotland/snapshots/amp.test.ts.snap Snapshot update for @context https change.
ws-nextjs-app/integration/pages/articles/persianMediaPlayer/snapshots/canonical.test.ts.snap Snapshot update for @context https change.
ws-nextjs-app/integration/pages/articles/persianMediaPlayer/snapshots/amp.test.ts.snap Snapshot update for @context https change.
ws-nextjs-app/integration/pages/articles/persian/snapshots/canonical.test.ts.snap Snapshot update for @context https change.
ws-nextjs-app/integration/pages/articles/persian/snapshots/amp.test.ts.snap Snapshot update for @context https change.
ws-nextjs-app/integration/pages/articles/news/snapshots/canonical.test.ts.snap Snapshot update for @context https change.
ws-nextjs-app/integration/pages/articles/news/snapshots/amp.test.ts.snap Snapshot update for @context https change.
ws-nextjs-app/integration/pages/articles/hausa/snapshots/canonical.test.ts.snap Snapshot update for @context https change.
ws-nextjs-app/integration/pages/articles/hausa/snapshots/amp.test.ts.snap Snapshot update for @context https change.
ws-nextjs-app/integration/pages/articles/gahuza/snapshots/canonical.test.ts.snap Snapshot update for @context https change.
src/integration/pages/podcastPage/portugueseEpisode/snapshots/canonical.test.js.snap Snapshot update for @context https change.
src/integration/pages/podcastPage/portugueseBrand/snapshots/canonical.test.js.snap Snapshot update for @context https change.
src/integration/pages/onDemandTVPage/pashtoBrand/snapshots/canonical.test.js.snap Snapshot update for @context https change.
src/integration/pages/onDemandTVPage/pashto.expired/snapshots/canonical.test.js.snap Snapshot update for @context https change.
src/integration/pages/onDemandTVPage/hausa/snapshots/canonical.test.js.snap Snapshot update for @context https change.
src/integration/pages/mostReadPage/vietnamese/snapshots/canonical.test.js.snap Snapshot update for @context https change.
src/integration/pages/mostReadPage/vietnamese/snapshots/amp.test.js.snap Snapshot update for @context https change.
src/integration/pages/mostReadPage/mundo/snapshots/canonical.test.js.snap Snapshot update for @context https change.
src/integration/pages/mostReadPage/mundo/snapshots/amp.test.js.snap Snapshot update for @context https change.
src/integration/pages/liveRadio/kyrgyz/snapshots/canonical.test.js.snap Snapshot update for @context https change.
src/integration/pages/liveRadio/korean/snapshots/canonical.test.js.snap Snapshot update for @context https change.
src/integration/pages/liveRadio/gahuza/snapshots/canonical.test.js.snap Snapshot update for @context https change.
src/app/pages/TopicPage/snapshots/index.test.jsx.snap Snapshot update for @context https change.
src/app/pages/HomePage/snapshots/index.test.tsx.snap Snapshot update for @context https change.
src/app/lib/config/toggles/testConfig.js Adds podcastEpisodeLinkedData toggle (test env defaults).
src/app/lib/config/toggles/localConfig.js Adds podcastEpisodeLinkedData toggle (local env defaults).
src/app/lib/config/toggles/liveConfig.js Adds podcastEpisodeLinkedData toggle (live env defaults).
src/app/lib/config/toggles/snapshots/index.test.js.snap Snapshot update for new toggle in env configs.
src/app/lib/config/toggles/README.md Documents the new toggle.
src/app/components/LinkedData/types.ts Adds mainEntityId prop to LinkedData API.
src/app/components/LinkedData/index.tsx Adds mainEntity output support + switches @context to https://schema.org.
src/app/components/LinkedData/index.test.tsx Adds coverage for PodcastEpisode linked data output.
src/app/components/LinkedData/snapshots/index.test.tsx.snap Snapshot updates for https @context + new podcast episode linked data case.

Copilot AI review requested due to automatic review settings March 5, 2026 09:09
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 66 out of 67 changed files in this pull request and generated 2 comments.

Copilot AI review requested due to automatic review settings March 5, 2026 09:26
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 66 out of 67 changed files in this pull request and generated 1 comment.

<script type="application/ld+json">
{serialiseForScript({
'@context': 'http://schema.org',
'@context': 'https://schema.org',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as mentioned in the description, references to http://www.schema.org have been updated to https://www.schema.org as this aligns with schema.org’s new “preferred form” in their docs

this requires alot of snapshots to be updated tho, interested to see what people think, if this change is worth it

@Louis-Matsika Louis-Matsika self-assigned this Mar 5, 2026
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.

4 participants