1
0
Fork 0

wip(org): Changes to page structure

This commit is contained in:
Joost De Cock 2022-06-10 12:25:56 +02:00
parent 567ea009fd
commit aeeca88641
3 changed files with 70 additions and 4 deletions

View file

@ -159,11 +159,17 @@ export const getStaticPaths = async () => {
`${strapiHost}/blogposts?_locale=en&dev_ne=true&_limit=-1`
)
.then(response => response.json())
.then(data => data.map(post => ({ params: { slug: post.slug } })))
.then(data => data.map(post => `/blog/${post.slug}`))
.catch(err => console.log(err))
return {
paths,
paths: [
...paths,
...paths.map(p => `/de${p}`),
...paths.map(p => `/es${p}`),
...paths.map(p => `/fr${p}`),
...paths.map(p => `/nl${p}`),
],
fallback: false,
}
}