From b687167bc16d44a144210cf5d5b5b8080e045ba7 Mon Sep 17 00:00:00 2001 From: Andrey Avtomonov Date: Thu, 28 May 2026 13:00:49 +0200 Subject: [PATCH] Route ktx stars dashboard --- docs-site/next.config.mjs | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/docs-site/next.config.mjs b/docs-site/next.config.mjs index b82803be..380dba85 100644 --- a/docs-site/next.config.mjs +++ b/docs-site/next.config.mjs @@ -6,12 +6,28 @@ const withMDX = createMDX(); const config = { basePath: "/ktx", async rewrites() { - return [ - { - source: "/docs/:path*.md", - destination: "/llms.mdx/docs/:path*", - }, - ]; + return { + beforeFiles: [ + { + source: "/stars", + has: [{ type: "host", value: "ktx.sh" }], + destination: "https://ktx-stars.vercel.app/stars", + basePath: false, + }, + { + source: "/stars/:path*", + has: [{ type: "host", value: "ktx.sh" }], + destination: "https://ktx-stars.vercel.app/stars/:path*", + basePath: false, + }, + ], + afterFiles: [ + { + source: "/docs/:path*.md", + destination: "/llms.mdx/docs/:path*", + }, + ], + }; }, async redirects() { return [ @@ -43,9 +59,9 @@ const config = { basePath: false, }, { - source: "/:path*", + source: "/:path((?!stars(?:/|$)).*)", has: [{ type: "host", value: "ktx.sh" }], - destination: "https://docs.kaelio.com/ktx/:path*", + destination: "https://docs.kaelio.com/ktx/:path", permanent: true, basePath: false, },