From aa5d6966a3e3e03eff9d1025d2b68cc84b249669 Mon Sep 17 00:00:00 2001 From: Cadence Ember Date: Tue, 19 Jan 2021 02:28:02 +1300 Subject: [PATCH] State whether images or videos in /p/ link preview --- src/site/pug/post.pug | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/site/pug/post.pug b/src/site/pug/post.pug index 9b44244..2d2efed 100644 --- a/src/site/pug/post.pug +++ b/src/site/pug/post.pug @@ -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()