1
0
Fork 0

chore(org): Don't build all docs paths at build time

This commit is contained in:
Joost De Cock 2022-06-06 18:30:19 +02:00
parent f457240f85
commit 777b40c414

View file

@ -106,15 +106,17 @@ export async function getStaticProps({ params, locale }) {
*/
export async function getStaticPaths() {
const somePaths = mdxPaths.filter(path => (path.split('/').length < 5))
return {
paths: [
...mdxPaths.map(key => `/${key}`),
...mdxPaths.map(key => `/es/${key}`),
...mdxPaths.map(key => `/de/${key}`),
...mdxPaths.map(key => `/fr/${key}`),
...mdxPaths.map(key => `/nl/${key}`),
...somePaths.map(key => `/${key}`),
...somePaths.map(key => `/es/${key}`),
...somePaths.map(key => `/de/${key}`),
...somePaths.map(key => `/fr/${key}`),
...somePaths.map(key => `/nl/${key}`),
],
fallback: false
fallback: 'blocking'
}
}