mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-15 06:35:20 -07:00
Add default siteUrl for structured data
This commit is contained in:
parent
f27c07591a
commit
73cf071d21
1 changed files with 4 additions and 2 deletions
|
|
@ -1,8 +1,10 @@
|
|||
import { getSiteUrl } from './url'
|
||||
|
||||
function makeFeaturedAppsString ( featuredApps ) {
|
||||
return featuredApps.slice(0, 5).map(app => app.name).join(', ')
|
||||
}
|
||||
|
||||
export function buildVideoStructuredData ( video, featuredApps, options ) {
|
||||
export function buildVideoStructuredData ( video, featuredApps, options = {} ) {
|
||||
// console.log('video', video)
|
||||
|
||||
// Throw for missing featured apps
|
||||
|
|
@ -12,7 +14,7 @@ export function buildVideoStructuredData ( video, featuredApps, options ) {
|
|||
}
|
||||
|
||||
const {
|
||||
siteUrl
|
||||
siteUrl = getSiteUrl(),
|
||||
} = options
|
||||
|
||||
const thumbnailUrls = video.thumbnail.srcset.split(',').map( srcSetImage => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue