From 83016a3b2d3e783a5d8c471e9b99023fc8130fec Mon Sep 17 00:00:00 2001 From: nickfrosty Date: Thu, 7 Dec 2023 14:15:22 -0500 Subject: [PATCH] feat: config --- next-env.d.ts | 1 - next.config.cjs => next.config.js | 12 ++++++++++++ src/pages/index.tsx | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) rename next.config.cjs => next.config.js (68%) diff --git a/next-env.d.ts b/next-env.d.ts index fd36f9494..4f11a03dc 100644 --- a/next-env.d.ts +++ b/next-env.d.ts @@ -1,6 +1,5 @@ /// /// -/// // NOTE: This file should not be edited // see https://nextjs.org/docs/basic-features/typescript for more information. diff --git a/next.config.cjs b/next.config.js similarity index 68% rename from next.config.cjs rename to next.config.js index e2322d9c9..800b3b6e9 100644 --- a/next.config.cjs +++ b/next.config.js @@ -28,3 +28,15 @@ module.exports = withContentlayer({ ], }, }); + +/** + * Format the NextJS redirects + */ +function redirectFormatter(basePath, redirects, permanent = true) { + return redirects.map(item => { + item.basePath = false; + item.permanent = item.permanent ?? permanent; + item.destination = `${basePath}${item.destination}`; + return item; + }); +} diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 54582cd50..39ff627d4 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -23,7 +23,7 @@ export default function Page() { Solana Developer Content -
nothing to see here
+
nothing to see here
); }