From 8f9bb8189e5addbecc1fc35f0719a207bdda477c Mon Sep 17 00:00:00 2001 From: Joost De Cock Date: Mon, 9 Oct 2023 18:23:41 +0200 Subject: [PATCH] chore(org): Only add English to getStaticPaths --- sites/org/pages/designs/[design].mjs | 8 +------- sites/org/pages/docs/[...slug].mjs | 9 +-------- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/sites/org/pages/designs/[design].mjs b/sites/org/pages/designs/[design].mjs index 2da9473ae6c..960e1ca8298 100644 --- a/sites/org/pages/designs/[design].mjs +++ b/sites/org/pages/designs/[design].mjs @@ -53,14 +53,8 @@ export async function getStaticProps({ locale, params }) { * To learn more, see: https://nextjs.org/docs/basic-features/data-fetching */ export async function getStaticPaths() { - const enPaths = [...collection].map((design) => `/designs/${design}`) - const paths = [...enPaths] - for (const lang of siteConfig.languages.filter((lang) => lang !== 'en')) { - paths.push(...enPaths.map((path) => `/${lang}${path}`)) - } - return { - paths, + paths: [...collection].map((design) => `/designs/${design}`), fallback: 'blocking', } } diff --git a/sites/org/pages/docs/[...slug].mjs b/sites/org/pages/docs/[...slug].mjs index a2ed3291937..8a831dff87b 100644 --- a/sites/org/pages/docs/[...slug].mjs +++ b/sites/org/pages/docs/[...slug].mjs @@ -73,14 +73,7 @@ export async function getStaticPaths() { //.filter((path) => path.split('/').length < 5) return { - paths: [ - ...somePaths.map((key) => `/${key}`), - ...somePaths.map((key) => `/es/${key}`), - ...somePaths.map((key) => `/de/${key}`), - ...somePaths.map((key) => `/fr/${key}`), - ...somePaths.map((key) => `/nl/${key}`), - ...somePaths.map((key) => `/uk/${key}`), - ], + paths: somePaths.map((key) => `/${key}`), fallback: false, } }