diff --git a/website/pages/[...listPathPage].tsx b/website/pages/[...listPathPage].tsx index 7860e2135..af59e6946 100644 --- a/website/pages/[...listPathPage].tsx +++ b/website/pages/[...listPathPage].tsx @@ -54,17 +54,20 @@ export const getStaticProps: GetStaticProps = async ( if (!args.params) { return { notFound: true } } + + const mdx = await serialize( + fs.readFileSync(`${path.join('docs', ...args.params.listPathPage)}.mdx`, 'utf-8'), + { + parseFrontmatter: true, + mdxOptions: { + remarkPlugins, + }, + } + ) + return { props: { - mdx: await serialize( - fs.readFileSync(`${path.join('docs', ...args.params.listPathPage)}.mdx`, 'utf-8'), - { - parseFrontmatter: true, - mdxOptions: { - remarkPlugins, - }, - } - ), + mdx, }, } }