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 beacfef commit 8456aecCopy full SHA for 8456aec
apps/svelte.dev/src/routes/e/[code]/+page.server.ts
@@ -9,6 +9,12 @@ const reference = index['docs/svelte/reference'].children.filter(
9
10
export const prerender = true;
11
12
+export function entries() {
13
+ return reference.flatMap((page) =>
14
+ [...page.body.matchAll(/(^|\n)### (\w+)/g)].map(([, , code]) => ({ code }))
15
+ );
16
+}
17
+
18
export function load({ params }) {
19
// Since codes are not top level section we gotta jump through some hoops to get the right hash
20
for (const page of reference) {
0 commit comments