Add fallback logo for text-only posts in meta_post.pug

This commit is contained in:
redmt 2022-06-10 16:00:32 +02:00
parent 6328e41bcf
commit cc6c2a1cd6
1 changed files with 11 additions and 6 deletions

View File

@ -7,11 +7,14 @@ if !post.has_media
meta(property='og:type', content='image')
each item in post.gallery_items
meta(property='og:image', content='' + item.large)
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
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
else
if post.media
if post.media.not_hosted_in_reddit
@ -35,4 +38,6 @@ else
meta(property='twitter:card', content='player')
meta(property='og:type', content='video')
meta(property='og:video', content='' + post.media.source)
meta(property='og:video:type', content='video/mp4')
meta(property='og:video:type', content='video/mp4')
else
include meta_logo.pug