From 73cf071d217c864ac8e86342c05fe4832ba12f9c Mon Sep 17 00:00:00 2001 From: Sam Carlton Date: Thu, 9 Jun 2022 14:49:21 -0500 Subject: [PATCH] Add default siteUrl for structured data --- helpers/structured-data.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/helpers/structured-data.js b/helpers/structured-data.js index 126aafc..23605db 100644 --- a/helpers/structured-data.js +++ b/helpers/structured-data.js @@ -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 => {