Skip to content

Commit

Permalink
Missing API route, and pre-render search
Browse files Browse the repository at this point in the history
  • Loading branch information
scosman committed Jul 28, 2024
1 parent 03862e2 commit 4d50beb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/routes/(marketing)/search/+page.server.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const prerender = true
9 changes: 9 additions & 0 deletions src/routes/(marketing)/search/api/+server.ts
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 4d50beb

Please sign in to comment.