forked from FoundKeyGang/FoundKey
fixup: OpenGraph data generation
This is a fixup for commits39fb7e5946
andbe30e70344
.
This commit is contained in:
parent
28c11ca7af
commit
1adf88b090
2 changed files with 2 additions and 2 deletions
|
@ -331,7 +331,7 @@ router.get('/notes/:note', async (ctx, next) => {
|
|||
// If the note has a CW (is sensitive as a whole) or any of the files is sensitive or there are no
|
||||
// files, they are not used for a preview.
|
||||
let filesOpengraph = [];
|
||||
if (!packedNote.cw || packedNote.files.length > 0 || packedNote.files.all(file => !file.isSensitive)) {
|
||||
if (!packedNote.cw || packedNote.files.length > 0 || packedNote.files.every(file => !file.isSensitive)) {
|
||||
let limit = 4;
|
||||
for (const file of packedNote.files) {
|
||||
if (file.type.startsWith('image/')) {
|
||||
|
|
|
@ -14,7 +14,7 @@ block desc
|
|||
|
||||
block og
|
||||
meta(property='og:type' content='article')
|
||||
meta(property='og:article:published_time' content=note.createdAt.toISOString())
|
||||
meta(property='og:article:published_time' content=note.createdAt)
|
||||
meta(property='og:article:author:username' content=user.username)
|
||||
meta(property='og:title' content= title)
|
||||
meta(property='og:description' content= summary)
|
||||
|
|
Loading…
Reference in a new issue