mirror of
https://github.com/explosion/spaCy.git
synced 2025-03-24 03:44:26 +03:00
Extract logic
This commit is contained in:
parent
6fa2bf2fff
commit
dcf8455f77
|
@ -54,17 +54,20 @@ export const getStaticProps: GetStaticProps<PropsPage, ParsedUrlQuery> = 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,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user