State whether images or videos in /p/ link preview

This commit is contained in:
Cadence Ember 2021-01-19 02:28:02 +13:00
parent 5f036124d9
commit aa5d6966a3
No known key found for this signature in database
GPG Key ID: BC1C2C61CF521B17
1 changed files with 2 additions and 1 deletions

View File

@ -26,7 +26,8 @@ html
if post.children.length >= 2
if description
- description = `\n\n${description}`
- description = `Gallery of ${post.children.length} images.${description}`
- let galleryType = post.children.every(c => c.isVideo()) ? "videos" : "images"
- description = `Gallery of ${post.children.length} ${galleryType}.${description}`
if description
meta(property="og:description" content=description)
if firstEntry.isVideo()