Skip to content

Commit

Permalink
Final build fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Heliodex committed Apr 16, 2024
1 parent 95a288b commit 4ceadaf
Showing 1 changed file with 14 additions and 16 deletions.
30 changes: 14 additions & 16 deletions src/routes/reviews/+page.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
import type { RevivalMetadata } from "$lib/types"

export async function load() {
const allPostFiles = import.meta.glob("../../../pages/revivals/*.md")
const allPostFiles = import.meta.glob("../../../pages/revivals/*.md")

return {
reviews: Promise.all(
Object.keys(allPostFiles).map(async path => {
const { metadata } = (await allPostFiles[path]()) as {
metadata: RevivalMetadata
}
export const load = async () => ({
reviews: await Promise.all(
Object.keys(allPostFiles).map(async path => {
const { metadata } = (await allPostFiles[path]()) as {
metadata: RevivalMetadata
}

return {
...metadata,
path: path.match(/(\w+)\.md/)?.[1],
}
})
),
}
}
return {
...metadata,
path: path.match(/(\w+)\.md/)?.[1],
}
})
),
})

0 comments on commit 4ceadaf

Please sign in to comment.