diff --git a/src/routes/(marketing)/search/+page.server.ts b/src/routes/(marketing)/search/+page.server.ts new file mode 100644 index 00000000..176ae642 --- /dev/null +++ b/src/routes/(marketing)/search/+page.server.ts @@ -0,0 +1 @@ +export const prerender = true diff --git a/src/routes/(marketing)/search/api/+server.ts b/src/routes/(marketing)/search/api/+server.ts new file mode 100644 index 00000000..8a4426b8 --- /dev/null +++ b/src/routes/(marketing)/search/api/+server.ts @@ -0,0 +1,9 @@ +import { buildSearchIndex } from "$lib/build_index" + +export async function GET() { + console.log("Search API") + const searchData = await buildSearchIndex() + return new Response(JSON.stringify(searchData)) +} + +export const prerender = true