mirror of
https://github.com/explosion/spaCy.git
synced 2025-03-26 12:54:12 +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) {
|
if (!args.params) {
|
||||||
return { notFound: true }
|
return { notFound: true }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const mdx = await serialize(
|
||||||
|
fs.readFileSync(`${path.join('docs', ...args.params.listPathPage)}.mdx`, 'utf-8'),
|
||||||
|
{
|
||||||
|
parseFrontmatter: true,
|
||||||
|
mdxOptions: {
|
||||||
|
remarkPlugins,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
props: {
|
props: {
|
||||||
mdx: await serialize(
|
mdx,
|
||||||
fs.readFileSync(`${path.join('docs', ...args.params.listPathPage)}.mdx`, 'utf-8'),
|
|
||||||
{
|
|
||||||
parseFrontmatter: true,
|
|
||||||
mdxOptions: {
|
|
||||||
remarkPlugins,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user