Skip to content

Commit dbc2455

Browse files
committed
fix: avoid setting frontmatter to partials, as it brings up Docusaurus warning
1 parent ec95e1b commit dbc2455

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

docusaurus.config.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -193,12 +193,12 @@ module.exports = {
193193
mermaid: true,
194194
parseFrontMatter: async (params) => {
195195
const result = await params.defaultParseFrontMatter(params);
196-
197-
const ogImageURL = new URL('https://apify.com/og-image/docs-article');
198-
199-
ogImageURL.searchParams.set('title', result.frontMatter.title);
200-
result.frontMatter.image ??= ogImageURL.toString();
201-
196+
const isPartial = filePath.split('/').pop()[0] === '_';
197+
if (!isPartial) {
198+
const ogImageURL = new URL('https://apify.com/og-image/docs-article');
199+
ogImageURL.searchParams.set('title', frontMatter.title);
200+
frontMatter.image ??= ogImageURL.toString();
201+
}
202202
return result;
203203
},
204204
},

0 commit comments

Comments
 (0)