Skip to content

Commit 2ae1bf0

Browse files
committed
fix(docs): Use config redirects for /docs navigation
- Add /docs and /docs/help redirects in next.config.mjs - Remove redundant web/src/app/docs/page.tsx (config handles it) - Works for both server-side and client-side navigation
1 parent ac73f66 commit 2ae1bf0

File tree

4 files changed

+12
-7
lines changed

4 files changed

+12
-7
lines changed

web/next.config.mjs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,16 @@ const nextConfig = {
134134
destination: 'https://discord.gg/mcWTGjgTj3',
135135
permanent: false,
136136
},
137+
{
138+
source: '/docs',
139+
destination: '/docs/help/quick-start',
140+
permanent: false,
141+
},
142+
{
143+
source: '/docs/help',
144+
destination: '/docs/help/quick-start',
145+
permanent: false,
146+
},
137147
{
138148
source: '/releases',
139149
destination:

web/src/app/docs/page.tsx

Lines changed: 0 additions & 5 deletions
This file was deleted.

web/src/components/footer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ type LinkInfo = { text: string; href: string; target?: string }
1212

1313
const siteLinks: LinkInfo[] = [
1414
{ text: 'Home', href: '/' },
15-
{ text: 'Docs', href: '/docs', target: '_blank' },
15+
{ text: 'Docs', href: '/docs' },
1616
// NEWS DISABLED: Uncomment to re-enable news link in footer
1717
// { text: 'News', href: 'https://news.codebuff.com', target: '_blank' },
1818
{ text: 'Pricing', href: '/pricing' },

web/src/components/navbar/navbar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export const Navbar = () => {
4646
</Link>
4747
<nav className="hidden md:flex items-center space-x-1 ml-auto">
4848
<Link
49-
href={`/docs`}
49+
href="/docs"
5050
className="relative font-medium px-3 py-2 rounded-md transition-all duration-200 hover:bg-accent hover:text-accent-foreground group"
5151
>
5252
<span className="relative z-10">Docs</span>

0 commit comments

Comments
 (0)