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.
docs/experimental/sections.json
1 parent bea4ed6 commit c45e78bCopy full SHA for c45e78b
apps/svelte.dev/src/routes/docs/experimental/sections.json/+server.ts
@@ -0,0 +1,18 @@
1
+import { docs } from '$lib/server/content';
2
+import { json } from '@sveltejs/kit';
3
+
4
+export const prerender = true;
5
6
+export function GET() {
7
+ return json(
8
+ Object.fromEntries(
9
+ Object.entries(docs.pages).map(([key, page]) => [
10
+ key,
11
+ {
12
+ metadata: { title: page.metadata.title, use_cases: page.metadata.use_cases },
13
+ slug: page.slug
14
+ }
15
+ ])
16
+ )
17
+ );
18
+}
0 commit comments