mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -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 ) {
|
function makeFeaturedAppsString ( featuredApps ) {
|
||||||
return featuredApps.slice(0, 5).map(app => app.name).join(', ')
|
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)
|
// console.log('video', video)
|
||||||
|
|
||||||
// Throw for missing featured apps
|
// Throw for missing featured apps
|
||||||
|
|
@ -12,7 +14,7 @@ export function buildVideoStructuredData ( video, featuredApps, options ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const {
|
const {
|
||||||
siteUrl
|
siteUrl = getSiteUrl(),
|
||||||
} = options
|
} = options
|
||||||
|
|
||||||
const thumbnailUrls = video.thumbnail.srcset.split(',').map( srcSetImage => {
|
const thumbnailUrls = video.thumbnail.srcset.split(',').map( srcSetImage => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue