We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a41dc9c commit 2ab0e75Copy full SHA for 2ab0e75
1 file changed
src/pages/reference/[...id].astro
@@ -1,4 +1,5 @@
1
---
2
+import type { GetStaticPathsResult } from "astro";
3
import ReferenceItemLayout from "@/src/layouts/ReferenceItemLayout.astro";
4
import {
5
getCollectionInDefaultLocale,
@@ -21,7 +22,16 @@ export async function getStaticPaths() {
21
22
return relatedEntry.data.submodule === entry.data.submodule;
23
}),
24
},
- }));
25
+ }))
26
+ .reduce<GetStaticPathsResult>((acc, entry) => {
27
+ acc.push(entry);
28
+ acc.push(Object.assign({}, entry, {
29
+ params: {
30
+ id: entry.params.id.toLowerCase()
31
+ }
32
+ }));
33
+ return acc;
34
+ }, []);
35
}
36
37
const { entry, relatedEntries } = Astro.props;
0 commit comments