Skip to content

Commit

Permalink
docs: fix '/docs/' and '/docs/intro/' redirects
Browse files Browse the repository at this point in the history
  • Loading branch information
ssalbdivad committed Jan 27, 2025
1 parent ed3daff commit f25bfb4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ark/docs/app/docs/[[...slug]]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ export default async (props: { params: Promise<{ slug?: string[] }> }) => {

if (
!params.slug?.length ||
(params.slug?.length === 1 && params.slug[0] === "intro")
(params.slug?.length === 1 &&
(params.slug[0] === "" || params.slug[0] === "intro")) ||
(params.slug.length === 2 &&
params.slug[0] === "intro" &&
params.slug[1] === "")
)
redirect("/docs/intro/setup")

Expand Down

0 comments on commit f25bfb4

Please sign in to comment.