mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -07:00
Add tv page posters with preload
This commit is contained in:
parent
5cfcd5a7aa
commit
7b004ea590
3 changed files with 51 additions and 17 deletions
|
|
@ -68,6 +68,23 @@ class TV {
|
|||
|
||||
return makeDescription( data.tvEntry )
|
||||
},
|
||||
|
||||
headLinkTags: data => {
|
||||
// Declare dependencies for Eleventy
|
||||
// https://www.11ty.dev/docs/data-computed/#declaring-your-dependencies
|
||||
data.tvEntry
|
||||
|
||||
return [
|
||||
// Preload video thumbnail
|
||||
// <link rel="preload" as="image" href="img.png" />
|
||||
{
|
||||
'rel': 'preload',
|
||||
'as': 'image',
|
||||
'href': `https://i.ytimg.com/vi_webp/${ data.tvEntry.payload.video.id }/sddefault.webp`
|
||||
},
|
||||
]
|
||||
},
|
||||
|
||||
structuredData: data => {
|
||||
// Declare dependencies for Eleventy
|
||||
// https://www.11ty.dev/docs/data-computed/#declaring-your-dependencies
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue