2022-06-10 15:18:36 +02:00
|
|
|
meta(property='og:title', content=cleanTitle(post.title) + ' : r/' + subreddit)
|
2022-06-10 15:42:37 +02:00
|
|
|
meta(property='og:description', content='' + post.selftext_preview)
|
2022-06-10 15:18:36 +02:00
|
|
|
meta(property='og:author_name', content='u/' + post.author)
|
|
|
|
if !post.has_media
|
2022-06-10 15:27:41 +02:00
|
|
|
if post.gallery
|
2022-06-10 15:18:36 +02:00
|
|
|
meta(property='twitter:card', content='summary_large_image')
|
|
|
|
meta(property='og:type', content='image')
|
|
|
|
each item in post.gallery_items
|
2022-06-10 15:27:41 +02:00
|
|
|
meta(property='og:image', content='' + item.large)
|
2022-06-10 16:00:32 +02:00
|
|
|
else
|
|
|
|
if post.images
|
|
|
|
meta(property='twitter:card', content='summary_large_image')
|
|
|
|
meta(property='og:type', content='image')
|
|
|
|
meta(property='og:image', content='' + post.images.source)
|
|
|
|
meta(property='og:image:url', content='' + post.images.source)
|
|
|
|
else
|
|
|
|
include meta_logo.pug
|
2022-06-10 15:18:36 +02:00
|
|
|
else
|
2022-06-10 15:27:41 +02:00
|
|
|
if post.media
|
2022-06-10 15:18:36 +02:00
|
|
|
if post.media.not_hosted_in_reddit
|
2022-06-10 15:27:41 +02:00
|
|
|
if post.media.source === 'YouTube'
|
2022-06-10 15:18:36 +02:00
|
|
|
meta(property='twitter:card', content='player')
|
|
|
|
meta(property='og:type', content='video')
|
|
|
|
meta(property='og:video', content='' + post.media.embed_src)
|
2022-06-10 15:27:41 +02:00
|
|
|
else
|
2022-06-10 15:18:36 +02:00
|
|
|
if post.media.source === 'external'
|
2022-06-10 15:27:41 +02:00
|
|
|
if post.images
|
2022-06-10 15:18:36 +02:00
|
|
|
meta(name='twitter:card', content='summary_large_image')
|
|
|
|
meta(property='og:type', content='image')
|
|
|
|
meta(property='og:image', content='' + post.images.source)
|
|
|
|
meta(property='og:image:src', content='' + post.images.source)
|
|
|
|
else
|
2022-06-10 15:27:41 +02:00
|
|
|
meta(name='twitter:card', content='summary_large_image')
|
|
|
|
meta(property='og:type', content='image')
|
|
|
|
meta(property='og:image', content='' + post.media.source)
|
|
|
|
meta(property='og:image:url', content='' + post.media.source)
|
2022-06-10 15:18:36 +02:00
|
|
|
else
|
2022-06-10 15:27:41 +02:00
|
|
|
meta(property='twitter:card', content='player')
|
|
|
|
meta(property='og:type', content='video')
|
|
|
|
meta(property='og:video', content='' + post.media.source)
|
2022-06-10 16:00:32 +02:00
|
|
|
meta(property='og:video:type', content='video/mp4')
|
|
|
|
else
|
|
|
|
include meta_logo.pug
|