Skip to content

Commit b4c5214

Browse files
committed
return inlines correctly
Fixes an issue where site metadata wasn’t using the rendered version (including, for example, resolving shortcodes).
1 parent 519ca09 commit b4c5214

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/project/types/website/website-meta.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -496,16 +496,14 @@ function metaMarkdownPipeline(format: Format, extras: FormatExtras) {
496496

497497
// Twitter
498498
const twitterMeta = twitterMetadata(format);
499-
inlines[kTwitterDesc] = twitterMeta.title as string || description ||
499+
inlines[kTwitterDesc] = twitterMeta.description as string ||
500+
description ||
500501
"";
501502

502503
// Oopengraph
503504
const ogMeta = opengraphMetadata(format);
504-
inlines[kOgDesc] = ogMeta.title as string || description || "";
505-
506-
if (description !== undefined) {
507-
return inlines;
508-
}
505+
inlines[kOgDesc] = ogMeta.description as string || description || "";
506+
return { inlines };
509507
},
510508
processRendered(rendered: Record<string, Element>, doc: Document) {
511509
// Meta values

0 commit comments

Comments
 (0)