fix: hide sensitive gallery image on OGP (#11380)

This commit is contained in:
Acid Chicken (硫酸鶏) 2023-07-25 19:45:46 +09:00 committed by GitHub
parent 81ba841fb8
commit 9208cfd5f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,8 +16,12 @@ block og
meta(property='og:title' content= title)
meta(property='og:description' content= post.description)
meta(property='og:url' content= url)
meta(property='og:image' content= post.files[0].thumbnailUrl)
meta(property='twitter:card' content='summary_large_image')
if post.isSensitive
meta(property='og:image' content= avatarUrl)
meta(property='twitter:card' content='summary')
else
meta(property='og:image' content= post.files[0].thumbnailUrl)
meta(property='twitter:card' content='summary_large_image')
block meta
if user.host || profile.noCrawle