Skip to content

Commit 70f2621

Browse files
committed
fix: use correct variable names etc. in 'parseFrontMatter'
I wasn't careful enough when rebasing my changes on top of the Docusaurus v3 upgrade. I've moved the code to the config, but I forgot to update the variable names and other things.
1 parent a5b07cd commit 70f2621

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docusaurus.config.js

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

0 commit comments

Comments
 (0)