Enable Video Structured Data on benchmark pages

This commit is contained in:
Sam Carlton 2022-07-06 23:52:55 -05:00
parent c1b232a291
commit da7ae98d5c
3 changed files with 42 additions and 7 deletions

View file

@ -183,10 +183,22 @@ export class ListingDetails {
}
get structuredData () {
// Normal video page with app links
if ( this.type === 'video' ) {
return buildVideoStructuredData( this.api, this.api.appLinks )
}
// Benchmark page
if ( this.hasInitialVideo ) {
// Build app links with just the current app
const appLinks = [ {
name: this.api.name,
endpoint: this.api.endpoint
} ]
return buildVideoStructuredData( this.initialVideo, appLinks )
}
return null
}