From 1e46bd3295cc40e0eb537f7d5dece46a20de3281 Mon Sep 17 00:00:00 2001 From: weishu Date: Thu, 1 Jan 2026 14:23:44 +0800 Subject: [PATCH] fix: update documentation routing and simplify navigation - Replace VitePress router with window.location for docs index redirect - Add redirect rules for /docs and /docs/ paths to quick-start guide - Simplify navigation by removing section anchor links - Update all CTA buttons to link directly to /docs/ instead of home sections - Consolidate navigation layout on both desktop and mobile views --- docs/index.md | 5 ++--- website/public/_redirects | 2 ++ website/src/components/Layout.tsx | 20 +++++++------------- website/src/pages/Home.tsx | 8 +++++--- 4 files changed, 16 insertions(+), 19 deletions(-) diff --git a/docs/index.md b/docs/index.md index 0eca41b1..57e91a6c 100644 --- a/docs/index.md +++ b/docs/index.md @@ -5,10 +5,9 @@ title: HAPI Documentation diff --git a/website/public/_redirects b/website/public/_redirects index b9a9f00e..f6ab4cdb 100644 --- a/website/public/_redirects +++ b/website/public/_redirects @@ -1,2 +1,4 @@ +/docs/ /docs/guide/quick-start 301 +/docs /docs/guide/quick-start 301 /docs/* /docs/:splat 200 /* /index.html 200 diff --git a/website/src/components/Layout.tsx b/website/src/components/Layout.tsx index 0d75dfda..3f5422d2 100644 --- a/website/src/components/Layout.tsx +++ b/website/src/components/Layout.tsx @@ -26,18 +26,14 @@ export default function Layout({ children }: { children: React.ReactNode }) { {/* Desktop Nav */} @@ -56,12 +52,10 @@ export default function Layout({ children }: { children: React.ReactNode }) { {isMenuOpen && (