From 2d974b89526a6d2fe19c9a391fc9d032c9dfb02d Mon Sep 17 00:00:00 2001 From: asepharyana Date: Thu, 20 Aug 2026 12:33:35 +0700 Subject: [PATCH] fix(web): fix doubled section prefix in doc links (404 on click) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Home page, search results, and doc page Related links all generated hrefs as /${section}/${slug} but slug already includes the section prefix (e.g. 'docs/websocket/contract'), producing doubled URLs like /docs/docs/websocket/contract → 404. Fix: href={`/${d.slug}`} everywhere. --- apps/web/app/[section]/[...slug]/page.tsx | 2 +- apps/web/app/page.tsx | 2 +- apps/web/app/search/page.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/web/app/[section]/[...slug]/page.tsx b/apps/web/app/[section]/[...slug]/page.tsx index d268cce..abeda1c 100644 --- a/apps/web/app/[section]/[...slug]/page.tsx +++ b/apps/web/app/[section]/[...slug]/page.tsx @@ -45,7 +45,7 @@ export default async function DocPage({ {related.map((r) => (
  • {r.title} diff --git a/apps/web/app/page.tsx b/apps/web/app/page.tsx index d426e6f..c972f6c 100644 --- a/apps/web/app/page.tsx +++ b/apps/web/app/page.tsx @@ -35,7 +35,7 @@ export default async function Home() { {docs.map((d: DocumentMeta) => (
  • {d.title} diff --git a/apps/web/app/search/page.tsx b/apps/web/app/search/page.tsx index 9d9c77a..7458909 100644 --- a/apps/web/app/search/page.tsx +++ b/apps/web/app/search/page.tsx @@ -71,7 +71,7 @@ export default async function SearchPage({ className="rounded border border-zinc-200 dark:border-zinc-800 p-3" > {h.doc.title}