Skip to content

Commit 7145f33

Browse files
committed
fix: non-partial front matter
1 parent d787064 commit 7145f33

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docusaurus.config.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -368,12 +368,12 @@ module.exports = {
368368
const ogImageURL = new URL('https://apify.com/og-image/docs-article');
369369
ogImageURL.searchParams.set('title', result.frontMatter.title);
370370
result.frontMatter.image ??= ogImageURL.toString();
371-
}
372371

373-
// Extract the first sentence (ending with . ! or ?) even if it spans multiple lines
374-
const contentText = result.content.replace(/\n+/g, ' ').replace(/\s+/g, ' ').trim();
375-
const sentenceMatch = contentText.match(/^(.*?[.!?])\s/);
376-
result.frontMatter.description = sentenceMatch ? sentenceMatch[1].trim() : contentText;
372+
// Extract the first sentence (ending with . ! or ?) even if it spans multiple lines
373+
const contentText = result.content.replace(/\n+/g, ' ').replace(/\s+/g, ' ').trim();
374+
const sentenceMatch = contentText.match(/^(.*?[.!?])\s/);
375+
result.frontMatter.description = sentenceMatch ? sentenceMatch[1].trim() : contentText;
376+
}
377377

378378
return result;
379379
},

0 commit comments

Comments
 (0)