We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5a2dec9 commit a429bd7Copy full SHA for a429bd7
src/pages/[code].astro
@@ -0,0 +1,16 @@
1
+---
2
+import { getCollection } from "astro:content";
3
+
4
+export async function getStaticPaths() {
5
+ const sessions = await getCollection("sessions");
6
+ return sessions.map((entry) => ({
7
+ params: { code: entry.data.code },
8
+ props: { slug: entry.id},
9
+ }));
10
+}
11
12
+const { slug } = Astro.props;
13
14
15
16
+<meta http-equiv="refresh" content=`0;url=/session/${slug}` />
0 commit comments