mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -07:00
Add video structure data to eleventy tv template
This commit is contained in:
parent
95f9b24174
commit
9cf7c13861
1 changed files with 12 additions and 2 deletions
|
|
@ -1,11 +1,12 @@
|
|||
import dotenv from 'dotenv'
|
||||
|
||||
import config from '../nuxt.config'
|
||||
import config from '../nuxt.config.js'
|
||||
|
||||
import VideoPlayer from '../components-eleventy/video/player.js'
|
||||
import VideoRow from '../components-eleventy/video/row.js'
|
||||
|
||||
import { getRouteType } from '../helpers/app-derived'
|
||||
import { getRouteType } from '../helpers/app-derived.js'
|
||||
import { buildVideoStructuredData } from '../helpers/structured-data.js'
|
||||
|
||||
// Setup dotenv
|
||||
dotenv.config()
|
||||
|
|
@ -67,6 +68,15 @@ class TV {
|
|||
|
||||
return makeDescription( data.tvEntry )
|
||||
},
|
||||
structuredData: data => {
|
||||
// Declare dependencies for Eleventy
|
||||
// https://www.11ty.dev/docs/data-computed/#declaring-your-dependencies
|
||||
data.tvEntry
|
||||
|
||||
return buildVideoStructuredData( data.tvEntry.payload.video, data.tvEntry.payload.featuredApps, {
|
||||
siteUrl: process.env.URL
|
||||
} )
|
||||
}
|
||||
},
|
||||
|
||||
permalink: ( data ) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue