Skip to content

UI Library for Design Engineers. Animated components and effects you can copy and paste into your apps. Free. Open Source.

fix: routing fix

Dillion Vermac9972cb2ab83
diff --git a/app/(docs)/docs/[[...slug]]/page.tsx b/app/(docs)/docs/[[...slug]]/page.tsx
index b2237ffb..e8fdd388 100644
--- a/app/(docs)/docs/[[...slug]]/page.tsx
+++ b/app/(docs)/docs/[[...slug]]/page.tsx
@@ -23,7 +23,7 @@ interface DocPageProps {
}
async function getDocFromParams({ params }: DocPageProps) {
- const slug = params.slug?.join("/") || "";
+ const slug = params.slug?.join("/") || "index";
const doc = allDocs.find((doc) => doc.slugAsParams === slug);
if (!doc) {
diff --git a/content-collections.ts b/content-collections.ts
index 8b02b36c..e662f1a1 100644
--- a/content-collections.ts
+++ b/content-collections.ts
@@ -90,6 +90,7 @@ const pages = defineCollection({
};
},
});
+
const documents = defineCollection({
name: "Doc",
directory: "content/docs",